This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix up msymbol type of dll trampoline to mst_solib_trampoline
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Thu, 27 Jun 2013 14:42:02 -0600
- Subject: Re: [PATCH] Fix up msymbol type of dll trampoline to mst_solib_trampoline
- References: <1372043502-4618-1-git-send-email-yao at codesourcery dot com>
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> The rationale of this patch is to fix up the type of minimal symbol to
Yao> "mst_solib_trampoline" when reading the file if the minimal symbol is
Yao> a dll trampoline. We find that there is always a symbol "_impl_foo"
Yao> coexists with dll trampoline "foo" in the current minimal symbols red
Yao> in. Our approach is to collect all minimal symbols which name has
Yao> prefix "_imp_", remove the prefix, and find minimal symbols. If
Yao> found, it is a dll trampoline.
This seems reasonable to me.
Yao> + minimal symbols just red in by matching the minimal symbol name
s/red/read/
Yao> + char *buffer = xstrdup (SYMBOL_LINKAGE_NAME (msym_dll));
I don't think you need to copy the name here.
Yao> +/* Look for the minimal symbol which name is NAME. Return NULL if not
"whose name".
I think this comment needs to be expanded (and moved, see below).
It should at least mention that this only searches minsyms that are
currently being constructed. Otherwise it isn't clear why you would use
this function as opposed to lookup_minimal_symbol_and_objfile.
Yao> +struct minimal_symbol* prim_find_minimal_symbol (const char *name);
The comment should go here, the way it does for other functions in the
minsyms module.
Also, the first "*" is in the wrong place.
thanks,
Tom