mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +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:
@@ -931,8 +931,9 @@ void AsmPrinter::EmitDwarfRegOp(const MachineLocation &MLoc,
|
||||
} else {
|
||||
OutStreamer.AddComment("DW_OP_piece");
|
||||
EmitInt8(dwarf::DW_OP_piece);
|
||||
OutStreamer.AddComment(Twine(Size));
|
||||
EmitULEB128(Size);
|
||||
unsigned ByteSize = Size / 8; // Assuming 8 bits per byte.
|
||||
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, Offset);
|
||||
} 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, Size);
|
||||
addUInt(TheDie, dwarf::DW_FORM_data1, ByteSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user