MCPcopy Create free account
hub / github.com/Vector35/debugger / DebuggerController

Class DebuggerController

api/debuggerapi.h:446–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444 typedef BNDebugAdapterTargetStatus DebugAdapterTargetStatus;
445
446 class DebuggerController :
447 public DbgCoreRefCountObject<BNDebuggerController, BNDebuggerNewControllerReference, BNDebuggerFreeController>
448 {
449 struct DebuggerEventCallbackObject
450 {
451 std::function<void(const DebuggerEvent&)> action;
452 };
453
454 public:
455 DebuggerController(BNDebuggerController* controller);
456 static DbgRef<DebuggerController> GetController(Ref<BinaryNinja::BinaryView> data);
457 static bool ControllerExists(Ref<BinaryNinja::BinaryView> data);
458 void Destroy();
459 Ref<BinaryView> GetLiveView();
460 Ref<BinaryView> GetData();
461 void SetData(const Ref<BinaryView>& data);
462 Ref<Architecture> GetRemoteArchitecture();
463
464 bool IsConnected();
465 bool IsConnectedToDebugServer();
466 bool IsRunning();
467
468 uint64_t StackPointer();
469
470 DataBuffer ReadMemory(std::uintptr_t address, std::size_t size);
471 bool WriteMemory(std::uintptr_t address, const DataBuffer& buffer);
472
473 std::vector<DebugProcess> GetProcessList();
474
475 std::vector<DebugThread> GetThreads();
476 DebugThread GetActiveThread();
477 void SetActiveThread(const DebugThread& thread);
478 std::vector<DebugFrame> GetFramesOfThread(uint32_t tid);
479 bool SuspendThread(std::uint32_t tid);
480 bool ResumeThread(std::uint32_t tid);
481
482 std::vector<DebugModule> GetModules();
483 std::vector<DebugRegister> GetRegisters();
484 uint64_t GetRegisterValue(const std::string& name);
485 bool SetRegisterValue(const std::string& name, uint64_t value);
486
487 // target control
488 bool Launch();
489 BNDebugStopReason LaunchAndWait();
490 bool Execute();
491 void Restart();
492 void Quit();
493 void QuitAndWait();
494 bool Connect();
495 DebugStopReason ConnectAndWait();
496 bool ConnectToDebugServer();
497 bool DisconnectDebugServer();
498 void Detach();
499 // Convenience function, either launch the target process or connect to a remote, depending on the selected
500 // adapter
501 void LaunchOrConnect();
502 bool Attach();
503 DebugStopReason AttachAndWait();

Callers 11

run_onceMethod · 0.90
test_return_codeMethod · 0.90
test_step_intoMethod · 0.90
test_breakpointMethod · 0.90
test_threadMethod · 0.90
test_assembly_codeMethod · 0.90
test_attachMethod · 0.90

Calls

no outgoing calls

Tested by 11

run_onceMethod · 0.72
test_return_codeMethod · 0.72
test_step_intoMethod · 0.72
test_breakpointMethod · 0.72
test_threadMethod · 0.72
test_assembly_codeMethod · 0.72
test_attachMethod · 0.72