aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-pinsn.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1993-01-15 00:06:50 +0000
committerStu Grossman <grossman@cygnus>1993-01-15 00:06:50 +0000
commitfa9265e55deac681e0664cbea1c4367f81cadc68 (patch)
tree9ffbeea1837f03eb79e4fbf80ed448b7d7ff91a0 /gdb/hppa-pinsn.c
parent30ea4a2d918f78e39ce54619fe08d1f26909e10a (diff)
downloadgdb-fa9265e55deac681e0664cbea1c4367f81cadc68.zip
gdb-fa9265e55deac681e0664cbea1c4367f81cadc68.tar.gz
gdb-fa9265e55deac681e0664cbea1c4367f81cadc68.tar.bz2
* hppa-pinsn.c (print_insn): Use read_memory_integer, instead of
read_memory to get byte order right. * hppah-tdep.c (find_unwind_info): Don't read in unwind info anymore. This is done in paread.c now. We expect unwind info to hang off of objfiles, and search all of the objfiles when until we find a match. * (skip_trampoline_code): Cast arg to target_read_memory. * objfiles.h (struct objfile): Add new field obj_private to hold per object file private data (unwind info in this case). * paread.c (read_unwind_info): New routine to read unwind info for the objfile. This data is hung off of obj_private. * tm-hppa.h: Define struct obj_unwind_info, to hold pointers to the unwind info for this objfile. Also define OBJ_UNWIND_INFO to make this easier to access.
Diffstat (limited to 'gdb/hppa-pinsn.c')
-rw-r--r--gdb/hppa-pinsn.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/hppa-pinsn.c b/gdb/hppa-pinsn.c
index 0f0fec1..87d5e7a 100644
--- a/gdb/hppa-pinsn.c
+++ b/gdb/hppa-pinsn.c
@@ -87,9 +87,10 @@ print_insn (memaddr, stream)
CORE_ADDR memaddr;
FILE *stream;
{
- unsigned int insn, i, op;
+ long insn;
+ unsigned int i, op;
- read_memory (memaddr, &insn, sizeof (insn));
+ insn = read_memory_integer (memaddr, sizeof (insn));
for (i = 0; i < NUMOPCODES; ++i)
{
@@ -354,14 +355,15 @@ print_insn (memaddr, stream)
if (op == 0x38 /* be */ || op == 0x39 /* ble */)
{
CORE_ADDR target_address;
- unsigned int prev_insn;
+ long prev_insn;
int basereg, basereg_prev;
target_address = extract_17 (insn);
basereg = GET_FIELD (insn, 6, 10);
if (basereg != 0)
{
- read_memory (memaddr - 4, &prev_insn, sizeof(prev_insn));
+ prev_insn = read_memory_integer (memaddr - 4,
+ sizeof(prev_insn));
basereg_prev = GET_FIELD (prev_insn, 6, 10);
if ((prev_insn & 0xfc000000) == 0x20000000 /* ldil */