This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: struct environment
On 10 Sep 2002 17:25:56 -0700, David Carlton <carlton@math.Stanford.EDU> said:
> sym_found = sym;
> if (SYMBOL_CLASS (sym) != LOC_ARG &&
> SYMBOL_CLASS (sym) != LOC_LOCAL_ARG &&
> SYMBOL_CLASS (sym) != LOC_REF_ARG &&
> SYMBOL_CLASS (sym) != LOC_REGPARM &&
> SYMBOL_CLASS (sym) != LOC_REGPARM_ADDR &&
> SYMBOL_CLASS (sym) != LOC_BASEREG_ARG)
> {
> break;
> }
> is that if expression an attempt to make sure that function
> arguments whose names are shadowed by local variables don't get
> returned?
Ah, I missed an earlier comment:
/* Note that parameter symbols do not always show up last in the
list; this loop makes sure to take anything else other than
parameter symbols first; it only uses parameter symbols as a
last resort. Note that this only takes up extra computation
time on a match. */
So it seems that my guess about the meaning of that 'if' expression is
correct. I wish I understood why parameter symbols don't always show
up last in the list, though.
David Carlton
carlton@math.stanford.edu