Sometimes when stepping into new functions on i386, the frame being stepped / from/ may dissapear when performing instruction steps. TestStackBacktrace.testFramePushing and TestStackBacktrace.testFramePopping are designed to test this. These tests do not fail on x86_64 but do appear to fail on x86. I'll attach a testcase, but the general sitation is that the order of frames should be: main -> foo -> jump but during the push of 'jump' onto the call stack, the trace may show: main -> jump and similarly doing the pop of 'jump' off of the call stack.
Created attachment 1555 [details] Test program for this bug. Perform instruction stepping when about to enter jump() and about to exit jump() to reproduce the bug.
Created attachment 1556 [details] Entering jump()
Created attachment 1557 [details] exiting jump()
For what its worth, also reproducable in GDB: (gdb) bt #0 jump () at stepper.c:55 #1 0x080483db in foo () at stepper.c:76 #2 0x080483f0 in main () at stepper.c:82 (gdb) stepi 0x08048355 in jump () at stepper.c:55 55 } (gdb) bt #0 0x08048355 in jump () at stepper.c:55 #1 0x080483f0 in main () at stepper.c:82 (gdb)
Upstream bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12990#c3
This bug only concerns the epilogues of the frames - the prologue part is moved to #4083