[all-commits] [llvm/llvm-project] ec05cf: [lldb] Improve corefile saving ergonomics

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Tue Jun 13 13:45:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec05cf50daece35e0b01d3761e64ae54efe8a78e
      https://github.com/llvm/llvm-project/commit/ec05cf50daece35e0b01d3761e64ae54efe8a78e
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-06-13 (Tue, 13 Jun 2023)

  Changed paths:
    M lldb/source/API/SBProcess.cpp
    M lldb/source/Commands/CommandObjectProcess.cpp

  Log Message:
  -----------
  [lldb] Improve corefile saving ergonomics

This patch improves the way the user can save the process state into a
corefile by adding completion handler that would provide tab completion
for the corefile path and also resolves the corefile path to expand
relative path.

Differential Revision: https://reviews.llvm.org/D152842

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>


  Commit: 4177b490358432a457935ba5d6d076ae60de588f
      https://github.com/llvm/llvm-project/commit/4177b490358432a457935ba5d6d076ae60de588f
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-06-13 (Tue, 13 Jun 2023)

  Changed paths:
    M lldb/include/lldb/Utility/StructuredData.h
    M lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
    M lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py

  Log Message:
  -----------
  [lldb] Fix failure in TestStackCoreScriptedProcess on x86_64

This patch should address the failure of TestStackCoreScriptedProcess
that is happening specifically on x86_64.

It turns out that in 1370a1cb5b97, I changed the way we extract integers
from a `StructuredData::Dictionary` and in order to get a stop info from
the scripted process, we call a method that returns a `SBStructuredData`
containing the stop reason data.

TestStackCoreScriptedProcess` was failing specifically on x86_64 because
the stop info dictionary contains the signal number, that the `Scripted
Thread` was trying to extract as a signed integer where it was actually
parsed as an unsigned integer. That caused `GetValueForKeyAsInteger` to
return the default value parameter, `LLDB_INVALID_SIGNAL_NUMBER`.

This patch address the issue by extracting the signal number with the
appropriate type and re-enables the test.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>


Compare: https://github.com/llvm/llvm-project/compare/7f3d2cc26b47...4177b4903584


More information about the All-commits mailing list