summaryrefslogtreecommitdiff
path: root/gdb/tramp-frame.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-03-24 23:14:39 +0000
committerAndrew Cagney <cagney@redhat.com>2004-03-24 23:14:39 +0000
commite5226dc78135016dd09fed34ce1b397e3c561f07 (patch)
tree299095c2d2b73c398a6b2aa8d9d7396aeecc8907 /gdb/tramp-frame.h
parentd006608f0f603e296e8ade6c1d73a88b420ce992 (diff)
downloadgdb-e5226dc78135016dd09fed34ce1b397e3c561f07.tar.gz
2004-03-24 Andrew Cagney <cagney@redhat.com>
* tramp-frame.h (TRAMP_SENTINEL_INSN): Define, document. * tramp-frame.c: Include "gdb_assert.h". (tramp_frame_start): Use TRAMP_SENTINEL_INSN. Use ULONGEST and correct sizeof. (tramp_frame_append): Validate the tramp frame's instructions. * Makefile.in (tramp-frame.o): Update dependencies.
Diffstat (limited to 'gdb/tramp-frame.h')
-rw-r--r--gdb/tramp-frame.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/tramp-frame.h b/gdb/tramp-frame.h
index 44e266eaab6..54f29bbca54 100644
--- a/gdb/tramp-frame.h
+++ b/gdb/tramp-frame.h
@@ -39,6 +39,10 @@ struct trad_frame_cache;
/* A trampoline descriptor. */
+/* Magic instruction that to mark the end of the signal trampoline
+ instruction sequence. */
+#define TRAMP_SENTINEL_INSN ((LONGEST) -1)
+
struct tramp_frame
{
/* The trampoline's entire instruction sequence. Search for this in
@@ -47,7 +51,8 @@ struct tramp_frame
one INSN_SIZE instruction. It is also assumed that TRAMP[0]
contains the first instruction of the trampoline and hence the
address of the instruction matching TRAMP[0] is the trampoline's
- "func" address. */
+ "func" address. The instruction sequence shall be terminated by
+ TRAMP_SENTINEL_INSN. */
int insn_size;
ULONGEST insn[8];
/* Initialize a trad-frame cache corresponding to the tramp-frame.