Skip to content

Commit 3b14414

Browse files
authored
Reland "[LLDB][NativePDB] Create functions with mangled name" (#161678)
Relands #149701 which was reverted in llvm/llvm-project@185ae5c because it broke demangling of Itanium symbols on i386. The last commit in this PR adds the fix for this (discussed in #160930). On x86 environments, the prefix of `__cdecl` functions will now be removed to match DWARF. I opened #161676 to discuss this for the other calling conventions.
1 parent 88d9f69 commit 3b14414

File tree

12 files changed

+189
-31
lines changed

12 files changed

+189
-31
lines changed

lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,18 @@ struct CreateMethodDecl : public TypeVisitorCallbacks {
3838
TypeIndex func_type_index,
3939
clang::FunctionDecl *&function_decl,
4040
lldb::opaque_compiler_type_t parent_ty,
41-
llvm::StringRef proc_name, CompilerType func_ct)
41+
llvm::StringRef proc_name, ConstString mangled_name,
42+
CompilerType func_ct)
4243
: m_index(m_index), m_clang(m_clang), func_type_index(func_type_index),
4344
function_decl(function_decl), parent_ty(parent_ty),
44-
proc_name(proc_name), func_ct(func_ct) {}
45+
proc_name(proc_name), mangled_name(mangled_name), func_ct(func_ct) {}
4546
PdbIndex &m_index;
4647
TypeSystemClang &m_clang;
4748
TypeIndex func_type_index;
4849
clang::FunctionDecl *&function_decl;
4950
lldb::opaque_compiler_type_t parent_ty;
5051
llvm::StringRef proc_name;
52+
ConstString mangled_name;
5153
CompilerType func_ct;
5254

5355
llvm::Error visitKnownMember(CVMemberRecord &cvr,
@@ -87,8 +89,7 @@ struct CreateMethodDecl : public TypeVisitorCallbacks {
8789
bool is_artificial = (options & MethodOptions::CompilerGenerated) ==
8890
MethodOptions::CompilerGenerated;
8991
function_decl = m_clang.AddMethodToCXXRecordType(
90-
parent_ty, proc_name,
91-
/*asm_label=*/{}, func_ct, /*access=*/access_type,
92+
parent_ty, proc_name, mangled_name, func_ct, /*access=*/access_type,
9293
/*is_virtual=*/is_virtual, /*is_static=*/is_static,
9394
/*is_inline=*/false, /*is_explicit=*/false,
9495
/*is_attr_used=*/false, /*is_artificial=*/is_artificial);
@@ -892,22 +893,26 @@ PdbAstBuilder::CreateFunctionDecl(PdbCompilandSymId func_id,
892893
tag_record = CVTagRecord::create(index.tpi().getType(*eti)).asTag();
893894
}
894895
}
896+
897+
ConstString mangled_name(
898+
pdb->FindMangledFunctionName(func_id).value_or(llvm::StringRef()));
899+
895900
if (!tag_record.FieldList.isSimple()) {
896901
CVType field_list_cvt = index.tpi().getType(tag_record.FieldList);
897902
FieldListRecord field_list;
898903
if (llvm::Error error = TypeDeserializer::deserializeAs<FieldListRecord>(
899904
field_list_cvt, field_list))
900905
llvm::consumeError(std::move(error));
901906
CreateMethodDecl process(index, m_clang, func_ti, function_decl,
902-
parent_opaque_ty, func_name, func_ct);
907+
parent_opaque_ty, func_name, mangled_name,
908+
func_ct);
903909
if (llvm::Error err = visitMemberRecordStream(field_list.Data, process))
904910
llvm::consumeError(std::move(err));
905911
}
906912

