From dc129d82386b3ae4a511f9f60a76ac481d33d304 Mon Sep 17 00:00:00 2001 From: Jason Thorpe Date: Sun, 21 Apr 2002 16:52:39 +0000 Subject: * 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. --- gdb/alpha-nat.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'gdb/alpha-nat.c') diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c index f7e565b3003..fbf8155d68e 100644 --- a/gdb/alpha-nat.c +++ b/gdb/alpha-nat.c @@ -24,6 +24,9 @@ #include "gdbcore.h" #include "target.h" #include "regcache.h" + +#include "alpha-tdep.h" + #include #ifdef __linux__ #include @@ -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); } -- cgit v1.2.1