* alpha-tdep.h: New file. Includes several Alpha target constants
taken from... * config/alpha/tm-alpha.h: ...here. Remove macros that we now let gdbarch deal with. (GDB_MULTI_ARCH): Define as GDB_MULTI_ARCH_PARTIAL. * Makefile.in (alpha-nat.o): Add alpha-tdep.h and $(BFD_SRC)/elf-bfd to dependency list. * alpha-nat.c: Include alpha-tdep.h. Update for adjusted Alpha target register names. * alphabsd-nat.c: Likewise. * alpha-tdep.c: Include alpha-tdep.h. Update for adjusted Alpha target register names. Make serveral routines static. (alpha_get_saved_register): New function. (alpha_abi_names): New. (process_note_abi_tag_sections): New function. (get_elfosabi): New function. (alpha_gdbarch_init): New function. (alpha_dump_tdep): New function. (_initialize_alpha_tdep): Register alpha_gdbarch_init.
This commit is contained in:
parent
d49d1e0a2f
commit
dc129d8238
7 changed files with 606 additions and 379 deletions
|
@ -24,6 +24,9 @@
|
|||
#include "gdbcore.h"
|
||||
#include "target.h"
|
||||
#include "regcache.h"
|
||||
|
||||
#include "alpha-tdep.h"
|
||||
|
||||
#include <sys/ptrace.h>
|
||||
#ifdef __linux__
|
||||
#include <asm/reg.h>
|
||||
|
@ -62,7 +65,7 @@ get_longjmp_target (CORE_ADDR *pc)
|
|||
CORE_ADDR jb_addr;
|
||||
char raw_buffer[MAX_REGISTER_RAW_SIZE];
|
||||
|
||||
jb_addr = read_register (A0_REGNUM);
|
||||
jb_addr = read_register (ALPHA_A0_REGNUM);
|
||||
|
||||
if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, raw_buffer,
|
||||
sizeof (CORE_ADDR)))
|
||||
|
@ -171,10 +174,11 @@ fetch_elf_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
|||
else
|
||||
{
|
||||
/* The General Registers. */
|
||||
memcpy (®isters[REGISTER_BYTE (V0_REGNUM)], core_reg_sect, 31 * 8);
|
||||
memcpy (®isters[REGISTER_BYTE (ALPHA_V0_REGNUM)], core_reg_sect,
|
||||
31 * 8);
|
||||
memcpy (®isters[REGISTER_BYTE (PC_REGNUM)], core_reg_sect + 31 * 8, 8);
|
||||
memset (®isters[REGISTER_BYTE (ZERO_REGNUM)], 0, 8);
|
||||
memset (®ister_valid[V0_REGNUM], 1, 32);
|
||||
memset (®isters[REGISTER_BYTE (ALPHA_ZERO_REGNUM)], 0, 8);
|
||||
memset (®ister_valid[ALPHA_V0_REGNUM], 1, 32);
|
||||
register_valid[PC_REGNUM] = 1;
|
||||
}
|
||||
}
|
||||
|
@ -227,7 +231,7 @@ supply_gregset (gdb_gregset_t *gregsetp)
|
|||
supply_register (PC_REGNUM, (char *) (regp + 31));
|
||||
|
||||
/* Fill inaccessible registers with zero. */
|
||||
supply_register (ZERO_REGNUM, zerobuf);
|
||||
supply_register (ALPHA_ZERO_REGNUM, zerobuf);
|
||||
supply_register (FP_REGNUM, zerobuf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue