aboutsummaryrefslogtreecommitdiff
path: root/gdb/alpha-nat.c
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-04-21 16:52:39 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-04-21 16:52:39 +0000
commitdc129d82386b3ae4a511f9f60a76ac481d33d304 (patch)
tree8f169296cfc5c4d9a425e852e9d686026ad05c22 /gdb/alpha-nat.c
parentd49d1e0a2f67889077fff8ad80e9ed5e43ff169f (diff)
downloadgdb-dc129d82386b3ae4a511f9f60a76ac481d33d304.zip
gdb-dc129d82386b3ae4a511f9f60a76ac481d33d304.tar.gz
gdb-dc129d82386b3ae4a511f9f60a76ac481d33d304.tar.bz2
* 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.
Diffstat (limited to 'gdb/alpha-nat.c')
-rw-r--r--gdb/alpha-nat.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index f7e565b..fbf8155 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 <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 (&registers[REGISTER_BYTE (V0_REGNUM)], core_reg_sect, 31 * 8);
+ memcpy (&registers[REGISTER_BYTE (ALPHA_V0_REGNUM)], core_reg_sect,
+ 31 * 8);
memcpy (&registers[REGISTER_BYTE (PC_REGNUM)], core_reg_sect + 31 * 8, 8);
- memset (&registers[REGISTER_BYTE (ZERO_REGNUM)], 0, 8);
- memset (&register_valid[V0_REGNUM], 1, 32);
+ memset (&registers[REGISTER_BYTE (ALPHA_ZERO_REGNUM)], 0, 8);
+ memset (&register_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);
}