From 6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Thu, 27 Jan 2022 22:43:28 -0500 Subject: Format All Files --- examples/breakpoint/src/breakpoint.cpp | 48 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'examples/breakpoint/src/breakpoint.cpp') diff --git a/examples/breakpoint/src/breakpoint.cpp b/examples/breakpoint/src/breakpoint.cpp index 65c8d018..75156e1d 100644 --- a/examples/breakpoint/src/breakpoint.cpp +++ b/examples/breakpoint/src/breakpoint.cpp @@ -4,35 +4,37 @@ using namespace BinaryNinja; using namespace std; -void write_breakpoint(BinaryNinja::BinaryView *view, uint64_t start, uint64_t length) +void write_breakpoint(BinaryNinja::BinaryView* view, uint64_t start, uint64_t length) { - // Sample function to show registering a plugin menu item for a range of bytes. - // Also possible: - // register - // register_for_address - // register_for_function + // Sample function to show registering a plugin menu item for a range of bytes. + // Also possible: + // register + // register_for_address + // register_for_function - Ref arch = view->GetDefaultArchitecture(); - string arch_name = arch->GetName(); + Ref arch = view->GetDefaultArchitecture(); + string arch_name = arch->GetName(); - if (arch_name.compare(0, 3, "x86") == 0) { - string int3s = string(length, '\xcc'); - view->Write(start, int3s.c_str(), length); - } else { - LogError("No support for breakpoint on %s", arch_name.c_str()); - } + if (arch_name.compare(0, 3, "x86") == 0) + { + string int3s = string(length, '\xcc'); + view->Write(start, int3s.c_str(), length); + } + else + { + LogError("No support for breakpoint on %s", arch_name.c_str()); + } } extern "C" { - BN_DECLARE_CORE_ABI_VERSION + BN_DECLARE_CORE_ABI_VERSION - BINARYNINJAPLUGIN bool CorePluginInit() - { - // Register the plugin with Binary Ninja - PluginCommand::RegisterForRange("Convert to breakpoint", - "Fill region with breakpoint instructions.", - &write_breakpoint); - return true; - } + BINARYNINJAPLUGIN bool CorePluginInit() + { + // Register the plugin with Binary Ninja + PluginCommand::RegisterForRange( + "Convert to breakpoint", "Fill region with breakpoint instructions.", &write_breakpoint); + return true; + } } \ No newline at end of file -- cgit v1.3.1