Running a source command before launching main command

Mahmood Naderan mahmood.nt at gmail.com
Thu Jul 29 10:10:21 BST 2021


>Given that KDevelop clear expects only an executable file in the command
entry field, you'd have to enter `sh` as the command, and prepend
`/path/to/wrapper /path/to/executable` in front of your argument list.

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.

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

Regards,
Mahmood




On Thu, Jul 29, 2021 at 10:59 AM René J.V. Bertin <rjvbertin at gmail.com>
wrote:

> On Thursday July 29 2021 10:11:13 Mahmood Naderan wrote:
> >/home/mnaderan/accel-sim-framework/> '/usr/bin/sh
> /home/mnaderan/accel-sim-framework/run.sh
> /home/mnaderan/accel-sim-framework/gpusimulator/bin/release/accel-sim.out'
> >*** Failure: /usr/bin/sh /home/mnaderan/accel-sim-framework/run.sh
> >/home/mnaderan/accel-sim-framework/gpu-simulator/bin/release/accel-sim.out
> >has failed to start ***
>
> That figures: look at the single quotes. I think you specified
> '/usr/bin/sh /home/mnaderan/accel-sim-framework/run.sh
> /home/mnaderan/accel-sim-framework/gpusimulator/bin/release/accel-sim.out'
> as the executable, and a file with that name doesn't exist (or doesn't have
> the executable bit set).
>
> I think you tried to follow my suggestion to use `/bin/sh /path/to/wrapper
> /path/to/executable`. Given that KDevelop clear expects only an executable
> file in the command entry field, you'd have to enter `sh` as the command,
> and prepend `/path/to/wrapper /path/to/executable` in front of your
> argument list.
>
> FWIW, if this is for debugging, you have another option. Start your
> application from a shell, and then attach the debugger to the running
> application. This can even have an advantage if you want to debug some
> feature that is not part of the startup procedure of your application: all
> the steps that you are NOT interested in are taken at maximum speed,
> without the overhead from a debugger (which can be considerable).
>
> R.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20210729/ae24606b/attachment.htm>


More information about the KDevelop mailing list