Sign in Join

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

Mailing lists / lazarus / 2013-12

Debbugger got permanently stuck

9 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Felipe Monteiro de Carvalho

Hello,

It just happened suddenly to me. In one moment I was happy debugging my project and in the next one every time I place a breakpoint I get this fatal error:

http://img824.imageshack.us/img824/523/u1ts.png

And after that the program is in some kind of zombie state and can only be killed by closing Lazarus.

I already tryed to restart Windows, rebuild Lazarus from the latest SVN revision (thought in the same place, so I haven't yet tryed clearing the config files), placing the breakpoint after or before starting the program.

I didn't change anything in my program, it just suddenly started showing the error, and it shows every single time now.

Any ideas what to do? My only idea next would be to delete all config files, but hopefully there would be something less intrusive ...

I searched a bit in mailling list archives, but nothing showed up.

thanks

Felipe Monteiro de Carvalho

Reply by email

Martin Frb
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 10 lines
Hello, It just happened suddenly to me. In one moment I was happy debugging my project and in the next one every time I place a breakpoint I get this fatal error: http://img824.imageshack.us/img824/523/u1ts.png And after that the program is in some kind of zombie state and can only be killed by closing Lazarus.

GDB version? OS?
Instead of closing the IDE, did you try "reset debugger" from "run" menu?

This can happen for various reasons. It depends on if the brk-nummer is positive (regular breakpoint) or negative (gdb internal for stepping). In this case: positive

1) smart linking. Open the breakpoint window (from menu / view / debug) and clear the breakpoint, that is not in code.

2) If right when starting the app. (Please provide a log) Change the value for "InternalStartBreak" (in the property grid of the options menu: tools/option/debugger)

3) Not sure, only seen with negative number yet, and only on windows, and only with gdb >= 7.3: GDB tries to access a thread that just terminated (e.g. after a open/save dialog, which uses threads on win). No solution known.

Reply by email

Martin Frb
to Felipe Monteiro de Carvalho: It just happened suddenly to me. In one moment I was happy debugging my project and in…
Felipe Monteiro de Carvalho wrote 8 lines
Hello, It just happened suddenly to me. In one moment I was happy debugging my project and in the next one every time I place a breakpoint I get this fatal error: http://img824.imageshack.us/img824/523/u1ts.png

Given that it happens, when you try to set the breakpoint (app paused, I assume?), I would gues smart linking is on, and the code in question has not been included.

It may also be 2 source files of the same name, though I am not sure that would give this error.

Reply by email

Felipe Monteiro de Carvalho
to Martin Frb: GDB version? OS? Instead of closing the IDE, did you try "reset debugger" from "run" menu?
Martin Frb wrote
GDB version?

7.2

OS?

Windows 64 bits, but Lazarus compiled to 32-bits.

Instead of closing the IDE, did you try "reset debugger" from "run" menu?

This closes the program.

1) smart linking. Open the breakpoint window (from menu / view / debug) and clear the breakpoint, that is not in code.

Ummm, I'm pretty sure that this code cannot be optimized-out.

2) If right when starting the app. (Please provide a log) Change the value for "InternalStartBreak" (in the property grid of the options menu: tools/option/debugger)

How can I get a log?

Felipe Monteiro de Carvalho

Reply by email

Felipe Monteiro de Carvalho
to Martin Frb: Given that it happens, when you try to set the breakpoint (app paused, I assume?), I…
Martin Frb wrote
Given that it happens, when you try to set the breakpoint (app paused, I assume?),

No, I set the breakpoint with the app running.

I would gues smart linking is on, and the code in question has not been included.

I changed the code to be extra sure that it is not optimized out and put breakpoints in otherplace ... in any place I get the problem.

Felipe Monteiro de Carvalho

Reply by email

Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho

ohhh ... a fresh set of config files for Lazarus didn't help anything =(

Felipe

Felipe Monteiro de Carvalho wrote 14 lines
On Wed, Dec 18, 2013 at 4:23 PM, Martin Frb wrote: > Given that it happens, when you try to set the breakpoint (app paused, I > assume?), No, I set the breakpoint with the app running. > I would gues smart linking is on, and the code in question has not > been included. I changed the code to be extra sure that it is not optimized out and put breakpoints in otherplace ... in any place I get the problem. -- Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho

Reply by email

Martin Frb
to Felipe Monteiro de Carvalho: 7.2 Windows 64 bits, but Lazarus compiled to 32-bits. This closes the program. Ummm, I'm…
Felipe Monteiro de Carvalho wrote
On Wed, Dec 18, 2013 at 4:10 PM, Martin Frb wrote: > OS? Windows 64 bits, but Lazarus compiled to 32-bits.

In that case, using the 32 bit gdb or 64 bit gdb ?

> 1) smart linking. Open the breakpoint window (from menu / view / debug) and > clear the breakpoint, that is not in code. Ummm, I'm pretty sure that this code cannot be optimized-out.

Is smart linking disabled in the options?

Please also try using the external linker -Xe

It looks like the debug info is not probably relocated (should be done by the linker)

Show quoted text 5 lines
> 2) If right when starting the app. (Please provide a log) > Change the value for "InternalStartBreak" (in the property grid of the > options menu: tools/option/debugger) How can I get a log?

http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session

Reply by email

Felipe Monteiro de Carvalho
to Martin Frb
Martin Frb wrote
In that case, using the 32 bit gdb or 64 bit gdb ?

ummm, what would be a simple way to check that?

Show quoted text 7 lines
>> 1) smart linking. Open the breakpoint window (from menu / view / debug) >> and >> clear the breakpoint, that is not in code. > > Ummm, I'm pretty sure that this code cannot be optimized-out. Is smart linking disabled in the options?

Yes, it turns out that smart linking was already disabled for this project all the time.

Please also try using the external linker -Xe

Great! =D This one worked!

Felipe Monteiro de Carvalho

Reply by email

Martin Frb
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote
on Wed, Dec 18, 2013 at 5:15 PM, Martin Frb wrote: > In that case, using the 32 bit gdb or 64 bit gdb ? ummm, what would be a simple way to check that?

It will show up in the log. But if -Xe solves it, then this is a problem with the build in linker in fpc.

So the log will not reveal anything else that would be useful.

> Please also try using the external linker -Xe Great! =D This one worked!

To be handed over to fpc team then. Problem with the build in linker.

Not necessary the same (since your code is used), but maybe related to http://bugs.freepascal.org/view.php?id=15281

Reply by email