This is the mail archive of the gdb-patches@sources.redhat.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: small enhancements to gdb here..


At 08:57 21/11/00 , vous avez écrit:
>Hi,
>
>I originally sent this email to gnu-gdb@gnu.org before I saw the 
>CONTRIBUTE file.  I reformatted the diff output to your 
>specifications.  The diff's are based on 5.0 distribution at GNU's ftp site.
>
>I have patches for 3 small enhancements to improve convenience:
>
>- allow O/S commands directly from gdb when no match for internal command.
>- additional arg syntax in user-defined commands:
>     $#        number of args
>     $*        all args
>     $N        specific arg (where N is a number from 1 to 9).  $1 is the 
> first
>               arg (same as $arg0).
>     ${NN}     NN can be any number between 1 and MAXUSERARGS (10 currently).
>     ${ENV}    environment variable
>- a user command referencing an argument not provided on the command returns
>   an empty string, not an error.

   But this conflict with the history $n expansion !

Why not only keep $*, $# ${NN}

About ${ENV}
why shouldn't we also support things like
   ${$i}}
   if $i is a convinience variable then we would be able to write

    for ($i=0,i<$#,i++) do
       print arg $i is ${$i}}

Otherwise I don't think it is really useful to restrict to environment 
variables,
we could also search for ENV in the program being debugged.
  So ${I}
would give arg number 5 is I is convertable into a int a has the value 5.

Anyhow any way to get the Nnth arg where N is a variable would be most welcome.


One more question, are there no languages that accept
variables beginning with digits ?

I hope not, but maybe it is worth to ask ourselves this question !




Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

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