Path: utzoo!utgpu!watmath!att!dptg!rutgers!cs.utexas.edu!wasatch!helios.ee.lbl.gov!epb2.lbl.gov!envbvs
From: envbvs@epb2.lbl.gov (Brian V. Smith)
Newsgroups: comp.unix.wizards
Subject: Re: dbx question?
Message-ID: <3543@helios.ee.lbl.gov>
Date: 9 Aug 89 20:41:50 GMT
References: <20563@adm.BRL.MIL>
Sender: usenet@helios.ee.lbl.gov
Lines: 42

< R. Bruce Rakes  asked (8 Aug 89 14:29:59 GMT):
< > I have been perusing all the dbx documentation that I can get my
< > hands on looking for a means of printing the range of an array, i.e.
< > I wish to print only the values between a start and end index, NOT
< > the entire array.  I also do not wish to print each value one at a
< > time.  As far as I can tell, dbx only allows me these two options.
< > Now sdb allows this by separating the start and end index with a
< > semicolon.  Does anyone know of an equivalent for dbx?  This seems
< > to be its major deficiency.
< 
< I use the following aliases in my .dbxinit to dump <2nd arg> values
< from the start of the C array named <1st arg>.
<    alias F "&(\!1[0])/\!2 F"
<    alias D "&(\!1[0])/\!2 D"
<    alias X "&(\!1[0])/\!2 X"
< For Fortran arrays the [0] would need to be replaced by [1].  A fairly
< obvious minor kind of modification would be to write (for instance)
<    alias X "&(\!1[\!2])/\!3 X"
< to dump the <3rd arg> values from offset <2nd arg> in array <1st arg>.
< I've used the first three aliases; the third is just speculation.

I don't understand the command '&' that the alias uses.  NOR DOES DBX!

Please excuse me if I am missing something very basic, but I put these
aliases in my .dbxinit and when I typed:

(dbx) F(aray,3)

I got from dbx:

&((!1[0])//!2 F(aray,3)
^ unrecognized command

(dbx)

Yes, I did include the '\' in the definition.
This was attempted in Ultrix and SunOs 4.0.

_____________________________________
Brian V. Smith    (bvsmith@lbl.gov)
Lawrence Berkeley Laboratory
We don't need no signatures!