This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] |
This fixes PR 19769, which is a problem with gcc emitting bad debug info for libjava, which in turn triggered a gdb internal error. This made it difficult to debug java code. The underlying problem is that if you had a global variable declared in an inline function, gcc could emit a global scope DIE that had an abstract origin pointing back to the declaration inside the inline function. This is wrong, and gdb understandably refused to accept it. This problem arose when we inlined the function. We would emit debug info for variables in the inlined function, with abstract origins pointing at the abstract instance of the inlined function. This also included the global variable declaration. The namespace support would then emit a global scope DIE for this global variable, with the abstract origin pointing at the abstract instance of the inlined function. Since we would have already emitted the proper DIE when handling the abstract instance, all we need to do is to modify the namespace support to ignore declarations with an abstract origin. This patch has been tested with an x86-64 linux bootstrap and make check. There were no regressions. This patch has also been tested with a gdb testsuite run. There were also no regressions. I have added this to both mainline and the gcc-4.0 branch. -- Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
Attachment:
patch.dwarf2.test
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |