From f6c0fe7657d816a365c56791574f9416fc20e10d Mon Sep 17 00:00:00 2001 From: "Matt." Date: Sat, 23 Nov 2024 02:06:41 -0300 Subject: [PATCH] Remove `one_shot` from `Process.break_at` (#2562) --- pwndbg/dbg/__init__.py | 6 ------ pwndbg/dbg/gdb.py | 3 --- pwndbg/dbg/lldb/__init__.py | 1 - 3 files changed, 10 deletions(-) diff --git a/pwndbg/dbg/__init__.py b/pwndbg/dbg/__init__.py index ee13fd739..c7723f987 100644 --- a/pwndbg/dbg/__init__.py +++ b/pwndbg/dbg/__init__.py @@ -437,7 +437,6 @@ class Process: self, location: BreakpointLocation | WatchpointLocation, stop_handler: Callable[[StopPoint], bool] | None = None, - one_shot: bool = False, internal: bool = False, ) -> StopPoint: """ @@ -454,11 +453,6 @@ class Process: a signal to continue execution. The extent of the actions that may be taken during the stop handler is determined by the debugger. - Breakpoints and watchpoints marked as `one_shot` are removed after they - are first triggered. For the purposes of `one_shot`, a breakpoint or - watchpoint that has a stop handler is only considered to be triggered - when its stop handler returns `True`. - Marking a breakpoint or watchpoint as `internal` hints to the implementation that the created breakpoint or watchpoint should not be directly nameable by the user, and that it should not print any messages diff --git a/pwndbg/dbg/gdb.py b/pwndbg/dbg/gdb.py index 9889f1449..9cdaa54a3 100644 --- a/pwndbg/dbg/gdb.py +++ b/pwndbg/dbg/gdb.py @@ -641,7 +641,6 @@ class GDBProcess(pwndbg.dbg_mod.Process): self, location: pwndbg.dbg_mod.BreakpointLocation | pwndbg.dbg_mod.WatchpointLocation, stop_handler: Callable[[pwndbg.dbg_mod.StopPoint], bool] | None = None, - one_shot: bool = False, internal: bool = False, ) -> pwndbg.dbg_mod.StopPoint: # GDB does not support creating new breakpoints in the middle of a @@ -658,7 +657,6 @@ class GDBProcess(pwndbg.dbg_mod.Process): f"*{location.address:#x}", gdb.BP_BREAKPOINT, internal=internal, - temporary=one_shot, ) elif isinstance(location, pwndbg.dbg_mod.WatchpointLocation): if location.watch_read and location.watch_write: @@ -673,7 +671,6 @@ class GDBProcess(pwndbg.dbg_mod.Process): gdb.BP_WATCHPOINT, wp_class=c, internal=internal, - temporary=one_shot, ) if internal: diff --git a/pwndbg/dbg/lldb/__init__.py b/pwndbg/dbg/lldb/__init__.py index 3bb7eef08..e601b8afd 100644 --- a/pwndbg/dbg/lldb/__init__.py +++ b/pwndbg/dbg/lldb/__init__.py @@ -1301,7 +1301,6 @@ class LLDBProcess(pwndbg.dbg_mod.Process): self, location: pwndbg.dbg_mod.BreakpointLocation | pwndbg.dbg_mod.WatchpointLocation, stop_handler: Callable[[pwndbg.dbg_mod.StopPoint], bool] | None = None, - one_shot: bool = False, internal: bool = False, ) -> pwndbg.dbg_mod.StopPoint: if isinstance(location, pwndbg.dbg_mod.BreakpointLocation):