[Lldb-commits] [PATCH] D87868: [RFC] When calling the process mmap try to call all found instead of just the first one
António Afonso via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Nov 1 15:46:59 PST 2020
aadsm updated this revision to Diff 302178.
aadsm added a comment.
Herald added subscribers: MaskRay, emaste.
Herald added a reviewer: espindola.
Also set the symbol as external when it is weak
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87868/new/
https://reviews.llvm.org/D87868
Files:
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
Index: lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
===================================================================
--- lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
+++ lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
@@ -48,9 +48,9 @@
ConstString("mmap"), eFunctionNameTypeFull, include_symbols,
include_inlines, sc_list);
const uint32_t count = sc_list.GetSize();
- if (count > 0) {
+ for (uint32_t i = 0; i < count; i++) {
SymbolContext sc;
- if (sc_list.GetContextAtIndex(0, sc)) {
+ if (sc_list.GetContextAtIndex(i, sc) && sc.symbol->IsExternal()) {
const uint32_t range_scope =
eSymbolContextFunction | eSymbolContextSymbol;
const bool use_inline_block_range = false;
Index: lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===================================================================
--- lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -2264,8 +2264,10 @@
symbol_size_valid, // Symbol size is valid
has_suffix, // Contains linker annotations?
flags); // Symbol flags.
- if (symbol.getBinding() == STB_WEAK)
+ if (symbol.getBinding() == STB_WEAK) {
dc_symbol.SetIsWeak(true);
+ dc_symbol.SetIsExternal(true);
+ }
symtab->AddSymbol(dc_symbol);
}
return i;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87868.302178.patch
Type: text/x-patch
Size: 1447 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201101/9ace5b0a/attachment.bin>
More information about the lldb-commits
mailing list