Summary: | gdb not loading debug info from .dwo file | ||
---|---|---|---|
Product: | gdb | Reporter: | garyu.shi |
Component: | gdb | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | normal | CC: | simark |
Priority: | P1 | ||
Version: | 8.2.1 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | 2019-06-29 00:00:00 |
Description
garyu.shi
2019-06-13 02:00:28 UTC
gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0 It can be a bug in gcc... I see this too, here's a small reproducer: --- #define NUM_STUFF 18 int main() { return NUM_STUFF; } --- $ gcc test.c -g3 -O0 -gsplit-dwarf -c && gcc test.o -o test $ gdb ./test (gdb) start Temporary breakpoint 1 at 0x111d: file test.c, line 4. Starting program: /home/simark/src/babeltrace/src/lib/graph/test Temporary breakpoint 1, main () at test.c:4 4 return NUM_STUFF; (gdb) p NUM_STUFF No symbol "NUM_STUFF" in current context. Without -gsplit-dwarf, NUM_STUFF is printed correctly. looks gcc does not produce .dwo file properly for .debug_macro.dwo section; gcc uses DW_FORM_GNU_str_index, but use DW_MACRO_define_strp as opcode; the actual operands for DW_MACRO_define_strp are unsigned LEB128, which can't be read by fixed offset. |