Re: [Lldb-commits] [PATCH] D24079: Always rely on CFI unwind info for linux vdso
This revision was automatically updated to reflect the committed changes. Closed by commit rL280264: Always rely on CFI unwind info for linux vdso (authored by labath). Changed prior to commit: https://reviews.llvm.org/D24079?vs=69857&id=69883#toc Repository: rL LLVM https://reviews.llvm.org/D24079 Files: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h === --- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h +++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h @@ -172,6 +172,9 @@ void ResolveExecutableModule(lldb::ModuleSP &module_sp); +bool +AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) override; + private: DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD); }; Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp === --- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -7,8 +7,12 @@ // //===--===// -// C Includes -// C++ Includes +// Main header include +#include "DynamicLoaderPOSIXDYLD.h" + +// Project includes +#include "AuxVector.h" + // Other libraries and framework includes #include "lldb/Core/PluginManager.h" #include "lldb/Core/Log.h" @@ -22,9 +26,10 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" #include "lldb/Breakpoint/BreakpointLocation.h" +#include "lldb/Symbol/Function.h" -#include "AuxVector.h" -#include "DynamicLoaderPOSIXDYLD.h" +// C++ Includes +// C Includes using namespace lldb; using namespace lldb_private; @@ -691,3 +696,17 @@ target.SetExecutableModule (module_sp, false); } + +bool +DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) +{ +ModuleSP module_sp; +if (sym_ctx.symbol) +module_sp = sym_ctx.symbol->GetAddressRef().GetModule(); +if (!module_sp && sym_ctx.function) +module_sp = sym_ctx.function->GetAddressRange().GetBaseAddress().GetModule(); +if (!module_sp) +return false; + +return module_sp->GetFileSpec().GetPath() == "[vdso]"; +} Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h === --- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h +++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h @@ -172,6 +172,9 @@ void ResolveExecutableModule(lldb::ModuleSP &module_sp); +bool +AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) override; + private: DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD); }; Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp === --- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -7,8 +7,12 @@ // //===--===// -// C Includes -// C++ Includes +// Main header include +#include "DynamicLoaderPOSIXDYLD.h" + +// Project includes +#include "AuxVector.h" + // Other libraries and framework includes #include "lldb/Core/PluginManager.h" #include "lldb/Core/Log.h" @@ -22,9 +26,10 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" #include "lldb/Breakpoint/BreakpointLocation.h" +#include "lldb/Symbol/Function.h" -#include "AuxVector.h" -#include "DynamicLoaderPOSIXDYLD.h" +// C++ Includes +// C Includes using namespace lldb; using namespace lldb_private; @@ -691,3 +696,17 @@ target.SetExecutableModule (module_sp, false); } + +bool +DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) +{ +ModuleSP module_sp; +if (sym_ctx.symbol) +module_sp = sym_ctx.symbol->GetAddressRef().GetModule(); +if (!module_sp && sym_ctx.function) +module_sp = sym_ctx.function->GetAddressRange().GetBaseAddress().GetModule(); +if (!module_sp) +return false; + +return module_sp->GetFileSpec().GetPath() == "[vdso]"; +} ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24079: Always rely on CFI unwind info for linux vdso
labath added inline comments. Comment at: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp:13-14 @@ +12,4 @@ + +// Project includes +#include "AuxVector.h" + tberghammer wrote: > Why do we need this? I'm not adding anything. I just took the opportunity to reorganize the headers into the new format while I was touching it. (The only new include is lldb/Symbol/Function.h). https://reviews.llvm.org/D24079 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24079: Always rely on CFI unwind info for linux vdso
tberghammer accepted this revision. tberghammer added a comment. This revision is now accepted and ready to land. Looks good Comment at: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp:13-14 @@ +12,4 @@ + +// Project includes +#include "AuxVector.h" + Why do we need this? https://reviews.llvm.org/D24079 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D24079: Always rely on CFI unwind info for linux vdso
labath created this revision. labath added a reviewer: tberghammer. labath added a subscriber: lldb-commits. Herald added subscribers: danalbert, tberghammer. The vdso is full of hand-written assembly which the instruction emulator has a hard time understanding. Luckily, the kernel already provides us with correct unwind info for them. So let's use it. This fixes (at least) the AssertingInferiorTestCase.test_inferior_asserting_disassemble test on android N i386. https://reviews.llvm.org/D24079 Files: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h === --- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h +++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h @@ -172,6 +172,9 @@ void ResolveExecutableModule(lldb::ModuleSP &module_sp); +bool +AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) override; + private: DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD); }; Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp === --- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -7,8 +7,12 @@ // //===--===// -// C Includes -// C++ Includes +// Main header include +#include "DynamicLoaderPOSIXDYLD.h" + +// Project includes +#include "AuxVector.h" + // Other libraries and framework includes #include "lldb/Core/PluginManager.h" #include "lldb/Core/Log.h" @@ -22,9 +26,10 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" #include "lldb/Breakpoint/BreakpointLocation.h" +#include "lldb/Symbol/Function.h" -#include "AuxVector.h" -#include "DynamicLoaderPOSIXDYLD.h" +// C++ Includes +// C Includes using namespace lldb; using namespace lldb_private; @@ -691,3 +696,17 @@ target.SetExecutableModule (module_sp, false); } + +bool +DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) +{ +ModuleSP module_sp; +if (sym_ctx.symbol) +module_sp = sym_ctx.symbol->GetAddressRef().GetModule(); +if (!module_sp && sym_ctx.function) +module_sp = sym_ctx.function->GetAddressRange().GetBaseAddress().GetModule(); +if (!module_sp) +return false; + +return module_sp->GetFileSpec().GetPath() == "[vdso]"; +} Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h === --- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h +++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h @@ -172,6 +172,9 @@ void ResolveExecutableModule(lldb::ModuleSP &module_sp); +bool +AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) override; + private: DISALLOW_COPY_AND_ASSIGN(DynamicLoaderPOSIXDYLD); }; Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp === --- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -7,8 +7,12 @@ // //===--===// -// C Includes -// C++ Includes +// Main header include +#include "DynamicLoaderPOSIXDYLD.h" + +// Project includes +#include "AuxVector.h" + // Other libraries and framework includes #include "lldb/Core/PluginManager.h" #include "lldb/Core/Log.h" @@ -22,9 +26,10 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" #include "lldb/Breakpoint/BreakpointLocation.h" +#include "lldb/Symbol/Function.h" -#include "AuxVector.h" -#include "DynamicLoaderPOSIXDYLD.h" +// C++ Includes +// C Includes using namespace lldb; using namespace lldb_private; @@ -691,3 +696,17 @@ target.SetExecutableModule (module_sp, false); } + +bool +DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(lldb_private::SymbolContext &sym_ctx) +{ +ModuleSP module_sp; +if (sym_ctx.symbol) +module_sp = sym_ctx.symbol->GetAddressRef().GetModule(); +if (!module_sp && sym_ctx.function) +module_sp = sym_ctx.function->GetAddressRange().GetBaseAddress().GetModule(); +if (!module_sp) +return false; + +return module_sp->GetFileSpec().GetPath() == "[vdso]"; +} ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits