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 4/9 v7] Introduce target/symbol.h


On 08/29/2014 02:51 PM, Gary Benson wrote:
> This introduces target/symbol.h.  This file declares a function that
> the shared code can use and that the clients must implement.  It also
> changes some shared code to use these functions.
> 
> This patch differs from the version I posted on August 1
> (https://sourceware.org/ml/gdb-patches/2014-08/msg00013.html) in that
> the new function has been renamed as find_minimal_symbol_address and
> that it lives in minsyms.c for GDB and a new file symbol.c for
> gdbserver rather than in target.c for both.

> 
> gdb/ChangeLog:
> 
> 	* target/symbol.h: New file.
> 	* Makefile.in (HFILES_NO_SRCDIR): Add target/symbol.h.
> 	* target.h: Include target/symbol.h.
> 	* minsyms.c (find_minimal_symbol_address): New function.
> 	* common/agent.c: Include target/symbol.h.
> 	[!GDBSERVER]: Don't include objfiles.h.
> 	(agent_look_up_symbols): Use find_minimal_symbol_address.

Thanks.  Though for the same reason in the old version calling
this new method target_foo looked wrong, because this is not interacting
with the target vector abstraction (it looks like something
for a client vector instead), I don't think this belongs in
target/ at all.  I think it should go in common/ instead
for now.

Related, this:

> 	* target.h: Include target/symbol.h.

looks wrong to me too, and it isn't clear to me why you needed it.

Thanks,
Pedro Alves


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