Article View: gnu.gdb.bug
Article #383gdb string-printing feature request
From: John Salmon
Date: Tue, 18 Aug 1992 03:59
Date: Tue, 18 Aug 1992 03:59
38 lines
2155 bytes
2155 bytes
I have a program which, because of notoriously unreliable I/O facilities
on the machines I typically use, writes a large amount of status
information into an internal character array. This information is
the kind of thing you might normally send to stderr if you have DEBUG
turned on. When the program is under gdb control, I would like to be
able to print this string to the terminal with newline characters in the
string appearing as line breaks in the output. Gdb insists on printing
newlines as "\n", and formating everything onto a single output line (which
wraps several hundred times on my terminal window).
Any assistance would be appreciated, i.e., new features in gdb, or simply
pointing out that this can be done already, and I haven't read the manual
carefully enough.
Here's a short example:
-------------what I get now---------------------
(gdb) print dbgbuf
$1 = {"###proc 0\nrmin=(-1, -1, -1)\nrmax=(0.966874, 0.911626, 0.988096)\nBuildTree nobj = 30\nstart pqsort, *base at dcdf8\npqsort max-min combines\npqsort done, *base at dcdf8\nAfter Decomp, nobj = 30\nMade local"...}
(gdb)
---------------what I would like-----------------------
(gdb) print dbgbuf
$1 = {"###proc 0\nrmin=(-1, -1, -1)
rmax=(0.966874, 0.911626, 0.988096)
BuildTree nobj = 30
start pqsort, *base at dcdf8
pqsort max-min combines
pqsort done, *base at dcdf8
After Decomp, nobj = 30
Made local"...}
(gdb)
-------------------------------------------------------
Thanks,
John Salmon Internet: johns@delilah.ccsf.caltech.edu
206-49 Caltech UUCP: johns%delilah.ccsf.caltech.edu@uunet.uu.net
Pasadena, CA 91125 USA Bitnet: johns@caltech.bitnet
(818)356-2907 delilah.ccsf.caltech.edu=[131.215.145.137]
Technical Details
Message-ID:
<199208181759.AA28624@haggis.ccsf.caltech.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!haggis.ccsf.caltech.edu!johnsShow Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!haggis.ccsf.caltech.edu!johns From: johns@haggis.ccsf.caltech.edu (John Salmon) Subject: gdb string-printing feature request Message-ID: <199208181759.AA28624@haggis.ccsf.caltech.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 18 Aug 1992 03:59:35 GMT Approved: bug-gdb@prep.ai.mit.edu Lines: 41