4
0

[gdb] fix wildcard

This commit is contained in:
2026-03-16 18:51:14 +03:00
parent 885757f752
commit 0e46af6db8

View File

@@ -195,20 +195,22 @@ class Run:
cmd.append(f"--log-file={Run.VALGRIND_LOG_FILENAME}")
cmd.append(f"--error-markers={Run.VALGRIND_ERROR_MARKER},{Run.VALGRIND_ERROR_MARKER}")
elif dynamic_wrapper == DynamicWrapper.GDB_DEBUGGER:
cmd.append("gdb")
cmd.append("-q")
cmd.append("-return-child-result")
cmd.append("--batch-silent")
cmd.append("--eval-command=\"set debuginfod enabled off\"")
cmd.append(f"--eval-command=\"set logging file {Run.GDB_LOG_FILENAME}\"")
cmd.append("--eval-command=\"set logging redirect on\"")
cmd.append("--eval-command=\"set logging overwrite on\"")
cmd.append("--eval-command=\"set logging debugredirect on\"")
cmd.append("--eval-command=\"set logging enabled on\"")
cmd.append("--eval-command=\"set print frame-arguments all\"")
cmd.append("--eval-command=\"run\"")
cmd.append("--eval-command=\"thread apply all bt -frame-info source-and-location -full\"")
cmd.append("--args")
cmd = [
"gdb",
"-q",
"-return-child-result",
"--batch-silent",
"-ex", "set debuginfod enabled off",
"-ex", "set logging file gdb.log",
"-ex", "set logging redirect on",
"-ex", "set logging overwrite on",
"-ex", "set logging debugredirect on",
"-ex", "set logging enabled on",
"-ex", "set print frame-arguments all",
"-ex", "run",
"-ex", "thread apply all bt -frame-info source-and-location -full",
"--args",
]
cmd.append(os.path.abspath(executable_path))
@@ -216,7 +218,7 @@ class Run:
cmd += self.get_args()
if dynamic_wrapper == DynamicWrapper.GDB_DEBUGGER:
child = subprocess.Popen(" ".join(cmd), stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True, shell = True, preexec_fn = os.setsid)
child = subprocess.Popen(cmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True, preexec_fn = os.setsid)
else:
child = subprocess.Popen(cmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True)