This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Typedef'd method parameters [2/4]
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 25 Apr 2011 15:06:26 -0600
- Subject: Re: [RFA] Typedef'd method parameters [2/4]
- References: <4DB09E75.20509@redhat.com>
>>>>> "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