This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog findvar.c gdbarch.c gdbarch. ...
- From: brobecke at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 5 Jun 2012 13:50:50 -0000
- Subject: src/gdb ChangeLog findvar.c gdbarch.c gdbarch. ...
CVSROOT: /cvs/src
Module name: src
Changes by: brobecke@sourceware.org 2012-06-05 13:50:50
Modified files:
gdb : ChangeLog findvar.c gdbarch.c gdbarch.h
gdbarch.sh objfiles.c objfiles.h symtab.c
Log message:
New "iterate_over_objfiles_in_search_order" gdbarch method.
This patch introduces the "iterate_over_objfiles_in_search_order"
gdbarch method, as well as its default implementation, and converts
the areas where it will matter to using this gdbarch method.
The default method implementation is the only one installed, and
the changes should have no functional impact in terms of behavior.
This only paves the way for the architectures that will need their
own version.
gdb/ChangeLog:
* gdbarch.sh: Add generation of
"iterate_over_objfiles_in_search_order_cb_ftype" typedef in
gdbarch.h. Add include of "objfiles.h" in gdbarch.c.
(iterate_over_objfiles_in_search_order): New gdbarch method.
* gdbarch.h, gdbarch.c: Regenerate.
* objfiles.h (default_iterate_over_objfiles_in_search_order):
Add declaration.
* objfiles.c (default_iterate_over_objfiles_in_search_order):
New function.
* symtab.c (lookup_symbol_aux_objfile): New function, extracted
out of lookup_symbol_aux_symtabs.
(lookup_symbol_aux_symtabs): Replace extracted-out code by
call to lookup_symbol_aux_objfile.
(struct global_sym_lookup_data): New type.
(lookup_symbol_global_iterator_cb): New function.
(lookup_symbol_global): Search for symbol using
gdbarch_iterate_over_objfiles_in_search_order and
lookup_symbol_global_iterator_cb.
* findvar.c (struct minsym_lookup_data): New type.
(minsym_lookup_iterator_cb): New function.
(default_read_var_value) [case LOC_UNRESOLVED]: Resolve the
symbol's address via gdbarch_iterate_over_objfiles_in_search_order
and minsym_lookup_iterator_cb.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14323&r2=1.14324
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/findvar.c.diff?cvsroot=src&r1=1.144&r2=1.145
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbarch.c.diff?cvsroot=src&r1=1.491&r2=1.492
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbarch.h.diff?cvsroot=src&r1=1.441&r2=1.442
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbarch.sh.diff?cvsroot=src&r1=1.540&r2=1.541
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/objfiles.c.diff?cvsroot=src&r1=1.139&r2=1.140
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/objfiles.h.diff?cvsroot=src&r1=1.91&r2=1.92
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/symtab.c.diff?cvsroot=src&r1=1.310&r2=1.311