[Lldb-commits] [PATCH] D127048: [lldb] Set COFF and PDB module env from default target triple

Alvin Wong via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Jun 5 03:41:39 PDT 2022


alvinhochun created this revision.
Herald added a subscriber: mstorsjo.
Herald added a project: All.
alvinhochun updated this revision to Diff 434316.
alvinhochun added a comment.
alvinhochun published this revision for review.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Added tests


PE/COFF can use either MSVC or GNU ABI (MinGW) 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 and PDB plugins 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.

- 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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127048

Files:
  lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp
  lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
  lldb/test/Shell/ObjectFile/PECOFF/default-triple-windows-gnu.yaml
  lldb/test/Shell/ObjectFile/PECOFF/default-triple-windows-msvc.yaml
  lldb/test/Shell/lit.cfg.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127048.434316.patch
Type: text/x-patch
Size: 7626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220605/c7cc2296/attachment-0001.bin>


More information about the lldb-commits mailing list