Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-04

Odd issue with breakpoints

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

* Lazarus (rev 24492 ) compile with FPC trunc (rev 15110)
* Both (lazarus / RTL) compiled with -gw -godwarfsets
* gdb 6.8.3 or gdb 7.0
* Windows Vista 32 Bit

Trying to set a breakpoint to lazarus\ide\project.pp line 2121 (first executable line of function
TUnitInfo.EditorInfoWithEditorComponent(AEditor:
TSourceEditorInterface): TUnitEditorInfo;)

Causes the error (full listing below):
<-break-insert -f project.pp:2121>
^done,bkpt={number="11",type="breakpoint",disp="keep",enabled="y",addr="0x0000001d",file="project.pp",line="2121",times="0",original-location="project.pp:2121"}

Why would a breakpoit be at 0x0000001d ?

The debugged application becomes frozen after this (but that may be the way Lazarus' debugger implementation reacts to the error. (There is no way to get the app to continue running)

* From Console
[DBGTGT] running,thread-id="all"
[Debugger] Console output: ~"[Switching to Thread 5000.0x998]\n" [Debugger] Notify output: ,id="9"
[Debugger] Log output: &"info program\n"
TGDBMIDebugger.ProcessResult Error: ,msg="Warning:\nCannot insert breakpoint 11.\nError accessing memory address 0x1d: I nput/output error.\n"

* From Lazarus "deboug output" window
<info program>
&"info program\n"
~"\tUsing the running image of child Thread 5000.0x998.\n" ~"Program stopped at 0x779b8b2f.\n"
~"It stopped with signal SIGTRAP, Trace/breakpoint trap.\n" ~"Type \"info stack\" or \"info registers\" for more information.\n" ^done
(gdb)
<-break-insert -f project.pp:2121>
^done,bkpt={number="11",type="breakpoint",disp="keep",enabled="y",addr="0x0000001d",file="project.pp",line="2121",times="0",original-location="project.pp:2121"} (gdb)
<-break-enable 11>
^done
(gdb)
<-exec-continue>
^error,msg="Warning:\nCannot insert breakpoint 11.\nError accessing memory address 0x1d: Input/output error.\n"
(gdb)

Reply by email

Jonas Maebe
to Martin
Martin wrote
* Lazarus (rev 24492 ) compile with FPC trunc (rev 15110) * Both (lazarus / RTL) compiled with -gw -godwarfsets * gdb 6.8.3 or gdb 7.0 * Windows Vista 32 Bit

Does it work if you use -Xe to compile lazarus?

Jonas

Reply by email

Martin
to Jonas Maebe
Jonas Maebe wrote 10 lines
On 07 Apr 2010, at 21:49, Martin wrote: > * Lazarus (rev 24492 ) compile with FPC trunc (rev 15110) > * Both (lazarus / RTL) compiled with -gw -godwarfsets > * gdb 6.8.3 or gdb 7.0 > * Windows Vista 32 Bit > Does it work if you use -Xe to compile lazarus?

Yes it does work with -Xe

Another think I found in the meantime (going through it with Marc on IRC):

The Function is never called by any code. However it has line info => probably a result of smart linking disabled for dwarf (on windows)

So the linker includes the code, but doesn't include (correct) debug info.

Martin

Reply by email