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: [PATCH] Fix up msymbol type of dll trampoline to mst_solib_trampoline


>>>>> "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


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