Sign in Join

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

Mailing lists / fpc-pascal / 2010-07

Mac OS X gdb: Segmentation Fault loading my project

10 messages · 3 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 am back developing for Mac!

My compiled application with symbold is 93.5 MB in size and gdb cannot load it, so the debugger in Lazarus fails too.

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

Jonas Maebe
to Tobias Giesen
Tobias Giesen wrote
My compiled application with symbold is 93.5 MB in size and gdb cannot load it, so the debugger in Lazarus fails too.

Stabs or DWARF (-g or -gw)? I've seen this in the past with DWARF and Lazarus-compiled applications, but never with Stabs.

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

No.

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?

The option -g- does disable debug info generation. If it didn't work for you, that means that either the parameter was not actually used (I guess you did not specify it on the command line, but entered it in some dialog in Lazarus), or that after the -g- another -g parameter appears (which will reenabled debug information).

Should I try installing FPC 2.5 from SVN?

That could help if you are using DWARF. Almost nothing has been changed to Stabs.

Or install a newer gdb?

Unlikely (and that's not very easy).

Jonas

PS: the reason it took so long for your mail to appear on the mailing list is that you sent it from a different address than the one you used to subscribe. I've added your new address to the whitelist so that future mails sent from there won't be held for moderator approval anymore in the future.

Tobias Giesen
to Jonas Maebe
Stabs or DWARF (-g or -gw)?

I think Stabs, but apparently it worked with Dwarf in one particular installation. I will need to look into it more. Lazarus still says "Oops, debugger error" so I need to find out how to look at the communication between Lazarus and gbd to see the actual error.

With FPC 2.4.0 I get Fatal: Compilation aborted: Unhandled exception at ... on line 1 of some units. So I will try to install 2.5.1 from SVN ...

Cheers,
Tobias

Jonas Maebe
to Tobias Giesen
Tobias Giesen wrote
With FPC 2.4.0 I get Fatal: Compilation aborted: Unhandled exception at ... on line 1 of some units.

Does it still happen after cleaning the project and then rebuilding it?

Jonas

Tobias Giesen
to Jonas Maebe
> With FPC 2.4.0 I get Fatal: Compilation aborted: Unhandled exception > at ... on line 1 of some units. Does it still happen after cleaning the project and then rebuilding it?

I manually deleted all .ppu, .o, and .rst files and it happens on a fresh build.

By the way could -Cs20000000 do any harm? Maybe one 0 too many?

I saw 2.4.3 for Windows on the snapshots page, is there any such update for Mac?

Kind Regards,
Tobias Giesen

Jonas Maebe
to Tobias Giesen
Tobias Giesen wrote
I manually deleted all .ppu, .o, and .rst files and it happens on a fresh build.

Then please file a bug report with source code to reproduce the crash.

By the way could -Cs20000000 do any harm? Maybe one 0 too many?

The stack size only affects stack checking on Unix platforms. It has no influence on the program in any other way.

I saw 2.4.3 for Windows on the snapshots page, is there any such update for Mac?

I don't think anyone builds FPC snapshots for Mac OS X.

Jonas

Tobias Giesen
to Jonas Maebe
Then please file a bug report with source code to reproduce the crash.

I'd love to but probably it only happens in my project with close to 500 units, it can be really hard to strip such things down. There is unfortunately a lot of closed source code in it.

I will try installing FPC 2.5. Probably going to take a while to figure that out from SVN.

Cheers,
Tobias

Tobias Giesen
to Tobias Giesen

Hi,

I have the sources from SVN now, do I just cd into the folder and type make?

I couldn't find any documentation on making FPC anywhere on freepascal.org. Maybe I missed something?

Cheers,
Tobias