aboutsummaryrefslogtreecommitdiff
path: root/gdb/tramp-frame.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-07-20 15:11:37 +0000
committerAndrew Cagney <cagney@redhat.com>2004-07-20 15:11:37 +0000
commit2cd8546d1321946294f6c89cdfb250a7de50f99d (patch)
tree77cf2b4bed624e2cc61b1f00caa2cccb7f6b39e7 /gdb/tramp-frame.c
parente12904d27fcfac19123e57e6cb606045e7e829b9 (diff)
downloadgdb-2cd8546d1321946294f6c89cdfb250a7de50f99d.zip
gdb-2cd8546d1321946294f6c89cdfb250a7de50f99d.tar.gz
gdb-2cd8546d1321946294f6c89cdfb250a7de50f99d.tar.bz2
2004-07-20 Andrew Cagney <cagney@gnu.org>
* tramp-frame.h (struct tramp_frame): Change "insn" to a struct containing both bytes and mask. Add "frame_type". * tramp-frame.c (tramp_frame_start): Update. (tramp_frame_prepend_unwinder): Update. * mips-linux-tdep.c (mips_linux_o32_sigframe) (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe) (mips_linux_n64_rt_sigframe): Update. Make "static const". * ppcnbsd-tdep.c (tramp_frame ppcnbsd_sigtramp): Update.
Diffstat (limited to 'gdb/tramp-frame.c')
-rw-r--r--gdb/tramp-frame.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c
index 6ea2e3f..e1b946b 100644
--- a/gdb/tramp-frame.c
+++ b/gdb/tramp-frame.c
@@ -91,7 +91,7 @@ tramp_frame_start (const struct tramp_frame *tramp,
int ti;
/* Search through the trampoline for one that matches the
instruction sequence around PC. */
- for (ti = 0; tramp->insn[ti] != TRAMP_SENTINEL_INSN; ti++)
+ for (ti = 0; tramp->insn[ti].bytes != TRAMP_SENTINEL_INSN; ti++)
{
CORE_ADDR func = pc - tramp->insn_size * ti;
int i;
@@ -99,14 +99,14 @@ tramp_frame_start (const struct tramp_frame *tramp,
{
bfd_byte buf[sizeof (tramp->insn[0])];
ULONGEST insn;
- if (tramp->insn[i] == TRAMP_SENTINEL_INSN)
+ if (tramp->insn[i].bytes == TRAMP_SENTINEL_INSN)
return func;
if (!safe_frame_unwind_memory (next_frame,
func + i * tramp->insn_size,
buf, tramp->insn_size))
break;
insn = extract_unsigned_integer (buf, tramp->insn_size);
- if (tramp->insn[i] != insn)
+ if (tramp->insn[i].bytes != (insn & tramp->insn[i].mask))
break;
}
}
@@ -156,11 +156,11 @@ tramp_frame_prepend_unwinder (struct gdbarch *gdbarch,
/* Check that the instruction sequence contains a sentinel. */
for (i = 0; i < ARRAY_SIZE (tramp_frame->insn); i++)
{
- if (tramp_frame->insn[i] == TRAMP_SENTINEL_INSN)
+ if (tramp_frame->insn[i].bytes == TRAMP_SENTINEL_INSN)
break;
}
gdb_assert (i < ARRAY_SIZE (tramp_frame->insn));
- gdb_assert (tramp_frame->insn_size <= sizeof (tramp_frame->insn[0]));
+ gdb_assert (tramp_frame->insn_size <= sizeof (tramp_frame->insn[0].bytes));
data = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_data);
unwinder = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_unwind);