class DebugRegisters

Defined at line 20 of file ../../src/developer/debug/debug_agent/debug_registers.h

Wrapper around the debug thread registers to allow them to be accessed uniformly regardless

of the platform.

Public Methods

void DebugRegisters ()

Defined at line 22 of file ../../src/developer/debug/debug_agent/debug_registers.h

void DebugRegisters (const zx_thread_state_debug_regs_t & r)

Defined at line 23 of file ../../src/developer/debug/debug_agent/debug_registers.h

zx_thread_state_debug_regs_t & GetNativeRegisters ()

Defined at line 65 of file ../../src/developer/debug/debug_agent/debug_registers.h

const zx_thread_state_debug_regs_t & GetNativeRegisters ()

Defined at line 66 of file ../../src/developer/debug/debug_agent/debug_registers.h

bool SetHWBreakpoint (uint64_t address)

Fills the given state the debug registers to what it should be if we added an execution HW

breakpoint for |address|. Return false if there are no registers left.

Defined at line 200 of file ../../src/developer/debug/debug_agent/debug_registers_x64.cc

bool RemoveHWBreakpoint (uint64_t address)

Removes an installed execution HW breakpoint for |address|. If the address is not installed, no

functional change will happen and false will be returned.

Defined at line 223 of file ../../src/developer/debug/debug_agent/debug_registers_x64.cc

std::optional<WatchpointInfo> SetWatchpoint (debug_ipc::BreakpointType type, const debug::AddressRange & range, uint32_t watchpoint_count)

On x64, watchpoint_count is unnecessary for this computation.

Defined at line 244 of file ../../src/developer/debug/debug_agent/debug_registers_x64.cc

bool RemoveWatchpoint (const debug::AddressRange & range, uint32_t watchpoint_count)

On x64, watchpoint_count is unnecessary for this computation.

Defined at line 283 of file ../../src/developer/debug/debug_agent/debug_registers_x64.cc

std::optional<WatchpointInfo> DecodeHitWatchpoint ()

Decodes the debug registers given the state after a watchpoint exception has been thrown.

Defined at line 308 of file ../../src/developer/debug/debug_agent/debug_registers_x64.cc

void SetForHitWatchpoint (int slot)

Sets the debug registers to indicate a hit of the watchpoint of the given slot. This is used in

tests to set up calls for DecodeHitWatchpoint() to succeed.

Defined at line 336 of file ../../src/developer/debug/debug_agent/debug_registers_x64.cc

std::string ToString ()

Defined at line 356 of file ../../src/developer/debug/debug_agent/debug_registers_x64.cc