aboutsummaryrefslogtreecommitdiffstats
path: root/source/Host/common/NativeRegisterContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Host/common/NativeRegisterContext.cpp')
-rw-r--r--source/Host/common/NativeRegisterContext.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/source/Host/common/NativeRegisterContext.cpp b/source/Host/common/NativeRegisterContext.cpp
index 2f30d52aea63..fe40073eb59d 100644
--- a/source/Host/common/NativeRegisterContext.cpp
+++ b/source/Host/common/NativeRegisterContext.cpp
@@ -114,16 +114,15 @@ lldb::addr_t NativeRegisterContext::GetPC(lldb::addr_t fail_value) {
uint32_t reg = ConvertRegisterKindToRegisterNumber(eRegisterKindGeneric,
LLDB_REGNUM_GENERIC_PC);
- if (log)
- log->Printf("NativeRegisterContext::%s using reg index %" PRIu32
- " (default %" PRIu64 ")",
- __FUNCTION__, reg, fail_value);
+ LLDB_LOGF(log,
+ "NativeRegisterContext::%s using reg index %" PRIu32
+ " (default %" PRIu64 ")",
+ __FUNCTION__, reg, fail_value);
const uint64_t retval = ReadRegisterAsUnsigned(reg, fail_value);
- if (log)
- log->Printf("NativeRegisterContext::%s " PRIu32 " retval %" PRIu64,
- __FUNCTION__, retval);
+ LLDB_LOGF(log, "NativeRegisterContext::%s " PRIu32 " retval %" PRIu64,
+ __FUNCTION__, retval);
return retval;
}
@@ -192,20 +191,19 @@ NativeRegisterContext::ReadRegisterAsUnsigned(const RegisterInfo *reg_info,
RegisterValue value;
Status error = ReadRegister(reg_info, value);
if (error.Success()) {
- if (log)
- log->Printf("NativeRegisterContext::%s ReadRegister() succeeded, value "
- "%" PRIu64,
- __FUNCTION__, value.GetAsUInt64());
+ LLDB_LOGF(log,
+ "NativeRegisterContext::%s ReadRegister() succeeded, value "
+ "%" PRIu64,
+ __FUNCTION__, value.GetAsUInt64());
return value.GetAsUInt64();
} else {
- if (log)
- log->Printf("NativeRegisterContext::%s ReadRegister() failed, error %s",
- __FUNCTION__, error.AsCString());
+ LLDB_LOGF(log,
+ "NativeRegisterContext::%s ReadRegister() failed, error %s",
+ __FUNCTION__, error.AsCString());
}
} else {
- if (log)
- log->Printf("NativeRegisterContext::%s ReadRegister() null reg_info",
- __FUNCTION__);
+ LLDB_LOGF(log, "NativeRegisterContext::%s ReadRegister() null reg_info",
+ __FUNCTION__);
}
return fail_value;
}