[all-commits] [llvm/llvm-project] 25c8a0: [lldb] Set COFF module ABI from default triple and...

alvinhochun via All-commits all-commits at lists.llvm.org
Thu Jun 9 12:44:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 25c8a061c5739677d2fc0af29a8cc9520207b923
      https://github.com/llvm/llvm-project/commit/25c8a061c5739677d2fc0af29a8cc9520207b923
  Author: Alvin Wong <alvin at alvinhc.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M lldb/include/lldb/Core/PluginManager.h
    M lldb/source/Core/PluginManager.cpp
    M lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
    M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
    A lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFProperties.td
    M lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml
    M lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
    M lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml
    A lldb/test/Shell/ObjectFile/PECOFF/default-triple-windows-gnu.yaml
    A lldb/test/Shell/ObjectFile/PECOFF/default-triple-windows-msvc.yaml
    A lldb/test/Shell/ObjectFile/PECOFF/settings-abi.yaml
    M lldb/test/Shell/lit.cfg.py

  Log Message:
  -----------
  [lldb] Set COFF module ABI from default triple and make it an option

PE/COFF can use either MSVC or GNU (MinGW) ABI for C++ code, however
LLDB had defaulted to MSVC implicitly with no way to override it. This
causes issues when debugging modules built with the GNU ABI, sometimes
even crashes.

This changes the PE/COFF plugin to set the module triple according to
the default target triple used to build LLDB. If the default target
triple is Windows and a valid environment is specified, then this
environment will be used for the module spec. This not only works for
MSVC and GNU, but also other environments.

A new setting, `plugin.object-file.pe-coff.abi`,  has been added to
allow overriding this default ABI.

* Fixes https://github.com/llvm/llvm-project/issues/50775
* Fixes https://github.com/mstorsjo/llvm-mingw/issues/226
* Fixes https://github.com/mstorsjo/llvm-mingw/issues/282

Reviewed By: omjavaid

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




More information about the All-commits mailing list