[fpc-devel] Re: weird interaction with gdb / stepping / 2.7.1

Martin lazarus at mfriebe.de
Wed May 15 13:01:27 CEST 2013

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

> 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?

On 14/05/2013 11:03, Martin wrote:
> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: versuchlein.tar.gz
Type: application/gzip
Size: 294976 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20130515/d80eb78f/attachment.gz>

More information about the fpc-devel mailing list