diff options
Diffstat (limited to 'gdb/testsuite/gdb.arch/i386-prologue.c')
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-prologue.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.c b/gdb/testsuite/gdb.arch/i386-prologue.c index 4c92a9c..33fc1db 100644 --- a/gdb/testsuite/gdb.arch/i386-prologue.c +++ b/gdb/testsuite/gdb.arch/i386-prologue.c @@ -1,11 +1,13 @@ void gdb1253 (void); void gdb1338 (void); +void jump_at_beginning (void); int main (void) { gdb1253 (); gdb1338 (); + jump_at_beginning (); return 0; } @@ -35,3 +37,19 @@ asm(".text\n" " popl %esi\n" " popl %edi\n" " ret\n"); + +/* The purpose of this function is to verify that, during prologue + skip, GDB does not follow a jump at the beginnning of the "real" + code. */ + +asm(".text\n" + " .align 8\n" + "jump_at_beginning:\n" + " pushl %ebp\n" + " movl %esp,%ebp\n" + " jmp .gdbjump\n" + " nop\n" + ".gdbjump:\n" + " movl %ebp,%esp\n" + " popl %ebp\n" + " ret\n"); |