MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / write_breakpoint

Function write_breakpoint

examples/breakpoint/src/breakpoint.cpp:7–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5using namespace std;
6
7void write_breakpoint(BinaryNinja::BinaryView* view, uint64_t start, uint64_t length)
8{
9 // Sample function to show registering a plugin menu item for a range of bytes.
10 // Also possible:
11 // register
12 // register_for_address
13 // register_for_function
14
15 Ref<Architecture> arch = view->GetDefaultArchitecture();
16 string arch_name = arch->GetName();
17
18 if (arch_name.compare(0, 3, "x86") == 0)
19 {
20 string int3s = string(length, '\xcc');
21 view->Write(start, int3s.c_str(), length);
22 }
23 else
24 {
25 LogError("No support for breakpoint on %s", arch_name.c_str());
26 }
27}
28
29extern "C"
30{

Callers

nothing calls this directly

Calls 5

c_strMethod · 0.80
GetNameMethod · 0.45
compareMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected