Running a source command before launching main command

René J.V. Bertin rjvbertin at gmail.com
Thu Jul 29 11:27:05 BST 2021


On Thursday July 29 2021 11:10:21 Mahmood Naderan wrote:

>So, If I follow that, how can I specify the program's argument list?
>Because the wrapper takes one argument and that is the program's binary.

I showed how to pass on the arguments in a wrapper script:

BINARY="$1"
shift
exec ${BINARY} "$@"

Enter that exactly as written ($@ between double quotes) and your binary will see the arguments as if you started it from the command line.

>Meanwhile I will try to see if I can attach gdb from a console with a PID.

You can also attach a debugger (gdb or lldb) to a running process from with KDevelop, if you want to use a graphical debugger.

R.


More information about the KDevelop mailing list