class CallFunctionThreadController

Defined at line 29 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.h

This is the top level class for calling functions in the target program. It

is structured slightly differently than other thread controllers. Namely,

this class does not implement all of the base ThreadController class, and is

itself a base class for ABI specific thread controllers that fully implement

the ThreadController interface and share some common code in this class.

This is different from other thread controllers in that it prefers to use

inheritance rather than composition, primarily because of the shared code

needs that these classes have, which is unique from other thread controllers.

Protected Members

AddressRanges address_ranges_
vector parameters_
unique_ptr finish_controller_
vector general_registers_

Public Methods

const char * GetName ()

Defined at line 38 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.h

void ~CallFunctionThreadController ()

Defined at line 39 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.cc

ContinueOp GetContinueOp ()

ThreadController implementation.

Defined at line 212 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.cc

StopOp OnThreadStop (debug_ipc::ExceptionType stop_type, const std::vector<fxl::WeakPtr<Breakpoint>> & hit_breakpoints)

Defined at line 216 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.cc

Protected Methods

void CallFunctionThreadController (const AddressRanges & ranges, const std::vector<ExprValue> & parameters, EvalCallback on_function_completed, fit::deferred_callback on_done)

Defined at line 29 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.cc

bool WriteRegister (std::vector<debug::RegisterValue> & regs, debug::RegisterID id, uint64_t value)

Finds |id| in |regs| and updates its value to |value|. Does not perform any

IPC. Returns false if |id| was not found in |regs|.

Defined at line 47 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.cc

uint64_t GetRegisterData (const std::vector<debug::RegisterValue> & regs, debug::RegisterID id)

Returns the value of |id| in |regs| if found, 0 otherwise.

Defined at line 59 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.cc

void SetRegisterCategory (debug::RegisterCategory category, const std::vector<debug::RegisterValue> & regs)

Defined at line 69 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.h

Err WriteParametersToRegisters ()

Writes the contents of |parameters_| to registers. The ABI specific registers are given by the

Abi implementation tied to the session, so it can be done in the base class rather than the ABI

specific classes.

Defined at line 69 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.cc

void WriteGeneralRegisters (fit::callback<void (const Err &)> cb)

Sends |general_registers_| to the target. It's up to the ABI implementation

to ensure that it has filtered out any unwriteable registers and that the

the General set of registers has already been collected before calling

this.

Defined at line 103 of file ../../src/developer/debug/zxdb/client/call_function_thread_controller.cc

Frame * PushStackFrame (uint64_t new_pc, uint64_t old_sp, const std::vector<debug::RegisterValue> & regs)
void CollectAllRegisterCategories (Thread * thread, fit::callback<void (const Err &)> cb)

Records