[Lldb-commits] [PATCH] D137873: [LLDB][Minidump] Set abi environment for windows.
Zequan Wu via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 11 15:41:59 PST 2022
zequanwu created this revision.
zequanwu added a reviewer: labath.
Herald added a project: All.
zequanwu requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
If we don't set it, clang will use itanium abi to create record layout which may
cause crash.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137873
Files:
lldb/source/Plugins/Process/minidump/MinidumpParser.cpp
lldb/test/Shell/Minidump/Windows/find-module.test
Index: lldb/test/Shell/Minidump/Windows/find-module.test
===================================================================
--- lldb/test/Shell/Minidump/Windows/find-module.test
+++ lldb/test/Shell/Minidump/Windows/find-module.test
@@ -4,7 +4,11 @@
RUN: yaml2obj %S/Inputs/find-module.exe.yaml -o %T/find-module.exe
RUN: yaml2obj %S/Inputs/find-module.dmp.yaml -o %T/find-module.dmp
RUN: %lldb -O "settings set target.exec-search-paths %T" \
-RUN: -c %T/find-module.dmp -o "image dump objfile" -o exit | FileCheck %s
+RUN: -c %T/find-module.dmp -o "image dump objfile" -o "target list" -o exit \
+RUN: | FileCheck %s
CHECK-LABEL: image dump objfile
CHECK: ObjectFilePECOFF, file = '{{.*}}find-module.exe', arch = i386
+
+CHECK-LABEL: target list
+CHECK: arch=i386-pc-windows-msvc
Index: lldb/source/Plugins/Process/minidump/MinidumpParser.cpp
===================================================================
--- lldb/source/Plugins/Process/minidump/MinidumpParser.cpp
+++ lldb/source/Plugins/Process/minidump/MinidumpParser.cpp
@@ -178,6 +178,7 @@
case OSPlatform::Win32CE:
triple.setOS(llvm::Triple::OSType::Win32);
triple.setVendor(llvm::Triple::VendorType::PC);
+ triple.setEnvironment(llvm::Triple::EnvironmentType::MSVC);
break;
case OSPlatform::Linux:
triple.setOS(llvm::Triple::OSType::Linux);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137873.474877.patch
Type: text/x-patch
Size: 1347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221111/bd2fe257/attachment.bin>
More information about the lldb-commits
mailing list