Skip to content

Commit

Permalink
Do not quote paths when running 'source' (#1005)
Browse files Browse the repository at this point in the history
gdb's `source` doesn't understand quotes. Annoying.

We should be OK not quoting it since the config has a hook to ensure the
path doesn't have spaces.

Discovered by @southball
  • Loading branch information
Grazfather authored Sep 12, 2023
1 parent 1247fe4 commit 5927df4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -9540,7 +9540,7 @@ def load_extra_plugins(self) -> int:
def load_plugin(fpath: pathlib.Path) -> bool:
try:
dbg(f"Loading '{fpath}'")
gdb.execute(f"source '{fpath}'")
gdb.execute(f"source {fpath}")
except Exception as e:
warn(f"Exception while loading {fpath}: {str(e)}")
return False
Expand Down Expand Up @@ -10180,7 +10180,7 @@ def screen_setup(self) -> None:
f.write(f"screen bash -c 'tty > {tty_path}; clear; cat'\n")
f.write("focus left\n")

gdb.execute(f"!'{screen}' -r '{sty}' -m -d -X source '{script_path}'")
gdb.execute(f"!'{screen}' -r '{sty}' -m -d -X source {script_path}")
# artificial delay to make sure `tty_path` is populated
time.sleep(0.25)
with open(tty_path, "r") as f:
Expand Down

0 comments on commit 5927df4

Please sign in to comment.