1 |
voyageur 12/07/05 22:27:53 |
2 |
|
3 |
Added: llvm-3.1-fix_debug_line_info.patch |
4 |
Log: |
5 |
Fix line info generation for gdb in clang, thanks Ben Longbons <b.r.longbons@×××××.com> in bug #424199 |
6 |
|
7 |
(Portage version: 2.2.0_alpha116/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-devel/llvm/files/llvm-3.1-fix_debug_line_info.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/llvm-3.1-fix_debug_line_info.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/llvm-3.1-fix_debug_line_info.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: llvm-3.1-fix_debug_line_info.patch |
16 |
=================================================================== |
17 |
From 737fdba46f2b2b7d39bc728d15ea2334c44779e0 Mon Sep 17 00:00:00 2001 |
18 |
From: Ben Longbons <b.r.longbons@×××××.com> |
19 |
Date: Fri, 29 Jun 2012 12:58:34 -0700 |
20 |
Subject: [PATCH] Revert "Patch to set is_stmt a little better for prologue |
21 |
lines in a function." |
22 |
|
23 |
This meants that the debugger could find meaningful line information. |
24 |
|
25 |
This reverts commit 60b35f408bc3194e7ea4e96367c0b42dc5e7f850. |
26 |
--- |
27 |
lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 ++----- |
28 |
test/DebugInfo/X86/ending-run.ll | 6 ++---- |
29 |
2 files changed, 4 insertions(+), 9 deletions(-) |
30 |
|
31 |
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp |
32 |
index 3e79a6d..24aedfb 100644 |
33 |
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp |
34 |
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp |
35 |
@@ -1093,15 +1093,12 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) { |
36 |
if (!MI->isDebugValue()) { |
37 |
DebugLoc DL = MI->getDebugLoc(); |
38 |
if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) { |
39 |
- unsigned Flags = 0; |
40 |
+ unsigned Flags = DWARF2_FLAG_IS_STMT; |
41 |
PrevInstLoc = DL; |
42 |
if (DL == PrologEndLoc) { |
43 |
Flags |= DWARF2_FLAG_PROLOGUE_END; |
44 |
PrologEndLoc = DebugLoc(); |
45 |
} |
46 |
- if (PrologEndLoc.isUnknown()) |
47 |
- Flags |= DWARF2_FLAG_IS_STMT; |
48 |
- |
49 |
if (!DL.isUnknown()) { |
50 |
const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext()); |
51 |
recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags); |
52 |
@@ -1382,7 +1379,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { |
53 |
MF->getFunction()->getContext()); |
54 |
recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(), |
55 |
FnStartDL.getScope(MF->getFunction()->getContext()), |
56 |
- 0); |
57 |
+ DWARF2_FLAG_IS_STMT); |
58 |
} |
59 |
} |
60 |
|
61 |
diff --git a/test/DebugInfo/X86/ending-run.ll b/test/DebugInfo/X86/ending-run.ll |
62 |
index 6935c47..0cd3de1 100644 |
63 |
--- a/test/DebugInfo/X86/ending-run.ll |
64 |
+++ b/test/DebugInfo/X86/ending-run.ll |
65 |
@@ -1,11 +1,9 @@ |
66 |
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj |
67 |
; RUN: llvm-dwarfdump %t | FileCheck %s |
68 |
|
69 |
-; Check that the line table starts at 7, not 4, but that the first |
70 |
-; statement isn't until line 8. |
71 |
+; Check that the line table starts at 7, not 4. |
72 |
|
73 |
-; CHECK-NOT: 0x0000000000000000 7 0 1 0 is_stmt |
74 |
-; CHECK: 0x0000000000000000 7 0 1 0 |
75 |
+; CHECK: 0x0000000000000000 7 0 1 0 is_stmt |
76 |
; CHECK: 0x0000000000000004 8 18 1 0 is_stmt prologue_end |
77 |
|
78 |
define i32 @callee(i32 %x) nounwind uwtable ssp { |
79 |
-- |
80 |
1.7.10 |