This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DW_TAG_typedef indirection causes DW_AT_data_location to be ignored

On 28 Dec 2008, at 22:06, Jan Kratochvil wrote:

confirming object_address_get_data() has a problem it does not resolve
typedefs while looking for DW_AT_data_location there. I will send/ commit
a fix later these days.


As C does not use DW_AT_data_location and Fortran does not use DW_TAG_typedef
it would be nice to get later your patches/release for a proper gdb.pascal/
test for this case.

That's kind of complicated:
1) all this stuff is only being added to svn trunk of the Free Pascal Compiler right now, which will probably only be released by fall next year at the earliest (the next release will come from the fixes branch). The test program will probably also never compile with the GNU Pascal Compiler, as it does not fully support the Delphi dialect features I use in it and which require these Dwarf3 features (but I don't know if that is required).
2) we only really use DW_TAG_typedef on Mac OS X (I patched the Linux version of the compiler to generate the test case I made available); on other OSes we always directly point to the type entity itself. The reason that on Mac OS X the typedefs are used, is that its dsymutil program (which extracts all DWARF info from a program's object files and merges it in a single external bundle) throws away all unreferenced DWARF entities, and (Apple's fork of?) gdb only adds types with a typedef to the global scope. So I have to use the typedefs somehow there, or otherwise you cannot use any non-local types in expressions in gdb after using dsymutil.
3) Mac OS X' linker currently crashes when I set the DWARF version to 3 (even if I don't use any version 3 features). So I've locally patched my compiler to set the version to 2 when testing version 3 features on Mac OS X (and then it links fine and gdb doesn't complain either, fortunately).

So at this time, there is no way for a test to properly test things anywhere (on non-Mac OS X you don't get referenced typedefs, and on Mac OS X the linker crashes -- and in both cases, you need a recent svn checkout of FPC installed). I also don't have any experience with "expect", although I guess it shouldn't be that hard to cook something up based on existing tests.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]