[Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries <file>" command and use it to fix MI's -symbol-list-lines.
Dawn Perchik via lldb-commits
lldb-commits at lists.llvm.org
Wed Dec 16 16:36:04 PST 2015
dawn added a comment.
In http://reviews.llvm.org/D15593#312571, @jingham wrote:
> I don't think this is sufficiently different from "target modules dump line-tables" to warrant a separate command. This seems more like a candidate for a flag to "target modules dump line-tables" like --search-for-inlines or something. That would keep the command surface more manageable and also make the option more discoverable, since you can get both variants in one place.
I first thought about adding it as an option to the line-table but decided against it because the information provided by each are just too different.
Dumping the tables gives you raw output from the CU's DWARF .debug_line entries, including end sequences, all files in the compilation unit, etc.:
(lldb) target modules du line-table x.cpp
Line table for /Users/dawn/tmp/x.cpp in `x
0x0000000100000aa0: /Users/dawn/tmp/x.cpp:12
0x0000000100000ab6: /Users/dawn/tmp/x.cpp:14
0x0000000100000af2: /Users/dawn/tmp/x.cpp:16
0x0000000100000afa: /Users/dawn/tmp/x.cpp:17
[...]
0x0000000100000cc0: /Users/dawn/tmp/x.cpp:6
0x0000000100000ccb: /Users/dawn/tmp/x.cpp:8
[...]
0x0000000100000d20: /Users/dawn/tmp/./x.h:10
0x0000000100000d2c: /Users/dawn/tmp/./x.h:10
0x0000000100000d3b: /Users/dawn/tmp/./x.h:10
Whereas dumping the line entries gives you entries after they've been interpreted and sorted by lldb, and will not include any files other than the one(s) asked for:
(lldb) target modules du line-entries x.h
Lines for file x.h in compilation unit x.cpp in `x
[0x0000000100000d00-0x0000000100000d10): /Users/dawn/tmp/./x.h:10
[0x0000000100000d10-0x0000000100000d1b): /Users/dawn/tmp/./x.h:10
[0x0000000100000d20-0x0000000100000d2c): /Users/dawn/tmp/./x.h:10
[0x0000000100000d2c-0x0000000100000d3b): /Users/dawn/tmp/./x.h:10
(lldb) target modules du line-entries x.cpp
Lines for file x.cpp in compilation unit x.cpp in `x
[0x0000000100000cc0-0x0000000100000ccb): /Users/dawn/tmp/x.cpp:6
[0x0000000100000ccb-0x0000000100000cdd): /Users/dawn/tmp/x.cpp:8
[0x0000000100000cdd-0x0000000100000cf1): /Users/dawn/tmp/x.cpp:9
[0x0000000100000aa0-0x0000000100000ab6): /Users/dawn/tmp/x.cpp:12
[0x0000000100000ab6-0x0000000100000af2): /Users/dawn/tmp/x.cpp:14
[...]
I'm fine with combining the two if we can find an interface that makes sense. 'line-table' is not appropriate for the new command, and '\-\-search\-for\-inlines' doesn't convey the differences. We could change 'line-table' to 'lines', but then what?
Repository:
rL LLVM
http://reviews.llvm.org/D15593
More information about the lldb-commits
mailing list