Re: [lldb-dev] LLDB behaviour for GCed sections

2017-03-09 Thread Jim Ingham via lldb-dev
We encounter low pc values of 0 quite often macOS, since we leave the DWARF in .o file and then use a debug-map to fix up the addresses (and remove unused functions). The first function in a .o file is often at 0. Just a data point in favor of choosing something other than a low pc of 0 to mea

Re: [lldb-dev] LLDB behaviour for GCed sections

2017-03-09 Thread James Henderson via lldb-dev
Thank you for the effort put into this response. It's interesting to see that there are problems with LLDB's handling here. This might mean we need to have a wider discussion about how LLD does its --gc-sections. From experience working with our proprietary linker and debugger, this issue is someth

Re: [lldb-dev] LLDB behaviour for GCed sections

2017-03-09 Thread James Henderson via lldb-dev
Thank you for the effort put into this response. It's interesting to see that there are problems with LLDB's handling here. This might mean we need to have a wider discussion about how LLD does its --gc-sections and/or how LLDB treats this situation. From experience working with our proprietary lin

Re: [lldb-dev] LLDB behaviour for GCed sections

2017-03-09 Thread Earlam, David via lldb-dev
Hi James, I performed a quick experiment with clang –g –ffunction-sections and link with –gc-sections with Hexagon DSP tools based on llvm3.5. This shows an unused function as having DW_AT_low_pc as zero as you predict: readelf –W extract of DWARF4 .debug_info) <1><2b7>: Abbrev Number: 11 (DW_