On 19.01.2013 15:17, Martin wrote:
Since I don't know the fpc cdoebase, I can not check this myself.I suspect it is a gdb issue. But if it is not to much work, maybe someone who does know fpc dwarf generation can check that it is not fpc? I got the following source: type TFoo = array [0..191] of integer; and in gdb ptype TFoo Using dwarf, up to gdb 7.2 (inclusive) the result is ok. but 7.3 up reports array [0..-65] of LONGINT SO definitely something changed in GDB. But I do not know if the old or new gdb is right. --------- So my guess is fpc declares the index as byte sized type. If someone can confirm this, and that fpc declares it as unsigned in the dwarf info, then it is a gdb issue.
I don't know the dwarf format good enough, but the generation of debug information is (mostly?) located in the compiler/dbg*.pas files. Namely for dwarf you should look at dbgdwarf.pas and there at the class TDebugInfoDwarf of which probably the method appenddef_array is of interest for you.
Regards, Sven _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
