[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2020-01-14 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D71487#1820074 , @probinson wrote: > In D71487#1791824 , @clayborg wrote: > > > BTW: is used to be that both DW_AT_low_pc and DW_AT_high_pc would be set to > > zero when a function was

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2020-01-14 Thread Paul Robinson via Phabricator via lldb-commits
probinson added a comment. In D71487#1791824 , @clayborg wrote: > BTW: is used to be that both DW_AT_low_pc and DW_AT_high_pc would be set to > zero when a function was dead stripped. This was back when both the low and > high pc used DW_FORM_addr (a fil

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D71487#1792391 , @johannes wrote: > I'm having some troubles fixing this build failure: > http://lab.llvm.org:8011/builders/lldb-x86_64-debian/builds/1866/ > > `ninja check-lldb-api` fails but when I try to execute the offendin

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-20 Thread Johannes Altmanninger via Phabricator via lldb-commits
johannes added a comment. I'm having some troubles fixing this build failure: http://lab.llvm.org:8011/builders/lldb-x86_64-debian/builds/1866/ `ninja check-lldb-api` fails but when I try to execute the offending test locally with a command equivalent to the one in the buildbot log, I get below

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-20 Thread Johannes Altmanninger via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG92211bf0f15b: [LLDB] Fix address computation for inline function (authored by johannes). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71487/new/ https://re

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Looks good, thanks for tracking this down! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71487/new/ https://reviews.llvm.org/D71487 _

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-19 Thread Johannes Altmanninger via Phabricator via lldb-commits
johannes marked an inline comment as done. johannes added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2285 -if (addr.IsValid()) { +if (addr.IsSectionOffset()) { sc_list.Append(sc); clayborg wrote: > Check

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-19 Thread Johannes Altmanninger via Phabricator via lldb-commits
johannes updated this revision to Diff 234795. johannes edited the summary of this revision. johannes added a comment. check if the function's section is executable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71487/new/ https://reviews.llvm.org/D

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. BTW: is used to be that both DW_AT_low_pc and DW_AT_high_pc would be set to zero when a function was dead stripped. This was back when both the low and high pc used DW_FORM_addr (a file address). But then DWARF changed such that DW_AT_high_pc could be encoded as a data

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-19 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. It is sad that we can't tell if a DW_AT_low_pc with a value of zero is valid or not. Some shared libraries might be able to have a function at address zero, so we need to be careful here. My proposed fix above will check the section that contains the low PC to see if i

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-19 Thread Johannes Altmanninger via Phabricator via lldb-commits
johannes updated this revision to Diff 234736. johannes added a comment. - Use `addr.IsSectionOffset()` as suggested. - Add test that links two copies of a compilation unit and makes sure that lldb only resolves it once. The fix seems to work when linking an executable, but it does not when crea

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Thanks. I think we're getting closer, and I think we can start talking about a more direct way to test this behavior. This is now definitely, as Adrian called it, a DWARF peculiarity, and so an assembly file with hard-coded dwarf would be much better. Can you take a look

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-16 Thread Johannes Altmanninger via Phabricator via lldb-commits
johannes added a comment. Thanks for the very useful feedback! Now I can finally see why this is happening. Below is the relevant excerpt of the input DWARF: one of the DW_AT_low_pc attributes is NULL, which does not happen when I link with GNU ld. clang lldb/test/Shell/Expr/Inputs/function-

[Lldb-commits] [PATCH] D71487: [LLDB] Fix address computation for inline function

2019-12-16 Thread Johannes Altmanninger via Phabricator via lldb-commits
johannes updated this revision to Diff 234134. johannes retitled this revision from "[LLDB] Fix address computation for member function linked with lld" to "[LLDB] Fix address computation for inline function". johannes edited the summary of this revision. johannes added a comment. different appr