View Issue Details

IDProjectCategoryView StatusLast Update
0018150LazarusDebuggerpublic2011-01-21 22:29
ReporterChristian Assigned ToMartin Friebe  
Status closedResolutionfixed 
Product Version0.9.29 (SVN) 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0018150: IDE ignores Breakpoints in OSX
DescriptionThe IDE dont halts on Breakpoints/shows Breakpoints on OSX/Carbon with actual GDB 7.1 from Macports
I add an Dump in Additional Information that should show what happens, the IDE dont shows the Breakpoint hit ever.

^error,msg="No symbol \"parentfp\" in current context."
Additional InformationlibType1Scaler.dylib",loaded_addr="0x95acd000",slide="0x95acd000",prefix=""},time={now="1291410289.806524"}
<-data-evaluate-expression ^^shortstring(^pointer($rdi)^+24)^^>
^error,msg="Invalid cast."
<x/s ^Exception($rdi)^.FMessage>
&"x/s ^Exception($rdi)^.FMessage\n"
<-data-evaluate-expression FMainConnection.ExecuteDirect>
^error,msg="No symbol \"FMainConnection\" in current context."
<-data-evaluate-expression parentfp>
^error,msg="No symbol \"parentfp\" in current context."
TagsNo tags attached.
Fixed in Revision28640
Attached Files


duplicate of 0017909 closedMartin Friebe GDB Exception Message don't shows up 


Martin Friebe

2010-12-04 03:28

manager   ~0043969

I am a bit confused. The attached data seems to show tha debugged application stopping due to an exception, not because of a (user) breakpoint hit.
The exception is intercepted with an internal breakpoint.

I can see that the IDE failed to get the exception name/class.

So there may be 2 issues:

1) Exception class not shown.
I can not tell from the output, if the correct unit was loaded, and the correct line highlighted as to where the exception occurred ?

2) The breakpoint problem.

Please recompile the IDE with the following 3 defines:

You need to start the IDE with a logfile --debug-log=/path/file.log on the command line.

Please indicate about each breakpoint:
- file and line
- was it set before starting the debugger or after (while app was running).

Also do you have 32 or 64 bit?
How recent is you 0.9.29? If it is older than 2 weeks you should update it first. There where many changes to the IDE debugger code in November.

Martin Friebe

2010-12-04 03:30

manager   ~0043970

^error,msg="No symbol \"parentfp\" in current context."

This is expected and correct.

You had a watch defined in the watch window "FMainConnection.ExecuteDirect"

It does not exist in the Exception Handler code, so the IDE checks if the current stop is inside a nested procedure. Nested procedures have parentfp.

The code is not in a nested procedure, so this is correct.

Eugen Bolz

2010-12-04 17:15

reporter   ~0043982

Sorry to be offtopic:

But Christian could u tell me how to get GDB 7.1 running on MacOS?


2010-12-04 17:39

reporter   ~0043984

