mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Patch to set is_stmt a little better for prologue lines in a function.
This enables debuggers to see what are interesting lines for a breakpoint rather than any line that starts a function. rdar://9852092 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
740cd657f3
commit
60b35f408b
@ -1093,12 +1093,15 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) {
|
|||||||
if (!MI->isDebugValue()) {
|
if (!MI->isDebugValue()) {
|
||||||
DebugLoc DL = MI->getDebugLoc();
|
DebugLoc DL = MI->getDebugLoc();
|
||||||
if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) {
|
if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) {
|
||||||
unsigned Flags = DWARF2_FLAG_IS_STMT;
|
unsigned Flags = 0;
|
||||||
PrevInstLoc = DL;
|
PrevInstLoc = DL;
|
||||||
if (DL == PrologEndLoc) {
|
if (DL == PrologEndLoc) {
|
||||||
Flags |= DWARF2_FLAG_PROLOGUE_END;
|
Flags |= DWARF2_FLAG_PROLOGUE_END;
|
||||||
PrologEndLoc = DebugLoc();
|
PrologEndLoc = DebugLoc();
|
||||||
}
|
}
|
||||||
|
if (PrologEndLoc.isUnknown())
|
||||||
|
Flags |= DWARF2_FLAG_IS_STMT;
|
||||||
|
|
||||||
if (!DL.isUnknown()) {
|
if (!DL.isUnknown()) {
|
||||||
const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
|
const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
|
||||||
recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags);
|
recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags);
|
||||||
@ -1378,7 +1381,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
|
|||||||
MF->getFunction()->getContext());
|
MF->getFunction()->getContext());
|
||||||
recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
|
recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
|
||||||
FnStartDL.getScope(MF->getFunction()->getContext()),
|
FnStartDL.getScope(MF->getFunction()->getContext()),
|
||||||
DWARF2_FLAG_IS_STMT);
|
0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
|
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
|
||||||
; RUN: llvm-dwarfdump %t | FileCheck %s
|
; RUN: llvm-dwarfdump %t | FileCheck %s
|
||||||
|
|
||||||
; Check that the line table starts at 7, not 4.
|
; Check that the line table starts at 7, not 4, but that the first
|
||||||
|
; statement isn't until line 8.
|
||||||
|
|
||||||
; CHECK: 0x0000000000000000 7 0 1 0 is_stmt
|
; CHECK-NOT: 0x0000000000000000 7 0 1 0 is_stmt
|
||||||
|
; CHECK: 0x0000000000000000 7 0 1 0
|
||||||
; CHECK: 0x0000000000000004 8 18 1 0 is_stmt prologue_end
|
; CHECK: 0x0000000000000004 8 18 1 0 is_stmt prologue_end
|
||||||
|
|
||||||
define i32 @callee(i32 %x) nounwind uwtable ssp {
|
define i32 @callee(i32 %x) nounwind uwtable ssp {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user