[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2020-01-13 Thread Jan Kratochvil via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. jankratochvil marked an inline comment as done. Closed by commit rGbf7225888a99: [lldb] Fix lookup of symbols with the same address range but different binding (authored by jankratochvil). Changed prior to commit:

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2020-01-13 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil marked 2 inline comments as done. jankratochvil added inline comments. Comment at: lldb/include/lldb/Symbol/Symtab.h:159-161 + else if (symbol.IsWeak()) +return 2; + else if (symbol.IsDebug()) labath wrote: > [[

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2020-01-13 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This looks great now. Thanks for persisting. Comment at: lldb/include/lldb/Symbol/Symtab.h:159-161 + else if (symbol.IsWeak()) +return 2; + else if (symbol.IsDebug()) [[

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2020-01-12 Thread Muhammad Omair Javaid via Phabricator via lldb-commits
omjavaid accepted this revision. omjavaid added a comment. This revision is now accepted and ready to land. This doesnt cause any regressions on 32-bit arm testsuite. Tested on Ubuntu Xenial and Bionic 32bit arm host docker container. I hope this fixes all the redhat issues as well. Thank you

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2020-01-09 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 237103. jankratochvil added a comment. This patch is now on top of D72460 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63540/new/ https://reviews.llvm.org/D63540

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2020-01-09 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment. In D63540#1809725 , @labath wrote: > - make the RangeMap constructor take a `const Compare &` instead of a > template pack. The std containers do the same, and I don't see a reason to > diverge.. Done. I have mistaken it

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2020-01-08 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I think this is pretty close. The two things I'd change are: - make the RangeMap constructor take a `const Compare &` instead of a template pack. The std containers do the same, and I don't see a reason to diverge.. - make Compare operate only on the "data" field of the

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2020-01-08 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 236777. jankratochvil added a comment. Found some way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63540/new/ https://reviews.llvm.org/D63540 Files: lldb/include/lldb/Symbol/Symtab.h

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2020-01-06 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil planned changes to this revision. jankratochvil added a comment. In D63540#1805967 , @labath wrote: > Passing different sort objects to different sort invocations could cause > changes done by one Sort call to be undone by further Symtab

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2020-01-06 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Thanks Jan and Omair for the investigation. It does seem like there is some more work to be done on arm/thumb in elf code in lldb, as it seems to me that things are working now more-or-less accidentally. The good news is that this should not require any fundamental

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2019-12-29 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil updated this revision to Diff 235518. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63540/new/ https://reviews.llvm.org/D63540 Files: lldb/include/lldb/Utility/RangeMap.h lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2019-12-29 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil marked an inline comment as done. jankratochvil added a comment. In D63540#1791017 , @labath wrote: > Defining some sort of a preference based on symbol type seems like a good > idea, but I don't think this is a good way to implement it. If

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2019-12-26 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment. The difference (with the previous size-non-setting patch) is: -lldb < 14> send packet: $Z0,102f0,2# +lldb < 14> send packet: $Z0,102f0,4# That is because `GetAddressClass` fails to recognized `0x102f0` as a code address: PASS:

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2019-12-23 Thread Muhammad Omair Javaid via Phabricator via lldb-commits
omjavaid added a comment. Some new observations: With this approach of not setting size of a non-last zero-sized symbol we somehow mange to zero out size of init (_init symbol) and .text (_start symbol). To build and evaluate a.out echo -e '#include \nint main(void){\nsync();return

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2019-12-21 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Thank you very much Omair. This is very useful information, and it does explain a few thing (while raising other questions). The thing that would help now is seeing the difference in the symbols and their properties in the area around the mmap function. Comparing the

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2019-12-20 Thread Muhammad Omair Javaid via Phabricator via lldb-commits
omjavaid added a comment. @jankratochvil @labath Some new information below: ProcessGDBRemote::DoAllocateMemory fails when it is called for expression evaluation preparation. This happens when both lldb and lldb-server are running on 32-bit arm host (various distros verified). If we debug

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2019-12-19 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil planned changes to this revision. jankratochvil added a comment. In D63540#1791017 , @labath wrote: > then this for example means that the "less global" symbols will not be > reported through the Symtab::ForEachSymbolContainingFileAddress

[Lldb-commits] [PATCH] D63540: Fix lookup of symbols with the same address range but different binding

2019-12-19 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Defining some sort of a preference based on symbol type seems like a good idea, but I don't think this is a good way to implement it. If I read this patch correctly, then this for example means that the "less global" symbols will not be reported through the