Bug 30876 - Frames not displayed correctly for target tfile
Summary: Frames not displayed correctly for target tfile
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: breakpoints (show other bugs)
Version: unknown
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-21 15:22 UTC by Juan Gonzalez Burgos
Modified: 2023-09-21 15:24 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juan Gonzalez Burgos 2023-09-21 15:22:54 UTC
When I load a trace file using the target tfile command, I get messages of the type:

Tracepoint 1 at 0x1157: file ... Created tracepoint 1 for target's tracepoint 1 at 0x555555555157.

Then when I try to look at a frame using tfind start, I get:

Found trace frame 0, tracepoint 1
#0  0x0000555555555157 in ?? ()

If I add the symbol file with the difference displayed by the message 0x555555555157 - 0x1157 = 0x555555554000:

add-symbol-file ./trace_test -o 0x555555554000

Then the frame works:

(gdb) tfind start
Found trace frame 0, tracepoint 3
#0  foo (a=33, b=4) at /home/juangburgos/Documents/REPOS/trace_test/main.cpp:3
3	    return a + b + b;

But I would expect GDB to correct this offset by itself, as I believe the user should not be expected to compute the offset manually and reload the symbols every time.

See this stackoverflow question for more details:
https://stackoverflow.com/questions/77148274/gdb-tracing-loaded-trace-file-does-not-display-frame-correctly

Thanks,
Comment 1 Juan Gonzalez Burgos 2023-09-21 15:24:49 UTC
Using GNU gdb (GDB) 14.0.50.20230730-git