diff options
author | Paul Koning <paul_koning@dell.com> | 2015-10-19 15:16:46 -0400 |
---|---|---|
committer | Paul Koning <paul_koning@dell.com> | 2015-10-19 15:16:46 -0400 |
commit | 95ba86d5a482fc4de16a67253f0b6511cbb79504 (patch) | |
tree | e3c4cfb8fce593cf45f68d36c5d09f7f436706cd /gdb/linespec.c | |
parent | 3101915abf7ce1188e58c811e8c8096fae441e3c (diff) | |
download | gdb-95ba86d5a482fc4de16a67253f0b6511cbb79504.zip gdb-95ba86d5a482fc4de16a67253f0b6511cbb79504.tar.gz gdb-95ba86d5a482fc4de16a67253f0b6511cbb79504.tar.bz2 |
convert current_target to be a pointer
This converts current_target to be a pointer rather than a struct.
This is more efficient when we move to multi-target, because then we
can switch targets by simply changing the pointer.
I made this patch by running this:
perl -pi -e 's/¤t_target/current_target/g; s/current_target\./current_target->/g;' *.[chyl] */*.[chyl]
... and then fixing up the result minorly:
* Updating the definition and declaration of current_target
* Fixing a "sizeof"
* Initializing current_target
Built and regtested on x86-64 Fedora 20.
2014-07-29 Tom Tromey <tromey@redhat.com>
* target.c (current_target): Now a pointer.
(update_current_target): Use size of target_ops, not
current_target.
(initialize_targets): Initialize current_target.
* target.h (current_target): Now a pointer.
* auxv.c: Update.
* avr-tdep.c: Update.
* breakpoint.c: Update.
* corefile.c: Update.
* elfread.c: Update.
* eval.c: Update.
* frame.c: Update.
* gnu-v3-abi.c: Update.
* ia64-hpux-tdep.c: Update.
* ia64-tdep.c: Update.
* ia64-vms-tdep.c: Update.
* infcall.c: Update.
* infcmd.c: Update.
* infrun.c: Update.
* linespec.c: Update.
* linux-nat.c: Update.
* linux-tdep.c: Update.
* linux-thread-db.c: Update.
* mi/mi-main.c: Update.
* minsyms.c: Update.
* parse.c: Update.
* ppc-linux-nat.c: Update.
* ppc-linux-tdep.c: Update.
* procfs.c: Update.
* remote-m32r-sdi.c: Update.
* remote.c: Update.
* s390-linux-nat.c: Update.
* s390-linux-tdep.c: Update.
* sol-thread.c: Update.
* solib-aix.c: Update.
* solib-darwin.c: Update.
* solib-dsbt.c: Update.
* solib-ia64-hpux.c: Update.
* solib-irix.c: Update.
* solib-osf.c: Update.
* solib-spu.c: Update.
* solib-svr4.c: Update.
* solib-target.c: Update.
* solib.c: Update.
* sparc-tdep.c: Update.
* spu-tdep.c: Update.
* symfile.c: Update.
* target-descriptions.c: Update.
* target-memory.c: Update.
* target.c: Update.
* target.h: Update.
* tracepoint.c: Update.
* valops.c: Update.
* valprint.c: Update.
* value.c: Update.
* windows-tdep.c: Update.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r-- | gdb/linespec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c index b2233b9..3724537 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -3556,7 +3556,7 @@ minsym_found (struct linespec_state *self, struct objfile *objfile, /* The minimal symbol might point to a function descriptor; resolve it to the actual code address instead. */ - pc = gdbarch_convert_from_func_ptr_addr (gdbarch, sal.pc, ¤t_target); + pc = gdbarch_convert_from_func_ptr_addr (gdbarch, sal.pc, current_target); if (pc != sal.pc) sal = find_pc_sect_line (pc, NULL, 0); @@ -3573,7 +3573,7 @@ minsym_found (struct linespec_state *self, struct objfile *objfile, stay correct from the last find_pc_sect_line above. */ sal.pc = MSYMBOL_VALUE_ADDRESS (objfile, msymbol); sal.pc = gdbarch_convert_from_func_ptr_addr (gdbarch, sal.pc, - ¤t_target); + current_target); if (gdbarch_skip_entrypoint_p (gdbarch)) sal.pc = gdbarch_skip_entrypoint (gdbarch, sal.pc); } @@ -3665,7 +3665,7 @@ add_minsym (struct minimal_symbol *minsym, void *d) NULL, 0); sal.section = MSYMBOL_OBJ_SECTION (info->objfile, minsym); pc - = gdbarch_convert_from_func_ptr_addr (gdbarch, sal.pc, ¤t_target); + = gdbarch_convert_from_func_ptr_addr (gdbarch, sal.pc, current_target); if (pc != sal.pc) sal = find_pc_sect_line (pc, NULL, 0); @@ -3689,7 +3689,7 @@ add_minsym (struct minimal_symbol *minsym, void *d) struct gdbarch *gdbarch = get_objfile_arch (info->objfile); CORE_ADDR addr = gdbarch_convert_from_func_ptr_addr (gdbarch, BMSYMBOL_VALUE_ADDRESS (mo), - ¤t_target); + current_target); if (addr == BMSYMBOL_VALUE_ADDRESS (mo)) return; |