Page 1 of 1
Passing command line arguments to dbg
Posted: Fri Jul 23, 2010 9:47 pm
by Xavi
I don't understand well the commands "-exec-run " + args or "target remote "+ comm + " " + args of DbgGdb::Run()
But in the typical main( int argc, char ** argv ), argc is always 1; the ejutable program name.
It would be better to set the arguments, if any, with the command "set args" + args
OT: I guess root sources of wxScintilla now (wxWidgets > 2.8) is in the adaptation of {wxWidgets.svn}\src\stc
Is it right?
--
Xavi
Re: Passing command line arguments to dbg
Posted: Sat Jul 24, 2010 12:25 am
by eranif
Xavi wrote:I don't understand well the commands "-exec-run " + args or "target remote "+ comm + " " + args of DbgGdb::Run()
But in the typical main( int argc, char ** argv ), argc is always 1; the ejutable program name.
It would be better to set the arguments, if any, with the command "set args" + args
codelite does not use the standard CLI interface of gdb, it uses the MI interface (its the Machine Interface of gdb).
using
Code: Select all
(gdb)set args <arguments>...
(gdb)run
is similar to
codelite uses:
Anyways, what is the problem that you are trying to solve?
Xavi wrote:"target remote "+ comm + " "
This is the way codelite connect to gdbserver to allow remote debugging
Xavi wrote:OT: I guess root sources of wxScintilla now (wxWidgets > 2.8) is in the adaptation of {wxWidgets.svn}\src\stc
Is it right?
No, codelite uses its own source which are fork of the last maintained version of wxScintilla (1.62) - the sources are up to date to version 2.2 of scintilla + many changes I made into them.
STC is another component (similar to wxScintilla) - but they are not the same.
Eran
Re: Passing command line arguments to dbg
Posted: Sat Jul 24, 2010 1:22 pm
by Xavi
Anyways, what is the problem that you are trying to solve?
With GNU gdb (GDB) 7.1.50.20100702-cvs configured as "i686-w64-mingw32"
in the typical main( int argc, char ** argv ), argc is always 1.
I need to use the Startup Commands to take the arguments .-
set args <and paste Program Arguments:>
No, codelite uses its own source which are fork of the last maintained version of wxScintilla (1.62) - the sources are up to date to version 2.2 of scintilla + many changes I made into them.
Okay, please could you apply the patch attached to adapt scintilla > 2.12
--
Xavi
Re: Passing command line arguments to dbg
Posted: Sat Jul 24, 2010 11:57 pm
by Xavi
Some information about this .-
http://ftp.gnu.org/old-gnu/Manuals/gdb- ... tml#SEC231
http://sourceware.org/gdb/current/onlin ... -Execution
Maybe they need to do -exec-arguments args
Set the inferior program arguments, to be used in the next `-exec-run'.
-exec-run says nothing of arguments.
HTH,
Best regards
--
Xavi
Re: Passing command line arguments to dbg
Posted: Sun Jul 25, 2010 9:15 am
by eranif
Xavi wrote:Okay, please could you apply the patch attached to adapt scintilla > 2.12
Applied
Eran
Re: Passing command line arguments to dbg
Posted: Sun Jul 25, 2010 4:14 pm
by Xavi
Thanks,
The attached patch works fine.
I have not touched anything in the remote debugger, I guess that is used in the way .-
http://ftp.gnu.org/old-gnu/Manuals/gdb- ... tml#SEC135
and more arguments may be useful.
HTH,
Best regards
--
Xavi