From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Buettner To: Andrew Cagney , Nick Duffek Cc: kevinb@cygnus.com, gdb-patches@sources.redhat.com, Peter.Schauer@regent.e-technik.tu-muenchen.de Subject: Re: [RFA] xcoffread.c: handle -bbigtoc binaries Date: Thu, 12 Apr 2001 14:53:00 -0000 Message-id: <1010412214926.ZM17757@ocotillo.lan> References: <1010412191933.ZM17401@ocotillo.lan> <200104122005.f3CK59V00760@rtl.cygnus.com> <3AD61A7C.6FA3D78A@cygnus.com> X-SW-Source: 2001-04/msg00125.html 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