This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug backtrace/23203] New: bt full moves selected frame to main


https://sourceware.org/bugzilla/show_bug.cgi?id=23203

            Bug ID: 23203
           Summary: bt full moves selected frame to main
           Product: gdb
           Version: 8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: backtrace
          Assignee: unassigned at sourceware dot org
          Reporter: alex_y_xu at yahoo dot ca
  Target Milestone: ---

description:

run f; bt full; f

expected behavior:

f command displays same frame both times.

actual behavior:

second one is moved to main.

additional information:

given test.c:

void f() {
    __builtin_trap();
}

int main() {
    f();
    return 0;
}

gdb shows:

GNU gdb (GDB) 8.1
[ ... ]
(gdb) r
Starting program: /tmp/a.out

Program received signal SIGILL, Illegal instruction.
f () at test.c:2
2           __builtin_trap();
(gdb) f
#0  f () at test.c:2
2           __builtin_trap();
(gdb) bt
#0  f () at test.c:2
#1  0x00005555555545c5 in main () at test.c:6
(gdb) f
#0  f () at test.c:2
2           __builtin_trap();
(gdb) bt full
#0  f () at test.c:2
No locals.
#1  0x00005555555545c5 in main () at test.c:6
No locals.
(gdb) f
#1  0x00005555555545c5 in main () at test.c:6
6           f();
(gdb) info reg
[ ... ]
rip            0x5555555545c5   0x5555555545c5 <main+14>
[ ... ]

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]