diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-07-30 17:01:26 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-07-30 17:01:26 +0000 |
commit | d3862cae596482cb87caafc0b9e6e1086b69146f (patch) | |
tree | ec5870b7734db0ebb961672881e6b266da924fca /gdb/hppa-tdep.c | |
parent | 775d4a40960b52a877f2dc6bc5ce181872b4a06c (diff) | |
download | gdb-d3862cae596482cb87caafc0b9e6e1086b69146f.zip gdb-d3862cae596482cb87caafc0b9e6e1086b69146f.tar.gz gdb-d3862cae596482cb87caafc0b9e6e1086b69146f.tar.bz2 |
From J. Law:
* infcmd.c (read_pc): Remove PA specific code.
* tm-hppa.h (TARGET_READ_PC): Define.
* hppa-tdep.c (target_read_pc): New function.
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r-- | gdb/hppa-tdep.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 3bae845..24701b1 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -840,6 +840,18 @@ hppa_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p) return dyncall_addr; } +/* Get the PC from %r31 if currently in a syscall. Also mask out privilege + bits. */ +CORE_ADDR +target_read_pc () +{ + int flags = read_register (FLAGS_REGNUM); + + if (flags & 2) + return read_register (31) & ~0x3; + return read_register (PC_REGNUM) & ~0x3; +} + /* return the alignment of a type in bytes. Structures have the maximum alignment required by their fields. */ |