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 12/15] Add target/symbol.h, update users


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/


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