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]

Re: dw2 stack info does not exactly following spec


Richard Henderson <rth@redhat.com> writes:

> On Mon, Apr 30, 2001 at 02:45:36PM -0700, Zhang, Yingwei wrote:
> > As you mentioned earlier, the unwinding information does not use LEB128
> > encoding on address and offsets. Are you planning to leave as is or you are
> > going to fix them later? 
> 
> You're slightly confused.  The .debug_frame/.eh_frame information
> can and does use leb128 encodings.  GAS knows how to re-code this
> information for compactness.  If you're not using GAS, you get a
> less compact but equally correct form.
> 
> I think you're thinking of the Language Specific Data Area, which
> also wants to use leb128 offsets.  In this case we use the .uleb128
> assembler directive when it is available.
> 
> In either case, there is enough meta data to discover which encoding
> is being used.  The readers should be compatible whichever encoding
> is used.
> 
> > The document said stack unwind info should be in .debug_frame section. But
> > it is in .eh_frame section. Does this mean that it is EH specific data
> > structure and debugger does not use it? 
> 
> The debugger _could_ use it.  There are two extremely minor differences
> in the format to cope with load-time addresses vs in-file offsets.
> 
> But at present GDB doesn't even use .debug_frame, so it's moot.

Not for long.
I have patches to make it rea .debug_frame, and use the cfa info.
It matches up the cfa info to the current pc, and uses it in
place of the target dependent scanning to find arguments and whatnot.

It's part of the new dwarf2 reader. 
You didn't think i did things like make GCC generate .debug_loc
without making gdb use it, right? 
(I patched my gcc to make it always generate debug_frame, instead of
just doing it on MIPS).

I'll be submitting the new dwarf2 reader for gdb as soon as I can
fix the runtime evaluation of dwarf2 location expressions on x86.

> 
> 
> r~

-- 
"Last night, I walked up to this beautiful woman in a bar and
asked her, "Do you live around here often?"  She said, "You're
wearing two different colored socks."  I said, "Yes, but to me
they're the same because I go by thickness."  Then she asked,
"How do you feel?"  and I said, "Well, you know when you're
sitting on a chair and you lean back so you're just on two legs
then you lean too far and you almost fall over but at the last
second you catch yourself?  I feel like that all the time."
"-Steven Wright


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