On Fri, Jan 6, 2012 at 7:21 AM, Tom Tromey <tro...@redhat.com> wrote: >>>>>> "Sterling" == Sterling Augustine <saugust...@google.com> writes: > > Sterling> The enclosed patch to google/main contains certain small fixes > Sterling> for pubnames and pubtypes, which are now emitted completely > Sterling> and canonically. > > I am curious to know how you ensure that they are canonical.
"Ensure" is probably a too strong a word. But, I have been using a local python script that compares the names emitted by this patch with those as produced by gdb in the .gdb_index. (I suppose I should get it contributed, but it started out as a one off and would need some cleaning up to get contributable.) I also would have to figure out the rules on contributing python scripts. I know of two very small differences at this point, and it is debatable whether or not they should be fixed. First, the demangler doesn't use the underscores around "restrict", and GCC does. Second, I forget off-hand which way it goes, but one of them uses "short int" and the other just "short", and similarly for the other built-in integer types. I know of no other mismatches. This does bring up an issue that--to my limited knowledge anyway--isn't well addressed by the current structure of GCC vs binutils vs GDB: There aren't good ways to run full integration tests between the three components. Perhaps I am just ignorant. > > My recollection is that there are some differences between the names > emitted by g++ and those emitted by the demangler. Indeed, I have changed g++ in google/main to fix that. See the earlier patch that this one cleaned up, for example. I can dig up some > examples if you want; I think they are in GCC bugzilla somewhere. I have found a lot of them (some tests have to be pretty contorted to make it show up), but a pointer to bugzilla would be great. I expect we will contribute these test-cases as part of a patch to Gold in the near future. Sterling