[Lldb-commits] [lldb] [lldb] Extend FindTypes to optionally search by mangled type name (PR #113007)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 30 11:47:56 PDT 2024
================
@@ -0,0 +1,63 @@
+; Test finding types by CompilerContext.
+; REQUIRES: aarch64
+; RUN: llc %s -filetype=obj -o %t.o
+; RUN: lldb-test symbols %t.o -find=type --mangled-name=UniqueDifferentName | FileCheck %s
+;
+; NORESULTS: Found 0 types
+; CHECK: Found 1 types:
+; CHECK: struct DifferentName {
+; CHECK-NEXT: int i;
+; CHECK-NEXT: }
+
+source_filename = "t.c"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
+target triple = "arm64-unknown-linux-gnu"
+
+%struct.SameName = type { i32 }
+%struct.DifferentName = type { i32 }
+
+; Function Attrs: noinline nounwind optnone uwtable
+define dso_local i32 @main() #0 !dbg !10 {
+entry:
+ %retval = alloca i32, align 4
+ %s = alloca %struct.SameName, align 4
+ %d = alloca %struct.DifferentName, align 4
+ store i32 0, ptr %retval, align 4
+ #dbg_declare(ptr %s, !16, !DIExpression(), !20)
+ #dbg_declare(ptr %d, !21, !DIExpression(), !25)
+ ret i32 0, !dbg !26
+}
+
+attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+fp-armv8,+neon,+v8a,-fmv" }
----------------
adrian-prantl wrote:
Can you try to remove most of the attributes?
https://github.com/llvm/llvm-project/pull/113007
More information about the lldb-commits
mailing list