Skip to content

Commit

Permalink
update: gdb logging enable/disable command
Browse files Browse the repository at this point in the history
'set logging on/off' is deprecated and replaced with 'set logging enabled on/off'
  • Loading branch information
mtwoz committed Apr 26, 2024
1 parent 92f45ba commit 1930e8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gef.py
Expand Up @@ -1978,12 +1978,12 @@ def __enter__(self) -> None:
gdb.execute("set logging overwrite")
gdb.execute(f"set logging file {self.redirection_target_file}")
gdb.execute("set logging redirect on")
gdb.execute("set logging on")
gdb.execute("set logging enabled on")
return

def __exit__(self, *exc: Any) -> None:
"""Disable the output redirection, if any."""
gdb.execute("set logging off")
gdb.execute("set logging enabled off")
gdb.execute("set logging redirect off")
return

Expand All @@ -1994,13 +1994,13 @@ def enable_redirect_output(to_file: str = "/dev/null") -> None:
gdb.execute("set logging overwrite")
gdb.execute(f"set logging file {to_file}")
gdb.execute("set logging redirect on")
gdb.execute("set logging on")
gdb.execute("set logging enabled on")
return


def disable_redirect_output() -> None:
"""Disable the output redirection, if any."""
gdb.execute("set logging off")
gdb.execute("set logging enabled off")
gdb.execute("set logging redirect off")
return

Expand Down

0 comments on commit 1930e8d

Please sign in to comment.