Running a source command before launching main command

Mahmood Naderan mahmood.nt at gmail.com
Thu Jul 29 09:16:54 BST 2021


I also tried to run the kedevelop in the wrapper. That is

./wrapper.sh kdevelop

In the terminal I see the outputs of the source command in wrapper, and see
kdevelop launches. In the launch configuration, I specified the binary and
arguments only, but when I run Execute, I see some errors in the output
that are related to "missing source command".

I like kdevelop but it seems that I am not able to use it.

Regards,
Mahmood




On Thu, Jul 29, 2021 at 10:11 AM Mahmood Naderan <mahmood.nt at gmail.com>
wrote:

> OK I specified this:
>
> EXECUTABLE: /usr/bin/sh /home/mnaderan/accel-sim-framework/run.sh
> /home/mnaderan/accel-sim-framework/gpu-simulator/bin/release/accel-sim.out'
> ARGS: long_argument_list
>
>
> I am not able to Execute because I get
>
> /home/mnaderan/accel-sim-framework/> '/usr/bin/sh
> /home/mnaderan/accel-sim-framework/run.sh
> /home/mnaderan/accel-sim-framework/gpu-simulator/bin/release/accel-sim.out'
> -trace
> ./hw_run/traces/device-0/11.2/stencil/_i__home_mnaderan_suites_parboil_datasets_stencil_small_input_128x128x32_bin__o__home_mnaderan_128x128x32_out____128_128_32_100/traces/kernelslist.g
> -config
> ./gpu-simulator/gpgpu-sim/configs/tested-cfgs/SM86_RTX3070/gpgpusim.config
> -config ./gpu-simulator/configs/tested-cfgs/SM86_RTX3070/trace.config
> *** 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 ***
>
> For the debug I see:
>
> '/usr/bin/sh /home/mnaderan/accel-sim-framework/run.sh
> /home/mnaderan/accel-sim-framework/gpu-simulator/bin/release/accel-sim.out'
> is not an executable
>
> However, when I run that command in the terminal, there is no problem.
>
>
> Regards,
> Mahmood
>
>
>
>
> On Wed, Jul 28, 2021 at 5:13 PM René J.V. Bertin <rjvbertin at gmail.com>
> wrote:
>
>> On Wednesday July 28 2021 11:44:23 Mahmood Naderan wrote:
>>
>> >some variables and preprocessing. I know how to set variables in the
>> launch
>> >configuration, but I would like to know how to specify that source
>> command
>> >in the launch configuration where executable, arguments and working
>> >directory are set.
>>
>> Hi,
>>
>> I suppose there is no clear place to specify a set-up command (I don't
>> use this functionality)?
>>
>> In that case, your best option would be to turn your "source" command
>> into a wrapper script that first does the sourcing and then exec's the
>> actually intended command:
>>
>> ----
>> #!/bin/sh
>>
>> # do your source command
>>
>> COMMAND="$1"
>> shift
>> exec ${COMMAND} "$@"
>> ---
>>
>> If your launch configuration is meant to debug your code this will
>> probably not work, but you could try this as the command:
>>
>> sh /path/to/wrapper /path/to/yourExecutable [args]
>>
>> (this will cause the debugger to see a binary, which at some point will
>> overlay itself with your own code).
>>
>> If that doesn't work either you'll have no other choice but to call
>> KDevelop itself via the wrapper script. Or implement the missing feature
>> yourself (and propose it for inclusion).
>>
>> R.
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20210729/2c5116fd/attachment.htm>


More information about the KDevelop mailing list