[lib/inferior_control] Tweak comment
Change weak -> non-owning, the latter reads better to me.
Tested: CQ
Change-Id: I269f033b4387dd49a4756ea00fbbcb2add40c133
diff --git a/garnet/lib/inferior_control/breakpoint.h b/garnet/lib/inferior_control/breakpoint.h
index 450df57..5b466f2 100644
--- a/garnet/lib/inferior_control/breakpoint.h
+++ b/garnet/lib/inferior_control/breakpoint.h
@@ -4,6 +4,9 @@
#pragma once
+#include <stddef.h>
+#include <stdint.h>
+
#include <memory>
#include <unordered_map>
#include <vector>
@@ -53,7 +56,7 @@
ProcessBreakpointSet* owner() const { return owner_; }
private:
- ProcessBreakpointSet* owner_; // weak
+ ProcessBreakpointSet* owner_; // non-owning
FXL_DISALLOW_COPY_AND_ASSIGN(ProcessBreakpoint);
};
@@ -101,7 +104,7 @@
bool RemoveSoftwareBreakpoint(uintptr_t address);
private:
- Process* process_; // weak
+ Process* process_; // non-owning
// All currently inserted breakpoints.
std::unordered_map<uintptr_t, std::unique_ptr<Breakpoint>> breakpoints_;
@@ -115,7 +118,7 @@
ThreadBreakpointSet* owner() const { return owner_; }
private:
- ThreadBreakpointSet* owner_; // weak
+ ThreadBreakpointSet* owner_; // non-owning
FXL_DISALLOW_COPY_AND_ASSIGN(ThreadBreakpoint);
};
@@ -162,7 +165,7 @@
bool SingleStepBreakpointInserted();
private:
- Thread* thread_; // weak
+ Thread* thread_; // non-owning
// All currently inserted breakpoints.
std::unordered_map<uintptr_t, std::unique_ptr<ThreadBreakpoint>> breakpoints_;
diff --git a/garnet/lib/inferior_control/memory_process.h b/garnet/lib/inferior_control/memory_process.h
index 3ab1ab4..5c4431c 100644
--- a/garnet/lib/inferior_control/memory_process.h
+++ b/garnet/lib/inferior_control/memory_process.h
@@ -20,7 +20,7 @@
size_t length) const override;
private:
- Process* process_; // weak
+ Process* process_; // non-owning
FXL_DISALLOW_COPY_AND_ASSIGN(ProcessMemory);
};
diff --git a/garnet/lib/inferior_control/process.h b/garnet/lib/inferior_control/process.h
index f787b3d..31a2620 100644
--- a/garnet/lib/inferior_control/process.h
+++ b/garnet/lib/inferior_control/process.h
@@ -234,11 +234,11 @@
// Called after all other processing of a process exit has been done.
void Clear();
- // The server that owns us.
- Server* server_; // weak
+ // The server that owns us (non-owning).
+ Server* server_;
- // The delegate that we send life-cycle notifications to.
- Delegate* delegate_; // weak
+ // The delegate that we send life-cycle notifications to (non-owning).
+ Delegate* delegate_;
// Handle containing services available to this process.
std::shared_ptr<sys::ServiceDirectory> services_;
diff --git a/garnet/lib/inferior_control/registers.h b/garnet/lib/inferior_control/registers.h
index 1033b52..b9d8bfc 100644
--- a/garnet/lib/inferior_control/registers.h
+++ b/garnet/lib/inferior_control/registers.h
@@ -153,7 +153,7 @@
const fxl::StringView& value);
private:
- Thread* thread_; // weak
+ Thread* thread_; // non-owning
// Helper function for GetPC,GetSP,GetFP.
zx_vaddr_t GetIntRegister(int regno);
diff --git a/garnet/lib/inferior_control/thread.h b/garnet/lib/inferior_control/thread.h
index e543560..9c9178b 100644
--- a/garnet/lib/inferior_control/thread.h
+++ b/garnet/lib/inferior_control/thread.h
@@ -104,8 +104,8 @@
zx_handle_t GetExceptionPortHandle();
- // The owning process.
- Process* process_; // weak
+ // Our process (non-owning pointer).
+ Process* process_;
// The debug-capable handle that we use to invoke zx_debug_* syscalls.
zx_handle_t handle_;