Path: utzoo!utgpu!attcan!uunet!brunix!doorknob!wsd From: wsd@cs.brown.edu Newsgroups: comp.sys.next Subject: Re: gdb agony Message-ID: Date: 24 May 89 22:14:59 GMT References: <1110@garcon.cso.uiuc.edu> Sender: news@brunix.UUCP Organization: Brown University Department of Computer Science Lines: 34 In-reply-to: dorner@pequod.cso.uiuc.edu's message of 24 May 89 17:40:52 GMT 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