[PATCH] D69847: DWARFDebugLoc(v4): Add an incremental parsing function
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 04:25:45 PST 2019
labath added a comment.
In D69847#1753244 <https://reviews.llvm.org/D69847#1753244>, @SouraVX wrote:
> In D69847#1753190 <https://reviews.llvm.org/D69847#1753190>, @labath wrote:
>
> > I'm sorry, but I'm confused. Are you saying that the `.debug_loc.dwo` (i.e. non-standardized dwarf4 fission) location lists should be terminated with a classical `.debug_loc` double-zero entry ? That doesn't seem right -- the .debug_loc.dwo lists are in reality very different from `.debug_loc` (they use DW_LLE_*** constants and everything), and are really more similar to `.debug_loclists(.dwo)` than .debug_loc (though there are some subtle differences). It also doesn't seem to be what gcc is doing now -- this is a typical location list I get from gcc-9 -gsplit-dwarf (comments added by me):
>
>
> Thanks for sharing, this I'm also sceptical here, as to what approach we should follow. You're comments seems reasonable here, But If you just try dumping this{GCC, compiled binary} -- again using llvm-dwarfdump you'll notice lots of `DW_LLE_end_of_list`. I'm not pointing you're wrong -- it's just the dump that the end user will see -- will not make sense{atleast confuses me} to him.
Could you share this binary or some instructions how to produce it. I know there are some issues with dumping gcc-produced range/location lists, but I don't think this has to do with how they are terminated. The for instance, if I tried to do a section-based dump ("inline dumps" work fine, but they don't show end-of-list entries) of the location list from https://reviews.llvm.org/D69847#1753190, then I'd get an error like "error: LLE of kind 2 not supported". However this is due to the "view" blurbs that gcc inserts and not about location lists per se. (Which kind of ties in to the discussion of how should we actually perform section dumps -- there's an opinion that just scanning through the section and printing location lists (i.e. what llvm-dwarfdump -debug-loc is doing now) is not correct/legal, and that one should always start from the debug_info section and follow references from there. Gcc apparently exploits this fact to insert some custom data into the debug_loc/range sections)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69847/new/
https://reviews.llvm.org/D69847
More information about the llvm-commits
mailing list