Sign in Join

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

Mailing lists / fpc-devel / 2013-05

weird interaction with gdb / stepping / 2.7.1

3 messages · 1 person · –

Reply by email Subscribe to this list Your subscription

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

Martin

I have 2 matching reports (but so far unable to reproduce myself)

- both are 64 bit
- at least one is linux and uses gdb 7.5.1
I believe the other is linux too, not sure what gdb, (and he tested on win (not sure 64 or 32bit) where it did not happen) [ this may point to a linker issue (maybe) ]

- They both state, that they did not use optimization, or smart linking

When stepping (step over) GDB suddenly stops in fpc_ansistring_copy (or other functions in the RTL that are called during the step)

I am seeking for any ideas....

I know it likely is to be something in GDB and needs to be asked there. But it appears to react to some diff bthat happened in fpc (2.6.x) seems not to trigger it).

And other than the fact that those functions are optimized, and do not have a full gdb detectable stackframe, there is nothing I could suspect....

possible: http://bugs.freepascal.org/view.php?id=14399

Reply by email

Martin
to Martin: I have 2 matching reports (but so far unable to reproduce myself) - both are 64 bit - at…

I got the attached sample from one of the 2people. With the instructions below:

Show quoted text 5 lines
Attached a small program that shows ME the problem Included is the generated laz.log. My breakpoint is on line 39 in unit1.pas As soon as I hit the AnsiSTRING variable named xstring the debugging jumps to FOnClick(Self) in control.inc

I have no 64 bit linux to test myself. I therefore do not know, if it will indeed reproduce.
According to the reporter, it happens with stabs and dwarf.

I am not sure which versions of gdb (the reporter had 7.5.1) Testing with an upgraded 7.5.9 or 7.6 is of limited use, since both crash easily if debugging fpc generated apps.

---------------
If the report is correct, then apps generated with fpc 2.7.1 may not be debug-able in gdb (unless you want to step through ansistring internals)

Maybe someone can give it a try?

And if it is reproducible, find if it is fpc or gdb?

Martin wrote 26 lines
I have 2 matching reports (but so far unable to reproduce myself) - both are 64 bit - at least one is linux and uses gdb 7.5.1 I believe the other is linux too, not sure what gdb, (and he tested on win (not sure 64 or 32bit) where it did not happen) [ this may point to a linker issue (maybe) ] - They both state, that they did not use optimization, or smart linking When stepping (step over) GDB suddenly stops in fpc_ansistring_copy (or other functions in the RTL that are called during the step) I am seeking for any ideas.... I know it likely is to be something in GDB and needs to be asked there. But it appears to react to some diff bthat happened in fpc (2.6.x) seems not to trigger it). And other than the fact that those functions are optimized, and do not have a full gdb detectable stackframe, there is nothing I could suspect.... possible: http://bugs.freepascal.org/view.php?id=14399

Reply by email