Lines Matching +full:no +full:- +full:big +full:- +full:frame +full:- +full:no

1 //===----------------------------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
10 //===----------------------------------------------------------------------===//
28 /// CFI_Parser does basic parsing of a CFI (Call Frame Information) records.
30 /// http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
58 /// Information about an FDE (Frame Description Entry)
85 /// Information about a frame layout and registers saved determined
146 PrologInfoStackEntry *next = entry->next; in ~RememberStack()
168 /// true, treat cieInfo as already-parsed CIE_Info (whose start offset
189 pint_t cieStart = p - ciePointer; in decodeFDE()
191 if (cieInfo->cieStart != cieStart) in decodeFDE()
201 addressSpace.getEncodedP(p, nextCFI, cieInfo->pointerEncoding); in decodeFDE()
203 addressSpace.getEncodedP(p, nextCFI, cieInfo->pointerEncoding & 0x0F); in decodeFDE()
205 fdeInfo->lsda = 0; in decodeFDE()
207 if (cieInfo->fdesHaveAugmentationData) { in decodeFDE()
210 if (cieInfo->lsdaEncoding != DW_EH_PE_omit) { in decodeFDE()
211 // Peek at value (without indirection). Zero means no LSDA. in decodeFDE()
213 if (addressSpace.getEncodedP(p, nextCFI, cieInfo->lsdaEncoding & 0x0F) != in decodeFDE()
215 // Reset pointer and re-parse LSDA address. in decodeFDE()
217 fdeInfo->lsda = in decodeFDE()
218 addressSpace.getEncodedP(p, nextCFI, cieInfo->lsdaEncoding); in decodeFDE()
223 fdeInfo->fdeStart = fdeStart; in decodeFDE()
224 fdeInfo->fdeLength = nextCFI - fdeStart; in decodeFDE()
225 fdeInfo->fdeInstructions = p; in decodeFDE()
226 fdeInfo->pcStart = pcStart; in decodeFDE()
227 fdeInfo->pcEnd = pcStart + pcRange; in decodeFDE()
239 ? static_cast<pint_t>(-1) in findFDE()
261 pint_t cieStart = p - ciePointer; in findFDE()
268 addressSpace.getEncodedP(p, nextCFI, cieInfo->pointerEncoding); in findFDE()
270 p, nextCFI, cieInfo->pointerEncoding & 0x0F); in findFDE()
274 fdeInfo->lsda = 0; in findFDE()
276 if (cieInfo->fdesHaveAugmentationData) { in findFDE()
279 if (cieInfo->lsdaEncoding != DW_EH_PE_omit) { in findFDE()
280 // Peek at value (without indirection). Zero means no LSDA. in findFDE()
283 p, nextCFI, cieInfo->lsdaEncoding & 0x0F) != 0) { in findFDE()
284 // Reset pointer and re-parse LSDA address. in findFDE()
286 fdeInfo->lsda = addressSpace in findFDE()
287 .getEncodedP(p, nextCFI, cieInfo->lsdaEncoding); in findFDE()
292 fdeInfo->fdeStart = currentCFI; in findFDE()
293 fdeInfo->fdeLength = nextCFI - currentCFI; in findFDE()
294 fdeInfo->fdeInstructions = p; in findFDE()
295 fdeInfo->pcStart = pcStart; in findFDE()
296 fdeInfo->pcEnd = pcStart + pcRange; in findFDE()
317 cieInfo->pointerEncoding = 0; in parseCIE()
318 cieInfo->lsdaEncoding = DW_EH_PE_omit; in parseCIE()
319 cieInfo->personalityEncoding = 0; in parseCIE()
320 cieInfo->personalityOffsetInCIE = 0; in parseCIE()
321 cieInfo->personality = 0; in parseCIE()
322 cieInfo->codeAlignFactor = 0; in parseCIE()
323 cieInfo->dataAlignFactor = 0; in parseCIE()
324 cieInfo->isSignalFrame = false; in parseCIE()
325 cieInfo->fdesHaveAugmentationData = false; in parseCIE()
327 cieInfo->addressesSignedWithBKey = false; in parseCIE()
328 cieInfo->mteTaggedFrame = false; in parseCIE()
330 cieInfo->cieStart = cie; in parseCIE()
358 cieInfo->codeAlignFactor = (uint32_t)addressSpace.getULEB128(p, cieContentEnd); in parseCIE()
360 cieInfo->dataAlignFactor = (int)addressSpace.getSLEB128(p, cieContentEnd); in parseCIE()
365 cieInfo->returnAddressRegister = (uint8_t)raReg; in parseCIE()
374 cieInfo->fdesHaveAugmentationData = true; in parseCIE()
377 cieInfo->personalityEncoding = addressSpace.get8(p); in parseCIE()
379 cieInfo->personalityOffsetInCIE = (uint8_t)(p - cie); in parseCIE()
380 cieInfo->personality = addressSpace in parseCIE()
381 .getEncodedP(p, cieContentEnd, cieInfo->personalityEncoding); in parseCIE()
384 cieInfo->lsdaEncoding = addressSpace.get8(p); in parseCIE()
388 cieInfo->pointerEncoding = addressSpace.get8(p); in parseCIE()
392 cieInfo->isSignalFrame = true; in parseCIE()
396 cieInfo->addressesSignedWithBKey = true; in parseCIE()
399 cieInfo->mteTaggedFrame = true; in parseCIE()
408 cieInfo->cieLength = cieContentEnd - cieInfo->cieStart; in parseCIE()
409 cieInfo->cieInstructions = p; in parseCIE()
434 (pint_t)(-1)}, in parseFDEInstructions()
436 upToPC - fdeInfo.pcStart}}; in parseFDEInstructions()
495 "malformed DW_CFA_offset_extended DWARF unwind, reg too big"); in parseFDEInstructions()
498 results->setRegister(reg, kRegisterInCFA, offset, initialState); in parseFDEInstructions()
507 "malformed DW_CFA_restore_extended DWARF unwind, reg too big"); in parseFDEInstructions()
510 results->restoreRegisterToInitialState(reg, initialState); in parseFDEInstructions()
518 "malformed DW_CFA_undefined DWARF unwind, reg too big"); in parseFDEInstructions()
521 results->setRegisterLocation(reg, kRegisterUnused, initialState); in parseFDEInstructions()
528 "malformed DW_CFA_same_value DWARF unwind, reg too big"); in parseFDEInstructions()
532 // "same value" means register was stored in frame, but its current in parseFDEInstructions()
533 // value has not changed, so no need to restore from frame. in parseFDEInstructions()
535 results->setRegisterLocation(reg, kRegisterUnused, initialState); in parseFDEInstructions()
543 "malformed DW_CFA_register DWARF unwind, reg too big"); in parseFDEInstructions()
548 "malformed DW_CFA_register DWARF unwind, reg2 too big"); in parseFDEInstructions()
551 results->setRegister(reg, kRegisterInRegister, (int64_t)reg2, in parseFDEInstructions()
563 entry->next = rememberStack.entry; in parseFDEInstructions()
564 entry->info = *results; in parseFDEInstructions()
575 *results = top->info; in parseFDEInstructions()
576 rememberStack.entry = top->next; in parseFDEInstructions()
587 _LIBUNWIND_LOG0("malformed DW_CFA_def_cfa DWARF unwind, reg too big"); in parseFDEInstructions()
590 results->cfaRegister = (uint32_t)reg; in parseFDEInstructions()
591 results->cfaRegisterOffset = (int32_t)offset; in parseFDEInstructions()
600 "malformed DW_CFA_def_cfa_register DWARF unwind, reg too big"); in parseFDEInstructions()
603 results->cfaRegister = (uint32_t)reg; in parseFDEInstructions()
607 results->cfaRegisterOffset = in parseFDEInstructions()
610 results->cfaRegisterOffset); in parseFDEInstructions()
613 results->cfaRegister = 0; in parseFDEInstructions()
614 results->cfaExpression = (int64_t)p; in parseFDEInstructions()
620 results->cfaExpression, length); in parseFDEInstructions()
626 "malformed DW_CFA_expression DWARF unwind, reg too big"); in parseFDEInstructions()
629 results->setRegister(reg, kRegisterAtExpression, (int64_t)p, in parseFDEInstructions()
637 reg, results->savedRegisters[reg].value, length); in parseFDEInstructions()
643 "malformed DW_CFA_offset_extended_sf DWARF unwind, reg too big"); in parseFDEInstructions()
648 results->setRegister(reg, kRegisterInCFA, offset, initialState); in parseFDEInstructions()
659 "malformed DW_CFA_def_cfa_sf DWARF unwind, reg too big"); in parseFDEInstructions()
662 results->cfaRegister = (uint32_t)reg; in parseFDEInstructions()
663 results->cfaRegisterOffset = (int32_t)offset; in parseFDEInstructions()
669 results->cfaRegisterOffset = in parseFDEInstructions()
673 results->cfaRegisterOffset); in parseFDEInstructions()
686 results->setRegister(reg, kRegisterOffsetFromCFA, offset, initialState); in parseFDEInstructions()
695 "malformed DW_CFA_val_offset_sf DWARF unwind, reg too big"); in parseFDEInstructions()
700 results->setRegister(reg, kRegisterOffsetFromCFA, offset, initialState); in parseFDEInstructions()
709 "malformed DW_CFA_val_expression DWARF unwind, reg too big"); in parseFDEInstructions()
712 results->setRegister(reg, kRegisterIsExpression, (int64_t)p, in parseFDEInstructions()
720 reg, results->savedRegisters[reg].value, length); in parseFDEInstructions()
724 results->spExtraArgSize = (uint32_t)length; in parseFDEInstructions()
731 "unwind, reg too big"); in parseFDEInstructions()
736 results->setRegister(reg, kRegisterInCFA, -offset, initialState); in parseFDEInstructions()
752 results->savedRegisters[UNW_AARCH64_RA_SIGN_STATE].value ^ 0x1; in parseFDEInstructions()
753 results->setRegisterValue(UNW_AARCH64_RA_SIGN_STATE, value, in parseFDEInstructions()
764 results->setRegister(reg, kRegisterInRegister, in parseFDEInstructions()
765 ((int64_t)reg - UNW_SPARC_O0) + UNW_SPARC_I0, in parseFDEInstructions()
770 results->setRegister(reg, kRegisterInCFA, in parseFDEInstructions()
771 ((int64_t)reg - UNW_SPARC_L0) * 4, in parseFDEInstructions()
780 // Don't save %o0-%o7 on sparc64. in parseFDEInstructions()
785 results->setRegister( in parseFDEInstructions()
787 static_cast<int64_t>((reg - UNW_SPARC_L0) * sizeof(pint_t)), in parseFDEInstructions()
790 results->setRegister( in parseFDEInstructions()
792 static_cast<int64_t>((reg - UNW_SPARC_L0) * sizeof(pint_t)), in parseFDEInstructions()
818 results->setRegister(reg, kRegisterInCFA, offset, initialState); in parseFDEInstructions()
836 results->restoreRegisterToInitialState(reg, initialState); in parseFDEInstructions()