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]

Re: [PATCH]: Fix PR debug/19124




On Mon, 27 Dec 2004, Richard Henderson wrote:

On Mon, Dec 27, 2004 at 09:27:08PM -0500, Daniel Berlin wrote:
The dwarf3 standard says we can't have location list entries where the
begin and end addresses are the same (except for the list terminator
entry, which is begin == 0 && end == 0).

What a suck-ass rule. Because,

Because we don't know what the hell is going to happen until the executable is loaded (assuming no self-modifying code self-modifies the debug info for us as well :P)


The actual text in querstion says "2. An ending address, again relative to the applicable base address of the compilation unit referencing this location list. It marks the first address past the end over which the location is valid. The ending address must be greater than the beginning address"



All this tells you is that there's an insn. It doesn't say that the insn expands to a non-zero number of assembly instructions. E.g.

asm ("" : "=r" (x) :"0"(x));

which has legitimate uses.  There are also insns that the backend
expands to zero instructions that exist to keep the optimizer happy.

But I guess there's not a whole lot you can do about this.

Nope.
We could always add 1 to the end address range, and have a "correct" answer too, if you prefer that (overlapping ranges are legal).
Or we could propose this as a defect to the dwarf3 standard.
Or we could make the linker discard "invalid" entries, and only generate this info if we know the linker supports discarding these entries.


Ughhhhhhhhhhhhhhhh. I hate all of these options except just saying "this is okay, we were wrong when we thought this was a good idea"
I think i'll go write this up as a defect and send it to the reflector, see what people think in the meanwhile.




r~



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