From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] target.c: eliminate one use of DEPRECATED_REGISTER_SIZE
Date: Fri, 09 Jan 2004 03:20:00 -0000 [thread overview]
Message-ID: <1040109032011.ZM30010@localhost.localdomain> (raw)
On FR-V, we found that hardware watchpoints were no longer working.
The reason for this is that frv-tdep.c was changed a while back to no
longer define DEPRECATED_REGISTER_SIZE. As a consequence,
DEPRECATED_REGISTER_SIZE is always 0. This means that the expression
(byte_count <= DEPRECATED_REGISTER_SIZE)
always evaluates to false, which effectively (though unintentionally) means
that no memory region is ever suitable for hardware watchpoints.
The use of the register's size (width in bytes) in this expression was
dubious to begin with. It seems to me that using the size of a
pointer makes (somewhat) more sense.
Okay?
* target.c (default_region_size_ok_for_hw_watchpoint): Compare
the region size against the size of a pointer, not the size of
a register as given by DEPRECATED_REGISTER_SIZE.
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.68
diff -u -p -r1.68 target.c
--- target.c 5 Jan 2004 22:32:23 -0000 1.68
+++ target.c 9 Jan 2004 03:01:23 -0000
@@ -1362,7 +1362,7 @@ find_default_create_inferior (char *exec
static int
default_region_size_ok_for_hw_watchpoint (int byte_count)
{
- return (byte_count <= DEPRECATED_REGISTER_SIZE);
+ return (byte_count <= (TARGET_PTR_BIT / TARGET_CHAR_BIT));
}
static int
next reply other threads:[~2004-01-09 3:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-09 3:20 Kevin Buettner [this message]
2004-01-11 19:15 ` Andrew Cagney
2004-01-19 16:52 ` Kevin Buettner
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=1040109032011.ZM30010@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=gdb-patches@sources.redhat.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