From dc853167e533c787627c6db1cdc1d9f25e2bb297 Mon Sep 17 00:00:00 2001 From: mianhk Date: Wed, 24 Jul 2024 21:52:31 +0800 Subject: [PATCH] fix big cpp program with too many symbol Signed-off-by: mianhk --- script/shell_modify_variable_attach_parent.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/script/shell_modify_variable_attach_parent.sh b/script/shell_modify_variable_attach_parent.sh index 87ee1cb..59717d8 100644 --- a/script/shell_modify_variable_attach_parent.sh +++ b/script/shell_modify_variable_attach_parent.sh @@ -1,13 +1,11 @@ #!/bin/bash expect -c " - spawn gdb -q attach $1 + set timeout 60000 + spawn gdb -q -iex \"set pagination off\" attach $1 expect { \"gdb\" {send \"set follow-fork-mode $2\n\";} } - expect { - \"gdb\" {send \"set pagination off\n\";} - } expect { \"gdb\" {send \"$3\n\";} } @@ -35,6 +33,9 @@ expect -c " expect { \"gdb\" {send \"c\n\";} } + expect { + \"exited\" {send \"quit\n\";} + } interact " \ No newline at end of file