[fpc-devel] Dwar2 changed?

Martin fpc at mfriebe.de
Thu Jan 13 15:32:20 CET 2011

On 13/01/2011 14:14, Joost van der Sluis wrote:
>>>>    >>   TCmdLineDebugger.SendCmdLn "-data-evaluate-expression
>>>> ^^shortstring(^POINTER($eax)^+12)^^"
>>>> <<   TCmdLineDebugger.ReadLn "^done,value="#0<repeats 20 times>""
>>>> <<   TCmdLineDebugger.ReadLn "(gdb) "
>>> You do realize that this is an hack? (I partly wrote it)
>>> It could also be that the location of the exception-name has been
>>> changed by something. This hack doesn't use any debug-information. Only
>>> the definitions of a shortstring  and pointer.
>> I do, yes...
>> But:
>> - I know eax is correct, because the fall-back (using ^char instead of
>> shortstring works:
>>     -data-evaluate-expression ^char(^pointer(^POINTER($eax)^+12)^+1)
The fallback does work. So the data is in the correct location

>> - The fallback is usually needed, if shortstring is not in the
>> symboltable at all, but then the expression gives an error. Now the
>> expression returns data, but the wrong data...
> Ehh? Does the fallback work or not?
yes, but it was not triggered, because the first query did not return a 
gdbg-error, there just was no usable data.
I added the data check, so now the fallback is triggered, and it works.

>> Strange, the same fpc on windows still works perfect with half a dozen
>> different fpc versions (6.3 to 7.2)
> So it could be a gdb-problem?
possible, yes, strange though

afaik "shortstring" is encoded as a record (len; chars), so maybe 
something in there...

>> It is also possible that my previous fpc trunk on my fedora box was
>> build with some debug ino, and now I forgot, and just build it... but
>> again on windows I tested with fpc 2.4.2 and trunc, both build with
>> several different configs...
> You lost me. Do I still have to do something?

probably not, because there is not enough info yet to start on something.

I was just asking if something obvious springs to mind....

I currently don't have the time to go through all the options and see 
what works and what not.
e.g compile rtl with/whitout -gs / -gw
or check older versions, ...

More information about the fpc-devel mailing list