[Lldb-commits] [PATCH] D21221: Fix for PrintStackTraces
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 13 21:17:33 PDT 2016
labath added a comment.
I think this idea in general is more acceptable, but we'll need an OK from Jason on the details.
Also, we should figure out a way to add a test for this. We should definitely add a more deterministic test and not rely on TestPrintStackTraces to check this functionality. Is it possible to write a self-contained test replicating these conditions, i.e. without depending on unwinding from standard library functions?
In http://reviews.llvm.org/D21221#455818, @ravitheja wrote:
> Well its not possible for the assembly unwinder to do the correct thing in this situation , as the function is entered through a stub function (which has push instruction) and then a jump. The point of this patch is to catch when to use the CFI or the assembly unwinder.
Note I said the "default" unwinder. If the assembly unwinder does not work, then maybe it should not be the default in this case.
Also, I seem to recall that the first plan being tried is the "augmented CFI", but that is very conservative in what it accepts as valid input. So maybe if we made it smarter (as in, recognize that in this case it does not need to do any augmentation and just pass through the eh_frame plan), then this and a lot of other problems would go away.
Comment at: source/Plugins/Process/Utility/RegisterContextLLDB.cpp:1602
@@ -1610,3 +1601,3 @@
// isn't going to do any better.
- if (m_full_unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolYes)
- return false;
+// if (m_full_unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolYes)
+// return false;
What is this supposed to do?
More information about the lldb-commits