From 56c5a93512dec53231a6901c3313fa755ee02604 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Wed, 13 Jun 2007 17:30:01 +0000 Subject: 2007-06-13 Markus Deuling * gdbarch.sh (TARGET_PTR_BIT): Replace with gdbarch_ptr_bit. * solib-svr4.c (svr4_truncate_ptr): Likewise. * solib-pa64.c (read_dynamic_info): Likewise. * solib-legacy.c (legacy_svr4_fetch_link_map_offsets): Likewise. * solib.c (info_sharedlibrary_command): Likewise. * s390-nat.c (SUBOFF): Likewise. * p-valprint.c (pascal_val_print): Likewise. * procfs.c (info_proc_mappings): Likewise. * printcmd.c (decode_format): Likewise. * nto-tdep.c (nto_truncate_ptr): Likewise. * mips-linux-tdep.c (mips_linux_get_longjmp_target) (mips64_linux_get_longjmp_target): Likewise. * m68k-tdep.c (m68k_get_longjmp_target): Likewise. * jv-valprint.c (java_value_print): Likewise. * jv-lang.c (get_java_object_header_size): Likewise. * hppa-tdep.c (skip_prologue_hard_way, hppa_frame_cache): Likewise. * hppa-hpux-tdep.c (hppa_hpux_skip_trampoline_code) (hppa_hpux_unwind_adjust_stub): Likewise. * gnu-v3-abi.c (build_gdb_vtable_type): Likewise. * gdbtypes.c (make_pointer_type, make_reference_type) (smash_to_memberptr_type): Likewise. * gdbarch.c, gdbarch.h: Regenerate. --- gdb/mips-linux-tdep.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'gdb/mips-linux-tdep.c') diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index 1c612464b82..8b851f3467a 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -54,16 +54,19 @@ static int mips_linux_get_longjmp_target (CORE_ADDR *pc) { CORE_ADDR jb_addr; - char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT]; + char buf[gdbarch_ptr_bit (current_gdbarch) / TARGET_CHAR_BIT]; jb_addr = read_register (MIPS_A0_REGNUM); if (target_read_memory (jb_addr - + MIPS_LINUX_JB_PC * MIPS_LINUX_JB_ELEMENT_SIZE, - buf, TARGET_PTR_BIT / TARGET_CHAR_BIT)) + + MIPS_LINUX_JB_PC * MIPS_LINUX_JB_ELEMENT_SIZE, + buf, + gdbarch_ptr_bit (current_gdbarch) / TARGET_CHAR_BIT)) return 0; - *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT); + *pc = extract_unsigned_integer (buf, + gdbarch_ptr_bit (current_gdbarch) + / TARGET_CHAR_BIT); return 1; } @@ -245,16 +248,19 @@ static int mips64_linux_get_longjmp_target (CORE_ADDR *pc) { CORE_ADDR jb_addr; - void *buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT); - int element_size = TARGET_PTR_BIT == 32 ? 4 : 8; + void *buf = alloca (gdbarch_ptr_bit (current_gdbarch) / TARGET_CHAR_BIT); + int element_size = gdbarch_ptr_bit (current_gdbarch) == 32 ? 4 : 8; jb_addr = read_register (MIPS_A0_REGNUM); if (target_read_memory (jb_addr + MIPS64_LINUX_JB_PC * element_size, - buf, TARGET_PTR_BIT / TARGET_CHAR_BIT)) + buf, + gdbarch_ptr_bit (current_gdbarch) / TARGET_CHAR_BIT)) return 0; - *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT); + *pc = extract_unsigned_integer (buf, + gdbarch_ptr_bit (current_gdbarch) + / TARGET_CHAR_BIT); return 1; } -- cgit v1.2.1