Author: Jonas Devlieghere Date: 2021-02-05T15:21:24-08:00 New Revision: ac1242bce3657754768928cac36a6d1b1090a857
URL: https://github.com/llvm/llvm-project/commit/ac1242bce3657754768928cac36a6d1b1090a857 DIFF: https://github.com/llvm/llvm-project/commit/ac1242bce3657754768928cac36a6d1b1090a857.diff LOG: [debugserver] Fix more warnings in DNBArchImplARM64 Added: Modified: lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp Removed: ################################################################################ diff --git a/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp b/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp index ab1623ba4217..2ea63333b78f 100644 --- a/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp +++ b/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp @@ -340,6 +340,7 @@ kern_return_t DNBArchMachARM64::GetEXCState(bool force) { return kret; } +#if 0 static void DumpDBGState(const arm_debug_state_t &dbg) { uint32_t i = 0; for (i = 0; i < 16; i++) @@ -348,6 +349,7 @@ static void DumpDBGState(const arm_debug_state_t &dbg) { i, i, dbg.__bvr[i], dbg.__bcr[i], i, i, dbg.__wvr[i], dbg.__wcr[i]); } +#endif kern_return_t DNBArchMachARM64::GetDBGState(bool force) { int set = e_regSetDBG; @@ -502,8 +504,8 @@ bool DNBArchMachARM64::NotifyException(MachException::Data &exc) { "watchpoint %d was hit on address " "0x%llx", hw_index, (uint64_t)addr); - const int num_watchpoints = NumSupportedHardwareWatchpoints(); - for (int i = 0; i < num_watchpoints; i++) { + const uint32_t num_watchpoints = NumSupportedHardwareWatchpoints(); + for (uint32_t i = 0; i < num_watchpoints; i++) { if (LoHi[i] != 0 && LoHi[i] == hw_index && LoHi[i] != i && GetWatchpointAddressByIndex(i) != INVALID_NUB_ADDRESS) { addr = GetWatchpointAddressByIndex(i); @@ -526,7 +528,7 @@ bool DNBArchMachARM64::NotifyException(MachException::Data &exc) { } // detect a __builtin_debugtrap instruction pattern ("brk #0xf000") // and advance the $pc past it, so that the user can continue execution. - // Generally speaking, this knowledge should be centralized in lldb, + // Generally speaking, this knowledge should be centralized in lldb, // recognizing the builtin_trap instruction and knowing how to advance // the pc past it, so that continue etc work. if (exc.exc_data.size() == 2 && exc.exc_data[0] == EXC_ARM_BREAKPOINT) { @@ -819,15 +821,15 @@ uint32_t DNBArchMachARM64::EnableHardwareWatchpoint(nub_addr_t addr, // an 8 byte address, or (2) a power-of-two size region of memory; minimum // 8 bytes, maximum 2GB; the starting address must be aligned to that power // of two. - // + // // For (1), 1-8 byte watchpoints, using the Byte Address Selector field in // DBGWCR<n>.BAS. Any of the bytes may be watched, but if multiple bytes // are watched, the bytes selected must be contiguous. The start address // watched must be doubleword (8-byte) aligned; if the start address is // word (4-byte) aligned, only 4 bytes can be watched. - // + // // For (2), the MASK field in DBGWCR<n>.MASK is used. - // + // // See the ARM ARM, section "Watchpoint exceptions", and more specifically, // "Watchpoint data address comparisons". // @@ -839,9 +841,9 @@ uint32_t DNBArchMachARM64::EnableHardwareWatchpoint(nub_addr_t addr, // "Determining the memory location that caused a Watchpoint exception"), // and silently resume the inferior (disable watchpoint, stepi, re-enable // watchpoint) if the address lies outside the region that lldb asked us - // to watch. + // to watch. // - // Alternatively, lldb would need to be prepared for a larger region + // Alternatively, lldb would need to be prepared for a larger region // being watched than it requested, and silently resume the inferior if // the accessed address is outside the region lldb wants to watch. @@ -2098,7 +2100,7 @@ bool DNBArchMachARM64::SetRegisterValue(uint32_t set, uint32_t reg, signed_value = (uint64_t) ptrauth_strip((void*) signed_value, ptrauth_key_function_pointer); signed_value = (uint64_t) ptrauth_sign_unauthenticated((void*) signed_value, ptrauth_key_function_pointer, 0); #endif - if (reg == gpr_pc) + if (reg == gpr_pc) arm_thread_state64_set_pc_fptr (m_state.context.gpr, (void*) signed_value); else if (reg == gpr_lr) arm_thread_state64_set_lr_fptr (m_state.context.gpr, (void*) signed_value); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits