forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (l…
…lvm#99629) Some of SIE's post-mortem analysis infrastructure currently makes use of .debug_aranges, so we'd like to ensure the section's presence in PlayStation binaries. The simplest way to do this is force emission when the debugger tuning is set to SCE (which is in turn typically initialized from the target triple). This also simplifies the driver. SIE tracker: TOOLCHAIN-16951
- Loading branch information
1 parent
04760bf
commit 22eb290
Showing
8 changed files
with
57 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
; This checks that .debug_aranges is always generated for the SCE debugger | ||
; tuning. | ||
|
||
; RUN: llc -mtriple=x86_64 -debugger-tune=sce -filetype=obj %s -o %t | ||
; RUN: llvm-dwarfdump -debug-aranges %t | FileCheck %s | ||
|
||
; CHECK: .debug_aranges contents: | ||
; CHECK-NEXT: Address Range Header: | ||
; CHECK-SAME: length = 0x0000002c, | ||
|
||
; IR generated and reduced from: | ||
; $ cat foo.c | ||
; int foo; | ||
; $ clang -g -S -emit-llvm foo.c -o foo.ll | ||
|
||
target triple = "x86_64-unknown-linux-gnu" | ||
|
||
@foo = dso_local global i32 0, align 4, !dbg !0 | ||
|
||
!llvm.dbg.cu = !{!2} | ||
!llvm.module.flags = !{!6, !7, !8} | ||
!llvm.ident = !{!9} | ||
|
||
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) | ||
!1 = distinct !DIGlobalVariable(name: "foo", scope: !2, file: !3, line: 1, type: !5, isLocal: false, isDefinition: true) | ||
!2 = distinct !DICompileUnit(language: DW_LANG_C11, file: !3, producer: "clang version 19.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None) | ||
!3 = !DIFile(filename: "foo.c", directory: "/tmp") | ||
!4 = !{!0} | ||
!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) | ||
!6 = !{i32 7, !"Dwarf Version", i32 5} | ||
!7 = !{i32 2, !"Debug Info Version", i32 3} | ||
!8 = !{i32 1, !"wchar_size", i32 4} | ||
!9 = !{!"clang version 19.0.0"} |