[comp.sys.next] gdb agony

dorner@pequod.cso.uiuc.edu (Steve Dorner) (05/25/89)

In spite of spending a half an hour trying to do something simple, I
am not going to say what I'd like to say.

I am not going to curse NeXT for providing gdb instead of dbx.
I am not going to say that the GDB manual is verbose and wandering, and
that I would prefer a nice, concise manual page.
I am not going to say Richard Stallman is a weenie.
I am not going to wonder aloud why the DL INSISTS on forgetting its
"Manually open file" preferences option.
I am not going to complain that I don't always WANT to wait for WriteNow
to open the first document the Digital Librarian finds.
I am not going to say that, although I tried valiantly, the Digital Librarian
was of less use to me in resolving my problem than paging through the paper
docs.
I am not going to complain that the ``bound'' 0.9 documentation doesn't
stay open on my desk like the binders for the 0.8 documentation did.

No, I'm not going to say any of those things.  In words made famous by
Arlo Guthrie, "I only got one question:"

Why doesn't gdb's print command allow the /s format option that is allowed
by the x command?  Why can I not tell print, print until you find a NULL byte?

I realize this is a very esoteric thing for a C programmer to want.  Maybe
I expect too much.

Steve
-- 
Steve Dorner, U of Illinois Computing Services Office
Internet: s-dorner@uiuc.edu  UUCP: {convex,uunet}!uiucuxc!dorner
IfUMust:  (217) 244-1765

wsd@cs.brown.edu (05/25/89)

In article <1110@garcon.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:

   I am not going to curse NeXT for providing gdb instead of dbx.
   [more drivel excluded]
   Why doesn't gdb's print command allow the /s format option that is allowed
   by the x command?  Why can I not tell print, print until you find a NULL byte?

   I realize this is a very esoteric thing for a C programmer to want.  Maybe
   I expect too much.

   Steve
   -- 
   Steve Dorner, U of Illinois Computing Services Office
   Internet: s-dorner@uiuc.edu  UUCP: {convex,uunet}!uiucuxc!dorner
   IfUMust:  (217) 244-1765

I am not going to say how happy I am that NeXT decided to use FSF
software, especially gcc and gdb.  If you do want to print up to a 0
byte, try casting the pointer to (char *):

(gdb) whatis random_pointer
type = int *
(gdb) p (char *)random_pointer
$2 = (char *) 0x2288 "Whatever"

The fact that /s doesn't work with print should be in the doc.

Scott


-	-	-	-	-	-	-	-	-	-
Scott Draves		|	Space... The Final Frontier
wsd@cs.brown.edu	|
uunet!brunix!wsd  wsd@browncs.bitnet	Box 2555 Brown U Prov RI 02912