Changeset View
Changeset View
Standalone View
Standalone View
src/DwarfParser.hpp
Show First 20 Lines • Show All 673 Lines • ▼ Show 20 Lines | case DW_CFA_GNU_negative_offset_extended: | ||||
* cieInfo.dataAlignFactor; | * cieInfo.dataAlignFactor; | ||||
results->savedRegisters[reg].location = kRegisterInCFA; | results->savedRegisters[reg].location = kRegisterInCFA; | ||||
results->savedRegisters[reg].value = -offset; | results->savedRegisters[reg].value = -offset; | ||||
_LIBUNWIND_TRACE_DWARF( | _LIBUNWIND_TRACE_DWARF( | ||||
"DW_CFA_GNU_negative_offset_extended(%" PRId64 ")\n", offset); | "DW_CFA_GNU_negative_offset_extended(%" PRId64 ")\n", offset); | ||||
break; | break; | ||||
#if defined(_LIBUNWIND_TARGET_AARCH64) | #if defined(_LIBUNWIND_TARGET_AARCH64) | ||||
case DW_CFA_AARCH64_negate_ra_state: | case DW_CFA_AARCH64_negate_ra_state: | ||||
mgorny: Could you add a `static_assert` that verifies that the constants indeed have the same value? | |||||
results->savedRegisters[UNW_ARM64_RA_SIGN_STATE].value ^= 0x1; | results->savedRegisters[UNW_ARM64_RA_SIGN_STATE].value ^= 0x1; | ||||
_LIBUNWIND_TRACE_DWARF("DW_CFA_AARCH64_negate_ra_state\n"); | _LIBUNWIND_TRACE_DWARF("DW_CFA_AARCH64_negate_ra_state\n"); | ||||
Not Done ReplyInline Actions/var/tmp/portage/sys-libs/llvm-libunwind-9999/work/llvm-libunwind-9999/src/DwarfParser.hpp:686:75: error: macro "static_assert" requires 2 argument s, but only 1 given static_assert(DW_CFA_AARCH64_negate_ra_state == DW_CFA_GNU_window_save); ^ mgorny: ```
/var/tmp/portage/sys-libs/llvm-libunwind-9999/work/llvm-libunwind-9999/src/DwarfParser.hpp… | |||||
break; | break; | ||||
#endif | #endif | ||||
Not Done ReplyInline ActionsShould this be wrapped in #ifdef _LIBUNWIND_TARGET_SPARC ? mclow.lists: Should this be wrapped in `#ifdef _LIBUNWIND_TARGET_SPARC ` ? | |||||
Not Done ReplyInline ActionsYes, it probably should. I will fix that. dcederman: Yes, it probably should. I will fix that. | |||||
#if defined(_LIBUNWIND_TARGET_SPARC) | |||||
case DW_CFA_GNU_window_save: | |||||
for (reg = UNW_SPARC_O0; reg <= UNW_SPARC_O7; reg++) { | |||||
results->savedRegisters[reg].location = kRegisterInRegister; | |||||
results->savedRegisters[reg].value = | |||||
(reg - UNW_SPARC_O0) + UNW_SPARC_I0; | |||||
} | |||||
for (reg = UNW_SPARC_L0; reg <= UNW_SPARC_I7; reg++) { | |||||
results->savedRegisters[reg].location = kRegisterInCFA; | |||||
results->savedRegisters[reg].value = (reg - UNW_SPARC_L0) * 4; | |||||
} | |||||
_LIBUNWIND_TRACE_DWARF("DW_CFA_window_save()\n"); | |||||
Not Done ReplyInline ActionsCould you put this before the execution of the op please? compnerd: Could you put this before the execution of the op please? | |||||
Sure. But for the other ops the trace printout is placed after the op, so this would break that pattern? dcederman: Sure. But for the other ops the trace printout is placed after the op, so this would break that… | |||||
break; | |||||
#endif | |||||
default: | default: | ||||
operand = opcode & 0x3F; | operand = opcode & 0x3F; | ||||
switch (opcode & 0xC0) { | switch (opcode & 0xC0) { | ||||
case DW_CFA_offset: | case DW_CFA_offset: | ||||
reg = operand; | reg = operand; | ||||
if (reg > kMaxRegisterNumber) { | if (reg > kMaxRegisterNumber) { | ||||
_LIBUNWIND_LOG("malformed DW_CFA_offset DWARF unwind, reg (%" PRIu64 | _LIBUNWIND_LOG("malformed DW_CFA_offset DWARF unwind, reg (%" PRIu64 | ||||
") out of range", | ") out of range", | ||||
Show All 40 Lines |
Could you add a static_assert that verifies that the constants indeed have the same value?