This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] xcoffread.c: handle -bbigtoc binaries
On Apr 12, 5:13pm, Andrew Cagney wrote:
> Kevin, I guess you're calling this an obvious fix?
No. I don't regard this as obvious. In fact, when I first heard of
this change (a couple of days ago), I had some concerns. But I've
been following some internal (Red Hat) discussion regarding this
change and it seems okay to me now.
I was approving Nick's patch as one of the AIX maintainers. If I've
stepped on someone's toes, I apologize. If someone feels that this
change demands more discussion, I'll ask Nick to revert it until a
consensus is reached.
> Anyway, the comment:
>
> + /* If symbol name starts with ".$" or "$", ignore it.
>
> doesn't match the code.
>
> + if (namestring[0] == '$' || namestring[0] == '@'
If you read the entire comment and the entire if-condition, I believe
it's covered...
/* If symbol name starts with ".$" or "$", ignore it.
A symbol like "@FIX1" introduces a section for -bbigtoc jump
tables, which contain anonymous linker-generated code.
Ignore those sections to avoid "pc 0x... in read in psymtab,
but not in symtab" warnings from find_pc_sect_symtab. */
if (namestring[0] == '$' || namestring[0] == '@'
|| (namestring[0] == '.' && namestring[1] == '$'))
break;
Though I admit that when I first read the patch, I was puzzled too.
Perhaps it would be clearer if the first line of the comment were
revised to read as follows...
/* If symbol name starts with ".$", "$", or "@", ignore it.
?
BTW, I should add that I appreciate Nick's additional commentary
regarding the reason for ignoring the "@" symbols. I only wish the
author of the original comment would've done the same for the ".$" and
"$" prefixes.
Kevin