This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Typedef'd method parameters [2/4]


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

I'll do a full review of this tomorrow, I ran out of time today.

Keith> There is one part of this that I am not particularly fond of, but
Keith> without a proper language in which to express overloaded concepts, the
Keith> only other choice is to overload a member of struct gsymbol or add
Keith> another into it. I've chosen in favor of not using more memory. Hence
Keith> the hacky check for a mangled symbol name in symbol_search_name.

This is pretty gross.

There are some bits available in struct general_symbol_info:

               struct general_symbol_info {
 /*   0   4 */    char * name
 /*   4   4 */    union {...} value
 /*   8   4 */    union {...} language_specific
 /*  12   1 */    enum language language
  /* XXX 8 bit hole, try to pack */
 /*  14   2 */    short int section
 /*  16   4 */    struct obj_section * obj_section
               } 

So, you could put a flag in there.
That would be a lot cleaner.

Keith> There is also one little cleanup snuck in here: compare_search_syms (a
Keith> comparator for qsort) was comparing SYMBOL_NATURAL_NAME of the two
Keith> symbols. It should be using SYMBOL_SEARCH_NAME.

If this can be exploited to find a bug, then I think it would be
reasonable to put it in separately as a bug fix with a test case.

Tom


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