summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.arch/i386-prologue.exp
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-04-29 18:05:31 +0000
committerMark Kettenis <kettenis@gnu.org>2004-04-29 18:05:31 +0000
commita8958849c4e86363003ed25c2bf1e7685fd7bf36 (patch)
treea033a2c1003cfb4d8a70c43e79508fa36f713920 /gdb/testsuite/gdb.arch/i386-prologue.exp
parent711cc5cd074d90536d28426dbdaed62f0d3bf0a7 (diff)
downloadbinutils-gdb-a8958849c4e86363003ed25c2bf1e7685fd7bf36.tar.gz
* i386-prologue.exp: Add testcase for jump instruction as first
instruction of the real code. * i386-prologue.c (jump_at_beginning): New function.
Diffstat (limited to 'gdb/testsuite/gdb.arch/i386-prologue.exp')
-rw-r--r--gdb/testsuite/gdb.arch/i386-prologue.exp13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp
index f1c1e72425a..ea04b535e5d 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue.exp
@@ -76,3 +76,16 @@ gdb_test "backtrace 10" \
gdb_test "info frame" \
".*Saved registers:.*ebx at.*esi at.*edi at.*eip at.*" \
"saved registers in gdb1338"
+
+# Testcase jump_at_beginning.
+gdb_test_multiple "break jump_at_beginning" \
+ "set breakpoint in jump_at_beginning" {
+ -re "Breakpoint \[0-9\]* at ($hex).*$gdb_prompt $" {
+ gdb_test "x/i $expect_out(1,string)" \
+ ".*<jump_at_beginning.*>:.*jmp.*" \
+ "check jump_at_beginning prologue end"
+ }
+ default {
+ fail "set breakpoint in jump_at_beginning"
+ }
+}