List Info

Thread: How to see the content of a buffer




How to see the content of a buffer
user name
2008-04-15 05:27:44
Hi all,

sorry if the question may appear naive,

I would like to print from gdb the content of a buffer,
either using
the emacs interface or gdb I get the buffer truncated, that
is I get
something of the kind:

$49 = 0xbfa6048f "OPTIONS * RTSP/1.0rnDate: Mon, 14
Apr 2008 13:53:26 GMTrnCSeq: 2rnSupported:
method.announcernrnANNOUNCE * RTSP/1.0rnDate: Mon, 14
Apr 2008 13:53:3"...

which command should I use to see the complete content of
the buffer
(or to see say the buffer from char 0 to char N)?

Many thanks in advance.

Best regards.
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)

Re: How to see the content of a buffer
country flaguser name
Germany
2008-04-15 06:43:56
Stefano Sabatini <stefano.sabatini-lalaposte.it> writes:

> which command should I use to see the complete content
of the buffer
> (or to see say the buffer from char 0 to char N)?

(gdb) help set print elements
Set limit on string chars or array elements to print.
"set print elements 0" causes there to be no
limit.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwabsuse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg,
Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5
214B 8276 4ED5
"And now for something completely different."

Re: How to see the content of a buffer
user name
2008-04-15 07:23:11
On date Tuesday 2008-04-15 13:43:56 +0200, Andreas Schwab
wrote:
> Stefano Sabatini <stefano.sabatini-lalaposte.it> writes:
> 
> > which command should I use to see the complete
content of the buffer
> > (or to see say the buffer from char 0 to char N)?
> 
> (gdb) help set print elements
> Set limit on string chars or array elements to print.
> "set print elements 0" causes there to be no
limit.

Thanks Andreas, it worked fine, I also checked the x command
too
(x/200c data) which is also useful for other purposes.

Many regards.
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)

Re: How to see the content of a buffer
user name
2008-04-15 07:23:11
On date Tuesday 2008-04-15 13:43:56 +0200, Andreas Schwab
wrote:
> Stefano Sabatini <stefano.sabatini-lalaposte.it> writes:
> 
> > which command should I use to see the complete
content of the buffer
> > (or to see say the buffer from char 0 to char N)?
> 
> (gdb) help set print elements
> Set limit on string chars or array elements to print.
> "set print elements 0" causes there to be no
limit.

Thanks Andreas, it worked fine, I also checked the x command
too
(x/200c data) which is also useful for other purposes.

Many regards.
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )