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: [PATCH]: Add support for outputting dwarf2 location lists


Jason Merrill <jason_merrill@redhat.com> writes:

> >>>>> "Daniel" == Daniel Berlin <dan@www.cgsoftware.com> writes:
> 
> > On 19 Apr 2001, Jason Merrill wrote:
> 
> >> Please add the 2.1 support soon; otherwise this is of limited utility for
> >> C++, since we often have functions in other sections.
> 
> > Well, here's the thing.
> > I was going to add it before submitting it, since it's not all that
> > difficult, but i noticed that the low_pc and high_pc attributes are always
> > based on the text section label as well.
> 
> Er, yes.  What else would they be based on?
You say above "We often have functions in other sections".

What are the low_pc and high_pc of those functions based on?


> Note that they are never generated if there are functions in other
> sections, as specified by the standard.
2.1 says all subroutines  either have DW_AT_low_pc and high_pc
attributes, if the range is contiguous, or a DW_AT_ranges attribute, if it's a non-contiguous
range of addresses.
It mentions nothing of sections. I don't remember 2.0 mentioning
anything about sections iether.

I don't have 2.0 handy to compare (though DW_AT_ranges is new, IIRC).

> 
> > Once I saw that, i didn't see much point in doing it right away, since if
> > you had a function in a seperate place, it wouldn't work anyway.
> 
> Why not?
Because we don't generate low_pc and high_pc attributes, or a
DW_AT_ranges attribute.


If GDB doesn't know where the function is, how would it help for it to
know where the variables in the function are?

> 
> Jason

-- 
"A while ago, I went skiing in England.  It was a rare package:
two weeks in England, one night in Connecticut, two weeks in
England.  I said, "Yes, I'll take it."  I got on this chairlift
with this guy I didn't know.  We went halfway up the mountain
without saying a word.  Then he turned to me and said, "You
know, this is the first time I've gone skiing in ten years."  I
said, "Why did you take such a long time off?"  He said, "I was
in prison.  Want to know why?"  I said, "Not really.  Well, you
better tell me why."  He said, "I pushed a total stranger off a
Ferris wheel."  I said, "I remember you."
"-Steven Wright


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