From: Daniel Jacobowitz <drow@false.org>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>,
Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, luisgpm@linux.vnet.ibm.com,
tyrlik@us.ibm.com
Subject: Re: [PATCH 0/2] Support the new PPC476 processor
Date: Wed, 30 Dec 2009 22:15:00 -0000 [thread overview]
Message-ID: <20091230221535.GA25399@caradoc.them.org> (raw)
In-Reply-To: <831vicdwd0.fsf@gnu.org> <200912300112.13363.bauerman@br.ibm.com>
On Wed, Dec 30, 2009 at 01:12:13AM -0200, Thiago Jung Bauermann wrote:
> I'm reluctant to remove the watch-range command though, because with the
> artificial array syntax it's not straightforward to say "watch len *bytes*
> starting at addr". Using:
>
> watch *addr@len
>
> is not correct, since it will watch len *integers* starting at addr. To do
> what he/she wants, the user will have to type:
>
> watch *((char *) addr)@len
This unintuitive command should also work:
watch {char[len]} addr
It's not a very nice syntax though.
> They don't seem to be useful for C-level debugging, but can be for assembly-
> level debugging. For instance, if you have a block of code that has more than
> one entrypoint and therefore you don't know where it will get jumped into, you
> can put a ranged breakpoint to cover the entire block.
Also consider an unknown shared library as a block of code with
multiple entry points.
On Wed, Dec 30, 2009 at 10:45:31PM +0200, Eli Zaretskii wrote:
> > watch-range addr, +len
>
> What would be the use-case for watching a range of addresses that is
> not an integral multiple of a variable's size?
With literal numbers GDB will use units of ints instead of bytes:
(gdb) ptype 0x10000000@32
type = int [32]
So "watch 0x10000000@32" will not have the expected effect. This
is more likely to be useful when specifying the bare address rather
than a C-level variable, I think.
> Thanks for the explanations. I think we should emulate this on
> architectures that don't have this in hardware (it doesn't sound
> hard).
How do you mean? It seems basically impossible to me.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2009-12-30 22:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 20:48 Sérgio Durigan Júnior
2009-12-17 4:42 ` Joel Brobecker
2009-12-17 14:19 ` Thiago Jung Bauermann
2009-12-17 16:15 ` Sérgio Durigan Júnior
2009-12-18 10:19 ` Eli Zaretskii
2009-12-20 12:33 ` Joel Brobecker
2009-12-30 3:13 ` Thiago Jung Bauermann
2009-12-30 20:43 ` Eli Zaretskii
2009-12-30 22:15 ` Daniel Jacobowitz [this message]
2009-12-31 4:05 ` Eli Zaretskii
2009-12-31 16:28 ` Daniel Jacobowitz
2009-12-31 16:50 ` Pedro Alves
2009-12-20 13:16 ` Joel Brobecker
2009-12-20 15:09 ` Sérgio Durigan Júnior
2009-12-20 18:24 ` Joel Brobecker
2009-12-21 12:54 ` Thiago Jung Bauermann
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=20091230221535.GA25399@caradoc.them.org \
--to=drow@false.org \
--cc=bauerman@br.ibm.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=luisgpm@linux.vnet.ibm.com \
--cc=tyrlik@us.ibm.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