This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


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

Re: using '-x -' to read gdb script from stdin


>>>>> "Elena" == Elena Zannoni <ezannoni@cygnus.com> writes:
Elena> Since that option was not documented, it was decided to get rid
Elena> of it if nobody was going to be penalized.  It may be still
Elena> possible to clean things up but I just noticed that it is not
Elena> just a matter of eliminating the #if 0, unfortunatley, because
Elena> more surrounding code has also been deactivated.

Elena> I can put this on my to do list, but it will be a while before
Elena> I can get to it.  Feel free to give it a try if you want.

There's no rush.  Using /dev/stdin works for now, and I hope to adapt
the script to use binutils' addr2line utility in the near future.

After thinking this over a bit, reading commands from stdin may not be
the best way to support 'command line' batch scripting.  Perhaps it
should be done with a command line option instead.  Maybe something
like this:

        gdb -batch --eval "list *$addr"

The current command interpreter doesn't have a statement separator so
that multiple commands can be put on one line, but it may be possible
to add one.  I tried appending a semicolon to a handful of commands
and they all bailed out with syntax errors of one sort or another.

Something to think about.  Since my immediate problem has been solved,
I'm going to put this on the back burner.

        --jtc

-- 
J.T. Conklin
RedBack Networks

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