907913
if (!function_decl) {
908914
function_decl = m_clang.AddMethodToCXXRecordType(
909-
parent_opaque_ty, func_name,
910-
/*asm_label=*/{}, func_ct,
915+
parent_opaque_ty, func_name, mangled_name, func_ct,
911916
/*access=*/lldb::AccessType::eAccessPublic,
912917
/*is_virtual=*/false, /*is_static=*/false,
913918
/*is_inline=*/false, /*is_explicit=*/false,

lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,11 @@ lldb::FunctionSP SymbolFileNativePDB::CreateFunction(PdbCompilandSymId func_id,
501501
return nullptr;
502502

503503
PdbTypeSymId sig_id(proc.FunctionType, false);
504-
Mangled mangled(proc.Name);
504+
505+
std::optional<llvm::StringRef> mangled_opt = FindMangledSymbol(
506+
SegmentOffset(proc.Segment, proc.CodeOffset), proc.FunctionType);
507+
Mangled mangled(mangled_opt.value_or(proc.Name));
508+
505509
FunctionSP func_sp = std::make_shared<Function>(
506510
&comp_unit, toOpaqueUid(func_id), toOpaqueUid(sig_id), mangled,
507511
func_type.get(), func_addr,
@@ -2662,6 +2666,83 @@ SymbolFileNativePDB::GetContextForType(TypeIndex ti) {
26622666
return ctx;
26632667
}
26642668

2669+
std::optional<llvm::StringRef>
2670+
SymbolFileNativePDB::FindMangledFunctionName(PdbCompilandSymId func_id) {
2671+
const CompilandIndexItem *cci =
2672+
m_index->compilands().GetCompiland(func_id.modi);
2673+
if (!cci)
2674+
return std::nullopt;
2675+
2676+
CVSymbol sym_record = cci->m_debug_stream.readSymbolAtOffset(func_id.offset);
2677+
if (sym_record.kind() != S_LPROC32 && sym_record.kind() != S_GPROC32)
2678+
return std::nullopt;
2679+
2680+
ProcSym proc(static_cast<SymbolRecordKind>(sym_record.kind()));
2681+
cantFail(SymbolDeserializer::deserializeAs<ProcSym>(sym_record, proc));
2682+
2683+
return FindMangledSymbol(SegmentOffset(proc.Segment, proc.CodeOffset),
2684+
proc.FunctionType);
2685+
}
2686+
2687+
std::optional<llvm::StringRef>
2688+
SymbolFileNativePDB::FindMangledSymbol(SegmentOffset so,
2689+
TypeIndex function_type) {
2690+
auto symbol = m_index->publics().findByAddress(m_index->symrecords(),
2691+
so.segment, so.offset);
2692+
if (!symbol)
2693+
return std::nullopt;
2694+
2695+
llvm::StringRef name = symbol->first.Name;
2696+
// For functions, we might need to strip the mangled name. See
2697+
// StripMangledFunctionName for more info.
2698+
if (!function_type.isNoneType() &&
2699+
(symbol->first.Flags & PublicSymFlags::Function) != PublicSymFlags::None)
2700+
name = StripMangledFunctionName(name, function_type);
2701+
2702+
return name;
2703+
}
2704+
2705+
llvm::StringRef
2706+
SymbolFileNativePDB::StripMangledFunctionName(const llvm::StringRef mangled,
2707+
PdbTypeSymId func_ty) {
2708+
// "In non-64 bit environments" (on x86 in pactice), __cdecl functions get
2709+
// prefixed with an underscore. For compilers using LLVM, this happens in LLVM
2710+
// (as opposed to the compiler frontend). Because of this, DWARF doesn't
2711+
// contain the "full" mangled name in DW_AT_linkage_name for these functions.
2712+
// We strip the mangling here for compatibility with DWARF. See
2713+
// llvm.org/pr161676 and
2714+
// https://learn.microsoft.com/en-us/cpp/build/reference/decorated-names#FormatC
2715+
2716+
if (!mangled.starts_with('_') ||
2717+
m_index->dbi().getMachineType() != PDB_Machine::x86)
2718+
return mangled;
2719+
2720+
CVType cvt = m_index->tpi().getType(func_ty.index);
2721+
PDB_CallingConv cc = PDB_CallingConv::NearC;
2722+
if (cvt.kind() == LF_PROCEDURE) {
2723+
ProcedureRecord proc;
2724+
if (llvm::Error error =
2725+
TypeDeserializer::deserializeAs<ProcedureRecord>(cvt, proc))
2726+
llvm::consumeError(std::move(error));
2727+
cc = proc.CallConv;
2728+
} else if (cvt.kind() == LF_MFUNCTION) {
2729+
MemberFunctionRecord mfunc;
2730+
if (llvm::Error error =
2731+
TypeDeserializer::deserializeAs<MemberFunctionRecord>(cvt, mfunc))
2732+
llvm::consumeError(std::move(error));
2733+
cc = mfunc.CallConv;
2734+
} else {
2735+
LLDB_LOG(GetLog(LLDBLog::Symbols), "Unexpected function type, got {0}",
2736+
cvt.kind());
2737+
return mangled;
2738+
}
2739+
2740+
if (cc == PDB_CallingConv::NearC || cc == PDB_CallingConv::FarC)
2741+
return mangled.drop_front();
2742+
2743+
return mangled;
2744+
}
2745+
26652746
void SymbolFileNativePDB::CacheUdtDeclarations() {
26662747
for (CVType cvt : m_index->ipi().typeArray()) {
26672748
switch (cvt.kind()) {

lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ class SymbolFileNativePDB : public SymbolFileCommon {
140140

141141
std::optional<PdbCompilandSymId> FindSymbolScope(PdbCompilandSymId id);
142142

143+
/// Find the mangled name for a function
144+
///
145+
/// \param id A symbol ID of a S_LPROC32/S_GPROC32 record
146+
/// \returns The mangled name of the function (if available)
147+
std::optional<llvm::StringRef> FindMangledFunctionName(PdbCompilandSymId id);
148+
143149
void FindTypes(const lldb_private::TypeQuery &match,
144150
lldb_private::TypeResults &results) override;
145151

@@ -269,6 +275,20 @@ class SymbolFileNativePDB : public SymbolFileCommon {
269275
void CacheUdtDeclarations();
270276
llvm::Expected<Declaration> ResolveUdtDeclaration(PdbTypeSymId type_id);
271277

278+
/// Find a symbol name at a specific address (`so`).
279+
///
280+
/// \param[in] so The segment and offset where the symbol is located.
281+
/// \param[in] function_type If the symbol is expected to be a function, this
282+
/// has to be the type of the function. It's used to strip the name of
283+
/// __cdecl functions on x86.
284+
/// \returns The mangled symbol name if found, otherwise `std::nullopt`.
285+
std::optional<llvm::StringRef> FindMangledSymbol(
286+
SegmentOffset so,
287+
llvm::codeview::TypeIndex function_type = llvm::codeview::TypeIndex());
288+
289+
llvm::StringRef StripMangledFunctionName(llvm::StringRef mangled,
290+
PdbTypeSymId func_ty);
291+
272292
llvm::BumpPtrAllocator m_allocator;
273293

274294
lldb::addr_t m_obj_load_address = 0;

lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ int main(int argc, char **argv) {
5050
// CHECK: 1: name = 'main', locations = 1
5151
// CHECK: 1.1: where = break-by-function.cpp.tmp.exe`main + {{[0-9]+}}
5252
// CHECK: 2: name = 'OvlGlobalFn', locations = 3
53-
// CHECK: 2.1: where = break-by-function.cpp.tmp.exe`OvlGlobalFn + {{[0-9]+}}
54-
// CHECK: 2.2: where = break-by-function.cpp.tmp.exe`OvlGlobalFn
55-
// CHECK: 2.3: where = break-by-function.cpp.tmp.exe`OvlGlobalFn + {{[0-9]+}}
53+
// CHECK: 2.1: where = break-by-function.cpp.tmp.exe`int OvlGlobalFn(int) + {{[0-9]+}}
54+
// CHECK: 2.2: where = break-by-function.cpp.tmp.exe`int OvlGlobalFn(int, int)
55+
// CHECK: 2.3: where = break-by-function.cpp.tmp.exe`int OvlGlobalFn(int, int, int) + {{[0-9]+}}
5656
// CHECK: 3: name = 'StaticFn', locations = 1
5757
// CHECK: 3.1: where = break-by-function.cpp.tmp.exe`StaticFn + {{[0-9]+}}
5858
// CHECK: 4: name = 'DoesntExist', locations = 0 (pending)

lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ int main(int argc, char **argv) {
2424
// CHECK: (lldb) target create "{{.*}}break-by-line.cpp.tmp.exe"
2525
// CHECK: Current executable set to '{{.*}}break-by-line.cpp.tmp.exe'
2626
// CHECK: (lldb) break set -f break-by-line.cpp -l 15
27-
// CHECK: Breakpoint 1: where = break-by-line.cpp.tmp.exe`NS::NamespaceFn + {{[0-9]+}} at break-by-line.cpp:15
27+
// CHECK: Breakpoint 1: where = break-by-line.cpp.tmp.exe`int NS::NamespaceFn(int) + {{[0-9]+}} at break-by-line.cpp:15
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// clang-format off
2+
// REQUIRES: lld, x86
3+
4+
// RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%t-32.exe %s
5+
// RUN: lldb-test symbols %t-32.exe | FileCheck --check-prefixes CHECK-32,CHECK-BOTH %s
6+
// RUN: %build --compiler=clang-cl --arch=64 --nodefaultlib --output=%t-64.exe %s
7+
// RUN: lldb-test symbols %t-64.exe | FileCheck --check-prefixes CHECK-64,CHECK-BOTH %s
8+
9+
extern "C" {
10+
int FuncCCall() { return 0; }
11+
int __stdcall FuncStdCall() { return 0; }
12+
int __fastcall FuncFastCall() { return 0; }
13+
int __vectorcall FuncVectorCall() { return 0; }
14+
15+
int __cdecl _underscoreCdecl() { return 0; }
16+
int __stdcall _underscoreStdcall() { return 0; }
17+
int __fastcall _underscoreFastcall() { return 0; }
18+
int __vectorcall _underscoreVectorcall() { return 0; }
19+
}
20+
21+
int main() {
22+
FuncCCall();
23+
FuncStdCall();
24+
FuncFastCall();
25+
FuncVectorCall();
26+
_underscoreCdecl();
27+
_underscoreStdcall();
28+
_underscoreFastcall();
29+
_underscoreVectorcall();
30+
return 0;
31+
}
32+
33+
// CHECK-BOTH-DAG: Function{{.*}}, demangled = FuncCCall,
34+
// CHECK-BOTH-DAG: Function{{.*}}, demangled = FuncVectorCall@@0,
35+
// CHECK-BOTH-DAG: Function{{.*}}, demangled = _underscoreCdecl,
36+
// CHECK-BOTH-DAG: Function{{.*}}, demangled = _underscoreVectorcall@@0,
37+
// CHECK-BOTH-DAG: Function{{.*}}, demangled = main,
38+
39+
// __stdcall and __fastcall aren't available on 64 bit
40+
41+
// CHECK-32-DAG: Function{{.*}}, demangled = _FuncStdCall@0,
42+
// CHECK-64-DAG: Function{{.*}}, demangled = FuncStdCall,
43+
44+
// CHECK-32-DAG: Function{{.*}}, demangled = @FuncFastCall@0,
45+
// CHECK-64-DAG: Function{{.*}}, demangled = FuncFastCall,
46+
47+
// CHECK-32-DAG: Function{{.*}}, demangled = __underscoreStdcall@0,
48+
// CHECK-64-DAG: Function{{.*}}, demangled = _underscoreStdcall,
49+
50+
// CHECK-32-DAG: Function{{.*}}, demangled = @_underscoreFastcall@0,
51+
// CHECK-64-DAG: Function{{.*}}, demangled = _underscoreFastcall,

lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
2525
// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+12>: mov qword ptr [rsp + 0x28], rdx
2626
// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+17>: mov dword ptr [rsp + 0x24], ecx
2727
// CHECK: ** 15 foo();
28-
// CHECK: disassembly.cpp.tmp.exe[{{.*}}] <+21>: call {{.*}} ; foo at disassembly.cpp:12
28+
// CHECK: disassembly.cpp.tmp.exe[{{.*}}] <+21>: call {{.*}} ; int foo(void) at disassembly.cpp:12
2929
// CHECK: ** 16 return 0;
3030
// CHECK-NEXT: 17 }
3131
// CHECK-NEXT: 18

lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,19 @@ int main(int argc, char **argv) {
148148
// FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "int (void)"
149149
// FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "int (char)"
150150
// FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "int (char, int, ...)"
151-
// FIND-OVERLOAD-BASE-DAG: Function: id = {{.*}}, name = "Class::overloaded_method"
151+
// FIND-OVERLOAD-BASE-DAG: Function: id = {{.*}}, name = "int Class::overloaded_method(bool)"
152152
// FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "_Bool (void)"
153153
// FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "_Bool (int)"
154154
// FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "int (_Bool)"
155-
// FIND-OVERLOAD-BASE-DAG: Function: id = {{.*}}, name = "overloaded_method"
155+
// FIND-OVERLOAD-BASE-DAG: Function: id = {{.*}}, name = "char overloaded_method(void)"
156+
// FIND-OVERLOAD-BASE-DAG: Function: id = {{.*}}, name = "char overloaded_method(int)"
156157
// FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "char (void)"
157158
// FIND-OVERLOAD-BASE-DAG: FuncType: id = {{.*}}, compiler_type = "char (int)"
158159

159160
// FIND-OVERLOAD-METHOD-NOT: "overloaded_method"
160161
// FIND-OVERLOAD-METHOD-DAG: Function: id = {{.*}}, name = "{{.*}}Struct::overloaded_method{{.*}}"
161162
// FIND-OVERLOAD-METHOD-DAG: FuncType: id = {{.*}}, compiler_type = "int (void)"
162163
// FIND-OVERLOAD-METHOD-DAG: FuncType: id = {{.*}}, compiler_type = "int (char)"
163-
// FIND-OVERLOAD-METHOD-DAG: Function: id = {{.*}}, name = "Class::overloaded_method"
164+
// FIND-OVERLOAD-METHOD-DAG: Function: id = {{.*}}, name = "bool Class::overloaded_method(void)"
164165
// FIND-OVERLOAD-METHOD-DAG: FuncType: id = {{.*}}, compiler_type = "_Bool (void)"
165166
// FIND-OVERLOAD-METHOD-DAG: FuncType: id = {{.*}}, compiler_type = "_Bool (int)"

lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int main(int argc, char **argv) {
5555
// CHECK-NEXT: (lldb) step
5656
// CHECK-NEXT: Process {{.*}} stopped
5757
// CHECK-NEXT: * thread #1, stop reason = step in
58-
// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
58+
// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`int Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
5959
// CHECK-NEXT: 6
6060
// CHECK-NEXT: 7
6161
// CHECK-NEXT: 8 int Function(int Param1, char Param2) {
@@ -71,7 +71,7 @@ int main(int argc, char **argv) {
7171
// CHECK-NEXT: (lldb) step
7272
// CHECK-NEXT: Process {{.*}} stopped
7373
// CHECK-NEXT: * thread #1, stop reason = step in
74-
// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
74+
// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`int Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
7575
// CHECK-NEXT: 7
7676
// CHECK-NEXT: 8 int Function(int Param1, char Param2) {
7777
// CHECK-NEXT: 9 unsigned Local1 = Param1 + 1;
@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
8989
// CHECK-NEXT: (lldb) step
9090
// CHECK-NEXT: Process {{.*}} stopped
9191
// CHECK-NEXT: * thread #1, stop reason = step in
92-
// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
92+
// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`int Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
9393
// CHECK-NEXT: 8 int Function(int Param1, char Param2) {
9494
// CHECK-NEXT: 9 unsigned Local1 = Param1 + 1;
9595
// CHECK-NEXT: 10 char Local2 = Param2 + 1;
@@ -109,7 +109,7 @@ int main(int argc, char **argv) {
109109
// CHECK-NEXT: (lldb) step
110110
// CHECK-NEXT: Process {{.*}} stopped
111111
// CHECK-NEXT: * thread #1, stop reason = step in
112-
// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
112+
// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`int Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
113113
// CHECK-NEXT: 9 unsigned Local1 = Param1 + 1;
114114
// CHECK-NEXT: 10 char Local2 = Param2 + 1;
115115
// CHECK-NEXT: 11 ++Local1;
@@ -129,7 +129,7 @@ int main(int argc, char **argv) {
129129
// CHECK-NEXT: (lldb) step
130130
// CHECK-NEXT: Process {{.*}} stopped
131131
// CHECK-NEXT: * thread #1, stop reason = step in
132-
// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
132+
// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`int Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
133133
// CHECK-NEXT: 10 char Local2 = Param2 + 1;
134134
// CHECK-NEXT: 11 ++Local1;
135135
// CHECK-NEXT: 12 ++Local2;

lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ int main(int argc, char **argv) {
2424

2525
// CHECK: (lldb) thread backtrace
2626
// CHECK-NEXT: * thread #1, stop reason = breakpoint 1.1
27-
// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method(this={{.*}}, a=2, b=2) at stack_unwinding01.cpp:12
27+
// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=2, b=2) at stack_unwinding01.cpp:12
2828
// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`main(argc={{.*}}, argv={{.*}}) at stack_unwinding01.cpp:20
2929

3030

3131
// CHECK: (lldb) thread backtrace
3232
// CHECK-NEXT: * thread #1, stop reason = breakpoint 1.1
33-
// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method(this={{.*}}, a=3, b=2) at stack_unwinding01.cpp:12
34-
// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method(this={{.*}}, a=2, b=2) at stack_unwinding01.cpp:12
33+
// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=3, b=2) at stack_unwinding01.cpp:12
34+
// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=2, b=2) at stack_unwinding01.cpp:12
3535
// CHECK-NEXT: frame #2: {{.*}} stack_unwinding01.cpp.tmp.exe`main(argc={{.*}}, argv={{.*}}) at stack_unwinding01.cpp:20
3636

3737
// CHECK: (lldb) thread backtrace
3838
// CHECK-NEXT: * thread #1, stop reason = breakpoint 1.1
39-
// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method(this={{.*}}, a=4, b=2) at stack_unwinding01.cpp:12
40-
// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method(this={{.*}}, a=3, b=2) at stack_unwinding01.cpp:12
41-
// CHECK-NEXT: frame #2: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method(this={{.*}}, a=2, b=2) at stack_unwinding01.cpp:12
39+
// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=4, b=2) at stack_unwinding01.cpp:12
40+
// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=3, b=2) at stack_unwinding01.cpp:12
41+
// CHECK-NEXT: frame #2: {{.*}} stack_unwinding01.cpp.tmp.exe`void Struct::simple_method(this={{.*}}, a=2, b=2) at stack_unwinding01.cpp:12
4242
// CHECK-NEXT: frame #3: {{.*}} stack_unwinding01.cpp.tmp.exe`main(argc={{.*}}, argv={{.*}}) at stack_unwinding01.cpp:20

0 commit comments

Comments
 (0)