mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
rdar://problem/16015314 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201253 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
386fedd32e
commit
4c1ea6b115
@ -931,8 +931,9 @@ void AsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc,
|
|||||||
} else {
|
} else {
|
||||||
OutStreamer.AddComment("DW_OP_piece");
|
OutStreamer.AddComment("DW_OP_piece");
|
||||||
EmitInt8(dwarf::DW_OP_piece);
|
EmitInt8(dwarf::DW_OP_piece);
|
||||||
OutStreamer.AddComment(Twine(Size));
|
unsigned ByteSize = Size / 8; // Assuming 8 bits per byte.
|
||||||
EmitULEB128(Size);
|
OutStreamer.AddComment(Twine(ByteSize));
|
||||||
|
EmitULEB128(ByteSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -470,8 +470,9 @@ void DwarfUnit::addRegisterOp(DIEBlock *TheDie, unsigned Reg) {
|
|||||||
addUInt(TheDie, dwarf::DW_FORM_data1, Size);
|
addUInt(TheDie, dwarf::DW_FORM_data1, Size);
|
||||||
addUInt(TheDie, dwarf::DW_FORM_data1, Offset);
|
addUInt(TheDie, dwarf::DW_FORM_data1, Offset);
|
||||||
} else {
|
} else {
|
||||||
|
unsigned ByteSize = Size / 8; // Assuming 8 bits per byte.
|
||||||
addUInt(TheDie, dwarf::DW_FORM_data1, dwarf::DW_OP_piece);
|
addUInt(TheDie, dwarf::DW_FORM_data1, dwarf::DW_OP_piece);
|
||||||
addUInt(TheDie, dwarf::DW_FORM_data1, Size);
|
addUInt(TheDie, dwarf::DW_FORM_data1, ByteSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
; CHECK: .byte 80 # DW_OP_reg0
|
; CHECK: .byte 80 # DW_OP_reg0
|
||||||
; CHECK: .byte 147 # DW_OP_piece
|
; CHECK: .byte 147 # DW_OP_piece
|
||||||
; CHECK: .byte 16 # 16
|
; CHECK: .byte 2 # 2
|
||||||
|
|
||||||
define i16 @f(i16 signext %zzz) nounwind {
|
define i16 @f(i16 signext %zzz) nounwind {
|
||||||
entry:
|
entry:
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
; rdar://problem/16015314
|
; rdar://problem/16015314
|
||||||
;
|
;
|
||||||
; CHECK: DW_AT_name [DW_FORM_strp]{{.*}} "a"
|
; CHECK: DW_AT_name [DW_FORM_strp]{{.*}} "a"
|
||||||
; CHECK: DW_AT_location [DW_FORM_block1] (<0x03> 54 93 20 )
|
; CHECK: DW_AT_location [DW_FORM_block1] (<0x03> 54 93 04 )
|
||||||
;
|
;
|
||||||
; struct bar {
|
; struct bar {
|
||||||
; int a;
|
; int a;
|
||||||
|
Loading…
Reference in New Issue
Block a user