From: Vladimir Prus <ghost@cs.msu.su>
To: Paul Koning <pkoning@equallogic.com>
Cc: gdb@sources.redhat.com
Subject: Re: The 'x' command: size problem
Date: Tue, 06 Sep 2005 15:27:00 -0000 [thread overview]
Message-ID: <200509061927.07445.ghost@cs.msu.su> (raw)
In-Reply-To: <17181.45190.337014.159288@gargle.gargle.HOWL>
On Tuesday 06 September 2005 19:06, Paul Koning wrote:
> p/x packet
>
> will do the job.
>
> Or if you need to refer to some hex address and interpret it as the
> data:
>
> p/x *(struct packet *) 0x12342324
Good, but:
1. The output format of 'p' is very different from that of 'x'.
Given that I use 'x' for general case of 'print 1000 bytes starting at
0x12345678', I'll have to detect when to use 'p', and when to parse output of
'p', not output of 'x'.
2. What if user wants to see 5*sizeof(packet) bytes of memory from a given
address?
p/x (*(packet*)0x12345678)@5
will work but would require extra code to get that from "5*sizeof(packet)",
would require extra code to parse output, and what about even more complex
case of "sizeof(first_packet) + 5*sizeof(packet)"?
- Volodya
prev parent reply other threads:[~2005-09-06 15:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-06 15:04 Vladimir Prus
2005-09-06 15:25 ` Daniel Jacobowitz
2005-09-06 15:35 ` Vladimir Prus
2005-09-06 15:42 ` Daniel Jacobowitz
2005-09-07 6:55 ` Vladimir Prus
2005-09-07 13:14 ` Daniel Jacobowitz
2005-09-07 13:42 ` Vladimir Prus
2005-09-07 18:02 ` Eli Zaretskii
2005-09-06 19:17 ` Eli Zaretskii
2005-09-06 19:29 ` Daniel Jacobowitz
2005-09-07 6:40 ` Vladimir Prus
[not found] ` <17181.45190.337014.159288@gargle.gargle.HOWL>
2005-09-06 15:27 ` Vladimir Prus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200509061927.07445.ghost@cs.msu.su \
--to=ghost@cs.msu.su \
--cc=gdb@sources.redhat.com \
--cc=pkoning@equallogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).