This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc question


> > Of course, I know that I can invoke the binary code using gdb(ex.
> > unix_prompt> gdb <binary_code>).
> 
> That's what you'll have to do.

If the binary is not normally started from a unix prompt, but from
some other program, you can arrange to start gdb by providing a
wrapper shell script, eg put into prog

#! /bin/sh
gdb prog.orig

If you have X11 running, the wrapper ideally invokes xterm:

#! /bin/sh
echo $* >/tmp/prog.cmdline
xterm -e gdb prog.orig

Before invoking the run command, you would look into /tmp/prog.cmdline
to see what arguments where passed.

Hope this helps,
Martin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]