mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-25 19:14:52 +08:00
2007-10-08 Markus Deuling <deuling@de.ibm.com>
* alpha-tdep.c (alpha_register_reggroup_p): Replace current_gdbarch by gdbarch. * alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise. (alpha_sigtramp_frame_unwind_cache, alpha_sigtramp_frame_this_id) (alpha_sigtramp_frame_sniffer, alpha_next_pc): Use get_regcache_arch or get_frame_arch to get at the current architecture by regcache or by frame, respectively. * alpha-nat.c (fetch_osf_core_registers): Likewise.
This commit is contained in:
parent
ad010def89
commit
ec7cc0e816
@ -1,3 +1,14 @@
|
||||
2007-10-08 Markus Deuling <deuling@de.ibm.com>
|
||||
|
||||
* alpha-tdep.c (alpha_register_reggroup_p): Replace current_gdbarch by
|
||||
gdbarch.
|
||||
* alpha-linux-nat.c (alpha_linux_register_u_offset): Likewise.
|
||||
(alpha_sigtramp_frame_unwind_cache, alpha_sigtramp_frame_this_id)
|
||||
(alpha_sigtramp_frame_sniffer, alpha_next_pc): Use get_regcache_arch or
|
||||
get_frame_arch to get at the current architecture by regcache or by
|
||||
frame, respectively.
|
||||
* alpha-nat.c (fetch_osf_core_registers): Likewise.
|
||||
|
||||
2007-10-08 Markus Deuling <deuling@de.ibm.com>
|
||||
|
||||
* dwarf2-frame.c (read_reg, execute_cfa_program, dwarf2_frame_cache)
|
||||
|
@ -84,14 +84,14 @@ fill_fpregset (const struct regcache *regcache,
|
||||
static CORE_ADDR
|
||||
alpha_linux_register_u_offset (struct gdbarch *gdbarch, int regno, int store_p)
|
||||
{
|
||||
if (regno == gdbarch_pc_regnum (current_gdbarch))
|
||||
if (regno == gdbarch_pc_regnum (gdbarch))
|
||||
return PC;
|
||||
if (regno == ALPHA_UNIQUE_REGNUM)
|
||||
return ALPHA_UNIQUE_PTRACE_ADDR;
|
||||
if (regno < gdbarch_fp0_regnum (current_gdbarch))
|
||||
if (regno < gdbarch_fp0_regnum (gdbarch))
|
||||
return GPR_BASE + regno;
|
||||
else
|
||||
return FPR_BASE + regno - gdbarch_fp0_regnum (current_gdbarch);
|
||||
return FPR_BASE + regno - gdbarch_fp0_regnum (gdbarch);
|
||||
}
|
||||
|
||||
void _initialialize_alpha_linux_nat (void);
|
||||
|
@ -49,6 +49,7 @@ fetch_osf_core_registers (struct regcache *regcache,
|
||||
char *core_reg_sect, unsigned core_reg_size,
|
||||
int which, CORE_ADDR reg_addr)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
int regno;
|
||||
int addr;
|
||||
int bad_reg = -1;
|
||||
@ -87,7 +88,7 @@ fetch_osf_core_registers (struct regcache *regcache,
|
||||
|
||||
for (regno = 0; regno < ALPHA_NUM_REGS; regno++)
|
||||
{
|
||||
if (gdbarch_cannot_fetch_register (current_gdbarch, regno))
|
||||
if (gdbarch_cannot_fetch_register (gdbarch, regno))
|
||||
{
|
||||
regcache_raw_supply (regcache, regno, NULL);
|
||||
continue;
|
||||
@ -112,7 +113,7 @@ fetch_osf_core_registers (struct regcache *regcache,
|
||||
if (bad_reg >= 0)
|
||||
{
|
||||
error (_("Register %s not found in core file."),
|
||||
gdbarch_register_name (current_gdbarch, bad_reg));
|
||||
gdbarch_register_name (gdbarch, bad_reg));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,8 +114,8 @@ alpha_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||
{
|
||||
/* Filter out any registers eliminated, but whose regnum is
|
||||
reserved for backward compatibility, e.g. the vfp. */
|
||||
if (gdbarch_register_name (current_gdbarch, regnum) == NULL
|
||||
|| *gdbarch_register_name (current_gdbarch, regnum) == '\0')
|
||||
if (gdbarch_register_name (gdbarch, regnum) == NULL
|
||||
|| *gdbarch_register_name (gdbarch, regnum) == '\0')
|
||||
return 0;
|
||||
|
||||
if (group == all_reggroup)
|
||||
@ -763,7 +763,7 @@ alpha_sigtramp_frame_unwind_cache (struct frame_info *next_frame,
|
||||
info = FRAME_OBSTACK_ZALLOC (struct alpha_sigtramp_unwind_cache);
|
||||
*this_prologue_cache = info;
|
||||
|
||||
tdep = gdbarch_tdep (current_gdbarch);
|
||||
tdep = gdbarch_tdep (get_frame_arch (next_frame));
|
||||
info->sigcontext_addr = tdep->sigcontext_addr (next_frame);
|
||||
|
||||
return info;
|
||||
@ -807,7 +807,7 @@ alpha_sigtramp_frame_this_id (struct frame_info *next_frame,
|
||||
/* If we have dynamic signal trampolines, find their start.
|
||||
If we do not, then we must assume there is a symbol record
|
||||
that can provide the start address. */
|
||||
tdep = gdbarch_tdep (current_gdbarch);
|
||||
tdep = gdbarch_tdep (get_frame_arch (next_frame));
|
||||
if (tdep->dynamic_sigtramp_offset)
|
||||
{
|
||||
int offset;
|
||||
@ -880,6 +880,7 @@ static const struct frame_unwind alpha_sigtramp_frame_unwind = {
|
||||
static const struct frame_unwind *
|
||||
alpha_sigtramp_frame_sniffer (struct frame_info *next_frame)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (next_frame);
|
||||
CORE_ADDR pc = frame_pc_unwind (next_frame);
|
||||
char *name;
|
||||
|
||||
@ -889,14 +890,14 @@ alpha_sigtramp_frame_sniffer (struct frame_info *next_frame)
|
||||
|
||||
/* We shouldn't even bother to try if the OSABI didn't register a
|
||||
sigcontext_addr handler or pc_in_sigtramp hander. */
|
||||
if (gdbarch_tdep (current_gdbarch)->sigcontext_addr == NULL)
|
||||
if (gdbarch_tdep (gdbarch)->sigcontext_addr == NULL)
|
||||
return NULL;
|
||||
if (gdbarch_tdep (current_gdbarch)->pc_in_sigtramp == NULL)
|
||||
if (gdbarch_tdep (gdbarch)->pc_in_sigtramp == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Otherwise we should be in a signal frame. */
|
||||
find_pc_partial_function (pc, &name, NULL, NULL);
|
||||
if (gdbarch_tdep (current_gdbarch)->pc_in_sigtramp (pc, name))
|
||||
if (gdbarch_tdep (gdbarch)->pc_in_sigtramp (pc, name))
|
||||
return &alpha_sigtramp_frame_unwind;
|
||||
|
||||
return NULL;
|
||||
@ -1441,7 +1442,7 @@ alpha_next_pc (struct frame_info *frame, CORE_ADDR pc)
|
||||
case 0x33: /* FBLE */
|
||||
case 0x32: /* FBLT */
|
||||
case 0x35: /* FBNE */
|
||||
regno += gdbarch_fp0_regnum (current_gdbarch);
|
||||
regno += gdbarch_fp0_regnum (get_frame_arch (frame));
|
||||
}
|
||||
|
||||
rav = get_frame_register_signed (frame, regno);
|
||||
|
Loading…
Reference in New Issue
Block a user