[PATCH 12/15] Add target/symbol.h, update users

Gary Benson gbenson@redhat.com
Wed Jul 16 10:38:00 GMT 2014


Tom Tromey wrote:
> >>>>> "Gary" == Gary Benson <gbenson@redhat.com> writes:
> 
> Gary> +/* See target/symbol.h.  */
> Gary> +
> Gary> +int
> Gary> +target_look_up_symbol (const char *name, CORE_ADDR *addr, void *data)
> 
> I never wrote these docs either...

I've done this:

+struct objfile;
+
+/* Find a symbol that matches NAME.  Limit the search to OBJFILE if
+   OBJFILE is non-NULL and the implementation supports limiting the
+   search to specific object files.  If a match is found, store the
+   matching symbol's address in ADDR and return nonzero.  Return zero
+   if no symbol matching NAME is found.  Raise an exception if OBJFILE
+   is non-NULL and the implementation does not support limiting
+   searches to specific object files.  */
+
 extern int target_look_up_symbol (const char *name, CORE_ADDR *addr,
 -                                 void *data);
 +                                 struct objfile *objfile);

Note that I changed the final parameter to struct objfile *objfile and
added a forward declaration which is never filled out in gdbserver and
added an assertion that objfile == NULL in gdbserver.  I don't know
whether you will agree with this but I'll change it back if you prefer.

Thanks,
Gary

--
http://gbenson.net/



More information about the Gdb-patches mailing list