Re: Running a source command before launching main command
Mahmood Naderan <[email protected]> Thu, 29 Jul 2021 11:10:21 +0200
| Newsgroups | gmane.comp.kde.users.kdevelop |
|---|---|
| Message-ID | <CADa2P2UtarffeDL_+6GdW58eLkzcKP=80WnVeVaBYB2rP-VdNw@mail.gmail.com> |
--000000000000a8089505c83f794b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable >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=C3=A9 J.V. Bertin <[email protected]= > 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.o= ut > >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 ha= ve > the executable bit set). > > I think you tried to follow my suggestion to use `/bin/sh /path/to/wrappe= r > /path/to/executable`. Given that KDevelop clear expects only an executabl= e > 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: al= l > the steps that you are NOT interested in are taken at maximum speed, > without the overhead from a debugger (which can be considerable). > > R. > --000000000000a8089505c83f794b 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">>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=20 `/path/to/wrapper /path/to/executable` in front of your argument list. <br>= </div><div class=3D"gmail_default" style=3D"font-family:tahoma,sans-serif">= <br></div><div class=3D"gmail_default" style=3D"font-family:tahoma,sans-ser= if">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 bina= ry. <br></div><div class=3D"gmail_default" style=3D"font-family:tahoma,sans= -serif"><br></div><div class=3D"gmail_default" style=3D"font-family:tahoma,= sans-serif">Meanwhile I will try to see if I can attach gdb from a console = with a PID.</div><div class=3D"gmail_default" style=3D"font-family:tahoma,s= ans-serif"><br></div><div><div dir=3D"ltr" class=3D"gmail_signature" data-s= martmail=3D"gmail_signature"><div dir=3D"ltr"><font face=3D"tahoma,sans-ser= if">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, Jul= 29, 2021 at 10:59 AM Ren=C3=A9 J.V. Bertin <<a href=3D"mailto:rjvbertin= @gmail.com">[email protected]</a>> 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 10:11:13 Mahmood = Naderan wrote:<br> >/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'<br> >*** Failure: /usr/bin/sh /home/mnaderan/accel-sim-framework/run.sh<br> >/home/mnaderan/accel-sim-framework/gpu-simulator/bin/release/accel-sim.= out<br> >has failed to start ***<br> <br> That figures: look at the single quotes. I think you specified '/usr/bi= n/sh /home/mnaderan/accel-sim-framework/run.sh /home/mnaderan/accel-sim-fra= mework/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).<br> <br> 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 comman= d, and prepend `/path/to/wrapper /path/to/executable` in front of your argu= ment list.<br> <br> FWIW, if this is for debugging, you have another option. Start your applica= tion 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 y= ou are NOT interested in are taken at maximum speed, without the overhead f= rom a debugger (which can be considerable).<br> <br> R.<br> </blockquote></div> --000000000000a8089505c83f794b--