Sry it is gdb 6.3.50 installed via macports, am not shure where i have 7.1 read :( sry.

Report kommt gleich nach

Martin Friebe

2010-12-04 19:31

manager   ~0043986

Last edited: 2010-12-04 19:35

6.3.50 is known not to work reliable under mac osx 64 bit

It gets stuck when an exception is hit (as in your case), please see 0017909

No need for report in this case.(maybe still useful, your bug signature seems to be a little different)

the bug partly is in gdb, which does not return a prompt. workaround is described in 0017909

7.1 is not tested, but may not need the workaround. It still appears to be unable to report the exception name.

It works with dwarf only (crashes if it finds any stabs), and it needs app build without app-bundle


2010-12-04 19:49

reporter   ~0043989

Is there an GDB Version, that works good on OSX ?

with Workaround it works much better, but also not fully.

Martin Friebe

2010-12-04 19:59

manager   ~0043990

Unfortunately, I don't know. I don't have any 64 bit machine here.

So unless someone with a 64 bit mac can test and fix it... Not sure which of the other Developers have one.

Also as indicated, part of the issue is in gdb, so it can't be fixed in Lazarus.

One problem is to get the exception msg/class-name.
Can you try to get a disassembler of the code:
  raise Exception.Create('foo');


2010-12-04 20:29

reporter   ~0043991

I use an 32 bit Compiler, but raise Exception dont ends in the IDE also,

<-symbol-list-lines /private/tmp/unit1.pas>
<-data-evaluate-expression ^^shortstring(^pointer($rdi)^+24)^^>
^error,msg="Invalid cast."
<x/s ^Exception($rdi)^.FMessage>
&"x/s ^Exception($rdi)^.FMessage\n"

Nothing happens in the IDE.

Assembler code is:

0000000000045944 8b938e5a2200 mov 0x225a8e(%ebx),%edx
000000000004594A 8b8b565d2200 mov 0x225d56(%ebx),%ecx
0000000000045950 b800000000 mov $0x0,%eax
0000000000045955 e856830300 call 0x7dcb0 <SYSUTILS_EXCEPTION_$__CREATE$ANSISTRING$$EXCEPTION>
000000000004595A 89e9 mov %ebp,%ecx
000000000004595C 8d931c000000 lea 0x1c(%ebx),%edx
0000000000045962 e859b6fdff call 0x20fc0 <fpc_raiseexception>


2010-12-04 20:30

reporter   ~0043992

you can also add me in skype, maybe so its easyer to get this

Martin Friebe

2010-12-04 23:34

manager   ~0043997

The issue seems to be caused by debugging an app compiled for 32 bit, in a gdb configured for 64 bit. While gdb seems to actually support this, the IDE does not realize that the app is 32 bit, and makes wrong assumptions.


2010-12-05 00:03

reporter   ~0044000

and this is not fixable ? the ide knows the target !!

Martin Friebe

2010-12-05 00:49

manager   ~0044001

Never said it wasn't fixable (or never meant to).
But it needs to be fixed in the right place.


2010-12-05 00:54

reporter   ~0044002

Maybe it sounds harder that i mean it :)

Martin Friebe

2010-12-07 16:57

manager   ~0044061

Please close, if ok

Issue History

Date Modified Username Field Change
2010-12-03 22:11 Christian New Issue
2010-12-03 22:11 Christian Status new => assigned
2010-12-03 22:11 Christian Assigned To => Marc Weustink
2010-12-04 03:28 Martin Friebe LazTarget => -
2010-12-04 03:28 Martin Friebe Note Added: 0043969
2010-12-04 03:28 Martin Friebe Assigned To Marc Weustink => Martin Friebe
2010-12-04 03:28 Martin Friebe Status assigned => feedback
2010-12-04 03:30 Martin Friebe Note Added: 0043970
2010-12-04 17:15 Eugen Bolz Note Added: 0043982
2010-12-04 17:39 Christian Note Added: 0043984
2010-12-04 19:31 Martin Friebe Note Added: 0043986
2010-12-04 19:33 Martin Friebe Note Edited: 0043986
2010-12-04 19:33 Martin Friebe Relationship added duplicate of 0017909
2010-12-04 19:35 Martin Friebe Note Edited: 0043986
2010-12-04 19:49 Christian Note Added: 0043989
2010-12-04 19:59 Martin Friebe Note Added: 0043990
2010-12-04 20:29 Christian Note Added: 0043991
2010-12-04 20:30 Christian Note Added: 0043992
2010-12-04 23:34 Martin Friebe Note Added: 0043997
2010-12-05 00:03 Christian Note Added: 0044000
2010-12-05 00:49 Martin Friebe Note Added: 0044001
2010-12-05 00:50 Martin Friebe Status feedback => assigned
2010-12-05 00:54 Christian Note Added: 0044002
2010-12-07 16:57 Martin Friebe Fixed in Revision => 28640
2010-12-07 16:57 Martin Friebe LazTarget - => 1.0
2010-12-07 16:57 Martin Friebe Status assigned => resolved
2010-12-07 16:57 Martin Friebe Fixed in Version => 0.9.29 (SVN)
2010-12-07 16:57 Martin Friebe Resolution open => fixed
2010-12-07 16:57 Martin Friebe Note Added: 0044061
2010-12-07 16:58 Martin Friebe Target Version => 0.9.30
2011-01-21 22:29 Christian Status resolved => closed