aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Host/common/NativeProcessProtocol.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2022-01-31 15:57:48 +0100
committerPavel Labath <pavel@labath.sk>2022-02-02 14:13:08 +0100
commita007a6d84471bb956abe10974cac3066799f583f (patch)
treebfa09e71cc1ce894d3a1e7cab572c21eeaaf4117 /lldb/source/Host/common/NativeProcessProtocol.cpp
parent574ad2a84626ffb0e7a64559e9862f20aadc013a (diff)
downloadllvm-a007a6d84471bb956abe10974cac3066799f583f.zip
llvm-a007a6d84471bb956abe10974cac3066799f583f.tar.gz
llvm-a007a6d84471bb956abe10974cac3066799f583f.tar.bz2
[lldb] Convert "LLDB" log channel to the new API
Diffstat (limited to 'lldb/source/Host/common/NativeProcessProtocol.cpp')
-rw-r--r--lldb/source/Host/common/NativeProcessProtocol.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lldb/source/Host/common/NativeProcessProtocol.cpp b/lldb/source/Host/common/NativeProcessProtocol.cpp
index ea80a05..e06adb4 100644
--- a/lldb/source/Host/common/NativeProcessProtocol.cpp
+++ b/lldb/source/Host/common/NativeProcessProtocol.cpp
@@ -74,7 +74,7 @@ llvm::Optional<WaitStatus> NativeProcessProtocol::GetExitStatus() {
bool NativeProcessProtocol::SetExitStatus(WaitStatus status,
bool bNotifyStateChange) {
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log = GetLog(LLDBLog::Process);
LLDB_LOG(log, "status = {0}, notify = {1}", status, bNotifyStateChange);
// Exit status already set
@@ -128,7 +128,7 @@ NativeProcessProtocol::GetWatchpointMap() const {
llvm::Optional<std::pair<uint32_t, uint32_t>>
NativeProcessProtocol::GetHardwareDebugSupportInfo() const {
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log = GetLog(LLDBLog::Process);
// get any thread
NativeThreadProtocol *thread(
@@ -152,7 +152,7 @@ Status NativeProcessProtocol::SetWatchpoint(lldb::addr_t addr, size_t size,
// thread that is attached to via the (FIXME implement) OnThreadAttached ()
// method.
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log = GetLog(LLDBLog::Process);
// Update the thread list
UpdateThreads();
@@ -236,7 +236,7 @@ Status NativeProcessProtocol::SetHardwareBreakpoint(lldb::addr_t addr,
// This default implementation assumes setting a hardware breakpoint for this
// process will require setting same hardware breakpoint for each of its
// existing threads. New thread will do the same once created.
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log = GetLog(LLDBLog::Process);
// Update the thread list
UpdateThreads();
@@ -308,7 +308,7 @@ Status NativeProcessProtocol::RemoveHardwareBreakpoint(lldb::addr_t addr) {
void NativeProcessProtocol::SynchronouslyNotifyProcessStateChanged(
lldb::StateType state) {
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log = GetLog(LLDBLog::Process);
m_delegate.ProcessStateChanged(this, state);
@@ -317,7 +317,7 @@ void NativeProcessProtocol::SynchronouslyNotifyProcessStateChanged(
}
void NativeProcessProtocol::NotifyDidExec() {
- Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+ Log *log = GetLog(LLDBLog::Process);
LLDB_LOG(log, "process {0} exec()ed", GetID());
m_delegate.DidExec(this);
@@ -325,7 +325,7 @@ void NativeProcessProtocol::NotifyDidExec() {
Status NativeProcessProtocol::SetSoftwareBreakpoint(lldb::addr_t addr,
uint32_t size_hint) {
- Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
+ Log *log = GetLog(LLDBLog::Breakpoints);
LLDB_LOG(log, "addr = {0:x}, size_hint = {1}", addr, size_hint);
auto it = m_software_breakpoints.find(addr);
@@ -342,7 +342,7 @@ Status NativeProcessProtocol::SetSoftwareBreakpoint(lldb::addr_t addr,
}
Status NativeProcessProtocol::RemoveSoftwareBreakpoint(lldb::addr_t addr) {
- Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
+ Log *log = GetLog(LLDBLog::Breakpoints);
LLDB_LOG(log, "addr = {0:x}", addr);
auto it = m_software_breakpoints.find(addr);
if (it == m_software_breakpoints.end())
@@ -408,7 +408,7 @@ Status NativeProcessProtocol::RemoveSoftwareBreakpoint(lldb::addr_t addr) {
llvm::Expected<NativeProcessProtocol::SoftwareBreakpoint>
NativeProcessProtocol::EnableSoftwareBreakpoint(lldb::addr_t addr,
uint32_t size_hint) {
- Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
+ Log *log = GetLog(LLDBLog::Breakpoints);
auto expected_trap = GetSoftwareBreakpointTrapOpcode(size_hint);
if (!expected_trap)
@@ -554,7 +554,7 @@ size_t NativeProcessProtocol::GetSoftwareBreakpointPCOffset() {
void NativeProcessProtocol::FixupBreakpointPCAsNeeded(
NativeThreadProtocol &thread) {
- Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS);
+ Log *log = GetLog(LLDBLog::Breakpoints);
Status error;