diff options
author | Andrew Cagney <cagney@redhat.com> | 1998-11-29 07:41:36 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1998-11-29 07:41:36 +0000 |
commit | 8743fc885f33a57c09d1822b6fd5d6f6cc99ec9b (patch) | |
tree | d2a66b076f54b73533ad7a7241e9cb27489406cf /gdb/m88k-tdep.c | |
parent | 3a0c96a9966a85f4205558490e1281471c34980f (diff) | |
download | gdb-8743fc885f33a57c09d1822b6fd5d6f6cc99ec9b.zip gdb-8743fc885f33a57c09d1822b6fd5d6f6cc99ec9b.tar.gz gdb-8743fc885f33a57c09d1822b6fd5d6f6cc99ec9b.tar.bz2 |
CARP:
Convert ADDR_BITS_REMOVE to a function.
Diffstat (limited to 'gdb/m88k-tdep.c')
-rw-r--r-- | gdb/m88k-tdep.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c index f74560e..7a75508 100644 --- a/gdb/m88k-tdep.c +++ b/gdb/m88k-tdep.c @@ -36,6 +36,21 @@ void frame_find_saved_regs (); int target_is_m88110 = 0; +/* The m88k kernel aligns all instructions on 4-byte boundaries. The + kernel also uses the least significant two bits for its own hocus + pocus. When gdb receives an address from the kernel, it needs to + preserve those right-most two bits, but gdb also needs to be careful + to realize that those two bits are not really a part of the address + of an instruction. Shrug. */ + +CORE_ADDR +m88k_addr_bits_remove (addr) + CORE_ADDR addr; +{ + return ((addr) & ~3); +} + + /* Given a GDB frame, determine the address of the calling function's frame. This will be used to create a new GDB frame struct, and then INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame. |