Re: Running a source command before launching main command

Mahmood Naderan <[email protected]> Thu, 29 Jul 2021 15:54:32 +0200
Newsgroups gmane.comp.kde.users.kdevelop
Message-ID <CADa2P2XcZfhHpkR2VnSy6Ut8khsyGoRmaOQ4N+UngpZ32wB_JQ@mail.gmail.com>
--000000000000f9ddfd05c8437185
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

OK it seems that "source file.sh && kdevelop" from shell will be fine.
Reference: Stackoverflow

Thanks for the hints.

Regards,
Mahmood




On Thu, Jul 29, 2021 at 12:27 PM Ren=C3=A9 J.V. Bertin <[email protected]=
>
wrote:

> 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=3D"$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 PI=
D.
>
> 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.
>

--000000000000f9ddfd05c8437185
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:tahoma,s=
ans-serif">OK it seems that &quot;source file.sh &amp;&amp; kdevelop&quot; =
from shell will be fine.</div><div class=3D"gmail_default" style=3D"font-fa=
mily:tahoma,sans-serif">Reference: Stackoverflow</div><div class=3D"gmail_d=
efault" style=3D"font-family:tahoma,sans-serif"><br></div><div class=3D"gma=
il_default" style=3D"font-family:tahoma,sans-serif">Thanks for the hints.</=
div><div class=3D"gmail_default" style=3D"font-family:tahoma,sans-serif"><b=
r clear=3D"all"></div><div><div dir=3D"ltr" class=3D"gmail_signature" data-=
smartmail=3D"gmail_signature"><div dir=3D"ltr"><font face=3D"tahoma,sans-se=
rif">Regards,<br>Mahmood</font><br><br><br></div></div></div><br></div><br>=
<div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Ju=
l 29, 2021 at 12:27 PM Ren=C3=A9 J.V. Bertin &lt;<a href=3D"mailto:rjvberti=
[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">On Thursday July 29 2021 11:10:21 Mahmood =
Naderan wrote:<br>
<br>
&gt;So, If I follow that, how can I specify the program&#39;s argument list=
?<br>
&gt;Because the wrapper takes one argument and that is the program&#39;s bi=
nary.<br>
<br>
I showed how to pass on the arguments in a wrapper script:<br>
<br>
BINARY=3D&quot;$1&quot;<br>
shift<br>
exec ${BINARY} &quot;$@&quot;<br>
<br>
Enter that exactly as written ($@ between double quotes) and your binary wi=
ll see the arguments as if you started it from the command line.<br>
<br>
&gt;Meanwhile I will try to see if I can attach gdb from a console with a P=
ID.<br>
<br>
You can also attach a debugger (gdb or lldb) to a running process from with=
 KDevelop, if you want to use a graphical debugger.<br>
<br>
R.<br>
</blockquote></div>

--000000000000f9ddfd05c8437185--