@@ -309,7 +309,7 @@ uint64_t DWARFDebugLine::Prologue::getLength() const {
309
309
310
310
Error DWARFDebugLine::Prologue::parse (
311
311
const DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr,
312
- function_ref<void (Error)> RecoverableErrorCallback , const DWARFContext &Ctx,
312
+ function_ref<void (Error)> RecoverableErrorHandler , const DWARFContext &Ctx,
313
313
const DWARFUnit *U) {
314
314
const uint64_t PrologueOffset = *OffsetPtr;
315
315
@@ -365,7 +365,7 @@ Error DWARFDebugLine::Prologue::parse(
365
365
if (Error E =
366
366
parseV5DirFileTables (DebugLineData, OffsetPtr, FormParams, Ctx, U,
367
367
ContentTypes, IncludeDirectories, FileNames)) {
368
- RecoverableErrorCallback (joinErrors (
368
+ RecoverableErrorHandler (joinErrors (
369
369
createStringError (
370
370
errc::invalid_argument,
371
371
" parsing line table prologue at 0x%8.8" PRIx64
@@ -384,7 +384,7 @@ Error DWARFDebugLine::Prologue::parse(
384
384
ContentTypes, IncludeDirectories, FileNames);
385
385
386
386
if (*OffsetPtr != EndPrologueOffset) {
387
- RecoverableErrorCallback (createStringError (
387
+ RecoverableErrorHandler (createStringError (
388
388
errc::invalid_argument,
389
389
" parsing line table prologue at 0x%8.8" PRIx64
390
390
" should have ended at 0x%8.8" PRIx64 " but it ended at 0x%8.8" PRIx64,
@@ -510,7 +510,7 @@ DWARFDebugLine::getLineTable(uint64_t Offset) const {
510
510
511
511
Expected<const DWARFDebugLine::LineTable *> DWARFDebugLine::getOrParseLineTable (
512
512
DWARFDataExtractor &DebugLineData, uint64_t Offset, const DWARFContext &Ctx,
513
- const DWARFUnit *U, function_ref<void (Error)> RecoverableErrorCallback ) {
513
+ const DWARFUnit *U, function_ref<void (Error)> RecoverableErrorHandler ) {
514
514
if (!DebugLineData.isValidOffset (Offset))
515
515
return createStringError (errc::invalid_argument, " offset 0x%8.8" PRIx64
516
516
" is not a valid debug line section offset" ,
@@ -521,7 +521,7 @@ Expected<const DWARFDebugLine::LineTable *> DWARFDebugLine::getOrParseLineTable(
521
521
LineTable *LT = &Pos.first ->second ;
522
522
if (Pos.second ) {
523
523
if (Error Err =
524
- LT->parse (DebugLineData, &Offset, Ctx, U, RecoverableErrorCallback ))
524
+ LT->parse (DebugLineData, &Offset, Ctx, U, RecoverableErrorHandler ))
525
525
return std::move (Err);
526
526
return LT;
527
527
}
@@ -531,13 +531,13 @@ Expected<const DWARFDebugLine::LineTable *> DWARFDebugLine::getOrParseLineTable(
531
531
Error DWARFDebugLine::LineTable::parse (
532
532
DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr,
533
533
const DWARFContext &Ctx, const DWARFUnit *U,
534
- function_ref<void (Error)> RecoverableErrorCallback , raw_ostream *OS) {
534
+ function_ref<void (Error)> RecoverableErrorHandler , raw_ostream *OS) {
535
535
const uint64_t DebugLineOffset = *OffsetPtr;
536
536
537
537
clear ();
538
538
539
- Error PrologueErr = Prologue. parse (DebugLineData, OffsetPtr,
540
- RecoverableErrorCallback , Ctx, U);
539
+ Error PrologueErr =
540
+ Prologue. parse (DebugLineData, OffsetPtr, RecoverableErrorHandler , Ctx, U);
541
541
542
542
if (OS) {
543
543
// The presence of OS signals verbose dumping.
@@ -555,7 +555,7 @@ Error DWARFDebugLine::LineTable::parse(
555
555
assert (DebugLineData.size () > DebugLineOffset &&
556
556
" prologue parsing should handle invalid offset" );
557
557
uint64_t BytesRemaining = DebugLineData.size () - DebugLineOffset;
558
- RecoverableErrorCallback (
558
+ RecoverableErrorHandler (
559
559
createStringError (errc::invalid_argument,
560
560
" line table program with offset 0x%8.8" PRIx64
561
561
" has length 0x%8.8" PRIx64 " but only 0x%8.8" PRIx64
@@ -633,7 +633,7 @@ Error DWARFDebugLine::LineTable::parse(
633
633
{
634
634
uint8_t ExtractorAddressSize = DebugLineData.getAddressSize ();
635
635
if (ExtractorAddressSize != Len - 1 && ExtractorAddressSize != 0 )
636
- RecoverableErrorCallback (createStringError (
636
+ RecoverableErrorHandler (createStringError (
637
637
errc::invalid_argument,
638
638
" mismatching address size at offset 0x%8.8" PRIx64
639
639
" expected 0x%2.2" PRIx8 " found 0x%2.2" PRIx64,
@@ -711,7 +711,7 @@ Error DWARFDebugLine::LineTable::parse(
711
711
// by the table.
712
712
uint64_t End = ExtOffset + Len;
713
713
if (*OffsetPtr != End) {
714
- RecoverableErrorCallback (createStringError (
714
+ RecoverableErrorHandler (createStringError (
715
715
errc::illegal_byte_sequence,
716
716
" unexpected line op length at offset 0x%8.8" PRIx64
717
717
" expected 0x%2.2" PRIx64 " found 0x%2.2" PRIx64,
@@ -918,7 +918,7 @@ Error DWARFDebugLine::LineTable::parse(
918
918
}
919
919
920
920
if (!State.Sequence .Empty )
921
- RecoverableErrorCallback (createStringError (
921
+ RecoverableErrorHandler (createStringError (
922
922
errc::illegal_byte_sequence,
923
923
" last sequence in debug line table at offset 0x%8.8" PRIx64
924
924
" is not terminated" ,
@@ -1163,31 +1163,31 @@ bool DWARFDebugLine::Prologue::totalLengthIsValid() const {
1163
1163
}
1164
1164
1165
1165
DWARFDebugLine::LineTable DWARFDebugLine::SectionParser::parseNext (
1166
- function_ref<void (Error)> RecoverableErrorCallback ,
1167
- function_ref<void(Error)> UnrecoverableErrorCallback , raw_ostream *OS) {
1166
+ function_ref<void (Error)> RecoverableErrorHandler ,
1167
+ function_ref<void(Error)> UnrecoverableErrorHandler , raw_ostream *OS) {
1168
1168
assert (DebugLineData.isValidOffset (Offset) &&
1169
1169
" parsing should have terminated" );
1170
1170
DWARFUnit *U = prepareToParse (Offset);
1171
1171
uint64_t OldOffset = Offset;
1172
1172
LineTable LT;
1173
1173
if (Error Err = LT.parse (DebugLineData, &Offset, Context, U,
1174
- RecoverableErrorCallback , OS))
1175
- UnrecoverableErrorCallback (std::move (Err));
1174
+ RecoverableErrorHandler , OS))
1175
+ UnrecoverableErrorHandler (std::move (Err));
1176
1176
moveToNextTable (OldOffset, LT.Prologue );
1177
1177
return LT;
1178
1178
}
1179
1179
1180
1180
void DWARFDebugLine::SectionParser::skip (
1181
- function_ref<void (Error)> RecoverableErrorCallback ,
1182
- function_ref<void(Error)> UnrecoverableErrorCallback ) {
1181
+ function_ref<void (Error)> RecoverableErrorHandler ,
1182
+ function_ref<void(Error)> UnrecoverableErrorHandler ) {
1183
1183
assert (DebugLineData.isValidOffset (Offset) &&
1184
1184
" parsing should have terminated" );
1185
1185
DWARFUnit *U = prepareToParse (Offset);
1186
1186
uint64_t OldOffset = Offset;
1187
1187
LineTable LT;
1188
1188
if (Error Err = LT.Prologue .parse (DebugLineData, &Offset,
1189
- RecoverableErrorCallback , Context, U))
1190
- UnrecoverableErrorCallback (std::move (Err));
1189
+ RecoverableErrorHandler , Context, U))
1190
+ UnrecoverableErrorHandler (std::move (Err));
1191
1191
moveToNextTable (OldOffset, LT.Prologue );
1192
1192
}
1193
1193
0 commit comments