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

Method do_breakpoint

python/workflow.py:898–923  ·  view source on GitHub ↗

Handle breakpoint commands.

(self, line)

Source from the content-addressed store, hash-verified

896 print(json.dumps(status, indent=4))
897
898 def do_breakpoint(self, line):
899 """Handle breakpoint commands."""
900 parser = argparse.ArgumentParser(exit_on_error=False)
901 parser.add_argument("action", choices=["delete", "set", "query"], help="Action to perform: delete, set, or, query.")
902 parser.add_argument("activities", type=str, nargs="*", help="The breakpoint(s) to set/delete.")
903 try:
904 args = parser.parse_args(line.split())
905 args.activities = [activity[1:-1] if activity.startswith('"') and activity.endswith('"') else activity for activity in args.activities]
906 if args.action == "delete":
907 status = self.machine.breakpoint_delete(args.activities)
908 print(json.dumps(status, indent=4))
909 elif args.action == "query":
910 status = self.machine.breakpoint_query()
911 accepted = status.get('commandStatus', {}).get('accepted', False)
912 if accepted:
913 response = status.pop("response", None)
914 print(json.dumps(status, indent=4))
915 if accepted and response:
916 print(json.dumps(response, indent=None))
917 elif args.action == "set":
918 status = self.machine.breakpoint_set(args.activities)
919 print(json.dumps(status, indent=4))
920 except argparse.ArgumentError as e:
921 print("ArgumentError:", e)
922 except SystemExit:
923 pass
924
925 def do_status(self, line):
926 """Retrieve the current machine status."""

Callers

nothing calls this directly

Calls 6

breakpoint_deleteMethod · 0.80
breakpoint_queryMethod · 0.80
breakpoint_setMethod · 0.80
splitMethod · 0.45
getMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected