aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-08-26 17:21:29 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-08-26 17:21:29 +0000
commit1cf3db46a678ced9d729572de9232fab9c00350d (patch)
treeba64fdef4e9d5145f65c49a38a509de2c24ec653 /gdb/remote.c
parent7da4f750f81ddb655fe4b96f779b70f6086c2aa4 (diff)
downloadgdb-1cf3db46a678ced9d729572de9232fab9c00350d.zip
gdb-1cf3db46a678ced9d729572de9232fab9c00350d.tar.gz
gdb-1cf3db46a678ced9d729572de9232fab9c00350d.tar.bz2
* gdbarch.sh (target_gdbarch): New global variable.
(deprecated_current_gdbarch_select_hack): Set it. * gdbarch.c, gdbarch.h: Regenerate. * arch-utils.c (gdbarch_update_p): Use target_gdbarch instead of current_gdbarch. * target-descriptions.c (target_find_description): Likewise. * arm-tdep.c (arm_update_current_architecture): Likewise. (show_fp_model, arm_show_abi, arm_show_fallback_mode, arm_show_force_mode): Likewise. * mips-tdep.c (show_mask_address, show_mipsfpu_command, show_mips_abi): Likewise. * mep-tdep.c (me_module_register_set, current_me_module): Likewise. * target.c (target_translate_tls_address): Use target_gdbarch instead of current_gdbarch. * remote.c (struct packet_reg): Likewise. (get_remote_arch_state, packet_reg_from_regnum, packet_reg_from_pnum, remote_check_symbols, remote_wait, remote_address_masked, remote_insert_breakpoint, remote_insert_hw_breakpoint, remote_read_description): Likewise. * remote-m32r-sdi.c (m32r_resume, m32r_wait): Likewise. * remote-mips.c (mips_open, mips_common_breakpoint): Likewise. * cris-tdep.c (cris_can_use_hardware_watchpoint): Likewise. * solib.c (solib_open, solib_map_sections, solib_read_symbols, solib_add, info_sharedlibrary_command, solib_address, solib_create_inferior_hook, in_solib_dynsym_resolve_code, solib_global_lookup): Likewise. * solib-frv.c (enable_break2, frv_relocate_main_executable): Likewise. * solib-irix.c (irix_current_sos, irix_open_symbol_file_object): Likewise. * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise. * solib-svr4.c (exec_entry_point, enable_break, svr4_free_so, set_solib_svr4_fetch_link_map_offsets, svr4_fetch_link_map_offsets): Likewise. * nto-tdep.c (nto_find_and_open_solib, nto_init_solib_absolute_prefix, nto_truncate_ptr): Likewise. * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Likewise.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index af3b0b8..0847d67 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -274,9 +274,9 @@ struct packet_reg
long regnum; /* GDB's internal register number. */
LONGEST pnum; /* Remote protocol register number. */
int in_g_packet; /* Always part of G packet. */
- /* long size in bytes; == register_size (current_gdbarch, regnum);
+ /* long size in bytes; == register_size (target_gdbarch, regnum);
at present. */
- /* char *name; == gdbarch_register_name (current_gdbarch, regnum);
+ /* char *name; == gdbarch_register_name (target_gdbarch, regnum);
at present. */
};
@@ -309,7 +309,7 @@ static struct gdbarch_data *remote_gdbarch_data_handle;
static struct remote_arch_state *
get_remote_arch_state (void)
{
- return gdbarch_data (current_gdbarch, remote_gdbarch_data_handle);
+ return gdbarch_data (target_gdbarch, remote_gdbarch_data_handle);
}
/* Fetch the global remote target state. */
@@ -445,7 +445,7 @@ get_remote_packet_size (void)
static struct packet_reg *
packet_reg_from_regnum (struct remote_arch_state *rsa, long regnum)
{
- if (regnum < 0 && regnum >= gdbarch_num_regs (current_gdbarch))
+ if (regnum < 0 && regnum >= gdbarch_num_regs (target_gdbarch))
return NULL;
else
{
@@ -459,7 +459,7 @@ static struct packet_reg *
packet_reg_from_pnum (struct remote_arch_state *rsa, LONGEST pnum)
{
int i;
- for (i = 0; i < gdbarch_num_regs (current_gdbarch); i++)
+ for (i = 0; i < gdbarch_num_regs (target_gdbarch); i++)
{
struct packet_reg *r = &rsa->regs[i];
if (r->pnum == pnum)
@@ -2400,7 +2400,7 @@ remote_check_symbols (struct objfile *objfile)
/* If this is a function address, return the start of code
instead of any data function descriptor. */
- sym_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
sym_addr,
&current_target);
@@ -3588,10 +3588,10 @@ Packet: '%s'\n"),
phex_nz (pnum, 0), p, buf);
fieldsize = hex2bin (p, regs,
- register_size (current_gdbarch,
+ register_size (target_gdbarch,
reg->regnum));
p += 2 * fieldsize;
- if (fieldsize < register_size (current_gdbarch,
+ if (fieldsize < register_size (target_gdbarch,
reg->regnum))
warning (_("Remote reply is too short: %s"), buf);
regcache_raw_supply (get_current_regcache (),
@@ -4105,7 +4105,7 @@ remote_address_masked (CORE_ADDR addr)
int address_size = remote_address_size;
/* If "remoteaddresssize" was not set, default to target address size. */
if (!address_size)
- address_size = gdbarch_addr_bit (current_gdbarch);
+ address_size = gdbarch_addr_bit (target_gdbarch);
if (address_size > 0
&& address_size < (sizeof (ULONGEST) * 8))
@@ -5373,8 +5373,7 @@ remote_insert_breakpoint (struct bp_target_info *bp_tgt)
char *p;
int bpsize;
- gdbarch_breakpoint_from_pc
- (current_gdbarch, &addr, &bpsize);
+ gdbarch_breakpoint_from_pc (target_gdbarch, &addr, &bpsize);
rs = get_remote_state ();
p = rs->buf;
@@ -5576,7 +5575,7 @@ remote_insert_hw_breakpoint (struct bp_target_info *bp_tgt)
instruction, even though we aren't inserting one ourselves. */
gdbarch_breakpoint_from_pc
- (current_gdbarch, &bp_tgt->placed_address, &bp_tgt->placed_size);
+ (target_gdbarch, &bp_tgt->placed_address, &bp_tgt->placed_size);
if (remote_protocol_packets[PACKET_Z1].support == PACKET_DISABLE)
return -1;
@@ -6505,7 +6504,7 @@ static const struct target_desc *
remote_read_description (struct target_ops *target)
{
struct remote_g_packet_data *data
- = gdbarch_data (current_gdbarch, remote_g_packet_data_handle);
+ = gdbarch_data (target_gdbarch, remote_g_packet_data_handle);
if (!VEC_empty (remote_g_packet_guess_s, data->guesses))
{