Sign in Join

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

Mailing lists / lazarus / 2010-07

Mac OS X gdb: Segmentation Fault loading my project

11 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Tobias Giesen

Hello,

I first tried to send this to the fpc-pascal list but it doesn't seem to work. Sorry for cross-posting if it still makes it thru.

My compiled application with symbols is 93.5 MB in size and gdb cannot load it, so the debugger in Lazarus fails too (Segmentation fault when gdb tries to load the symbols).

This happens on both Leopard and Snow with FPC 2.2.x and 2.4.0 and Lazarus 0.9.28 and 0.9.29.

Only the 2 year old installation on Tiger still works.

Note that I have to use -Cg- to disable PIC due to some assembler code. Could this have an influence?

I tried to reduce the symbol size by compiling the LCL without symbols, but the option -g- did not do the trick - how could I try that?

Should I try installing FPC 2.5 from SVN?

Or install a newer gdb?

Any other ideas?

Thanks for any help!

Cheers,
Tobias

Reply by email

Tobias Giesen
to dmitry boyarintsev
How about using dwarf debug information, instead of stabs?

Great idea, I will try it!

Currently I cannot compile the app anyway because FPC 2.4.0 fails with Fatal: Compilation aborted: Unhandled exception at ... on line 1 of some units.

So I guess I will have to install a newer FPC. Any chance the daily snapshots would be updated to 2.4.3 for OS X i386?

Cheers,
Tobias

Reply by email

Tobias Giesen
to Tobias Giesen

Hi,

is there a way to see or log the communication between Lazarus and gdb? Because even though standalone gdb can sometimes load my executable with symbols, Lazarus still says "Oops, debugger error" or something like that. I would like to know the exact error.

Mac OS X i386 ...

Cheers,
Tobias

Reply by email

Mattias Gaertner
to Tobias Giesen
Show quoted text 6 lines
Hi, is there a way to see or log the communication between Lazarus and gdb? Because even though standalone gdb can sometimes load my executable with symbols, Lazarus still says "Oops, debugger error" or something like that. I would like to know the exact error.

View / Debug windows / Debug output

Mattias

Reply by email

Tobias Giesen
to Mattias Gaertner
View / Debug windows / Debug output

Wow that is very interesting!

The info ends with:
Program stopped at a breakpoint that has since been deleted. Type ... for more information.

But I don't have any breakpoints set, and Lazarus 0.9.28.2 says that the debugger entered the error state (Oops...).

This is on Snow Leopard.

Well, I will boot into my other installation and try my luck with the current Lazarus snapshot + FPC 2.5 (because 2.4.0 cannot compile my app).

Cheers,
Tobias

Reply by email

Andrew Brunner
to Tobias Giesen

I think I had this problem on Ubuntu a while ago. I looked in the project file with a text editor and removed the instances and re-opened my project with success.

Tobias Giesen wrote 29 lines
> View / Debug windows / Debug output Wow that is very interesting! The info ends with: Program stopped at 0x211a. It stopped at a breakpoint that has since been deleted. Type ... for more information. But I don't have any breakpoints set, and Lazarus 0.9.28.2 says that the debugger entered the error state (Oops...). This is on Snow Leopard. Well, I will boot into my other installation and try my luck with the current Lazarus snapshot + FPC 2.5 (because 2.4.0 cannot compile my app). Cheers, Tobias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Tobias Giesen
to Andrew Brunner
I think I had this problem on Ubuntu a while ago. I looked in the project file with a text editor and removed the instances and re-opened my project with success.

Hmm that seemed to be a hopeful tip, but my project file didn't contain any breakpoints. Well I cleaned out some other stuff.

Do clever developers even need debuggers?

Cheers,
Tobias

Reply by email

Tobias Giesen
to dmitry boyarintsev
Show quoted text 6 lines
> Currently I cannot compile the app anyway because FPC 2.4.0 fails > with Fatal: Compilation aborted: Unhandled exception at ... > on line 1 of some units. No code examples - no help. But you can always try a snapshot or SVN version.

Yes it works with 2.5.1! Super! If it didn't I would have come up with some way to either fix it myself or submit a reproducible bug report.

Kind Regards,
Tobias Giesen

Super Flexible Software Ltd. & Co. KG
Lessingstr. 42
48485 Neuenkirchen, Germany
www.superflexible.com
www.tgtools.com

----------------------------------------------------------- Registered at register court Steinfurt as HRA 5061 Liability / general partner: TGTools Ltd.
Company No. 05513299
Registered in England and Wales
Directors: Tobias Giesen and Claudia Giesen

Reply by email

Marc Weustink
to Tobias Giesen: Wow that is very interesting! The info ends with: Program stopped at a breakpoint that…
Tobias Giesen wrote 11 lines
> View / Debug windows / Debug output Wow that is very interesting! The info ends with: Program stopped at 0x211a. It stopped at a breakpoint that has since been deleted. Type ... for more information. But I don't have any breakpoints set, and Lazarus 0.9.28.2 says that the debugger entered the error state (Oops...).

Lazarus sets a temporary breakpoint at the first executable addres, since it is not possible to set a breakpoint before you start debugging (or this was atleast the case in older versions of gdb) Therefore all breakpoints are set at this temporary breakpoint. So that's not strange.

But the address is. Somehow the address info isn't correct. I've seen that before, but don't know what causes it.

Marc

Reply by email