From: Joel Brobecker <brobecker@adacore.com>
To: Pierre Muller <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Add hardware breapoints in procfs.c
Date: Fri, 15 May 2009 15:51:00 -0000 [thread overview]
Message-ID: <20090515155106.GP7292@adacore.com> (raw)
In-Reply-To: <20090515154125.GO7292@adacore.com>
> > * procfs.c (procfs_insert_hw_breakpoint, procfs_remove_hw_breakpoint):
> > New functions.
> > (procfs_use_watchpoints): Register new hardware breakpoint related
> > target functions.
>
> I don't know procfs enough to review the patch accurately. I think
> that the part for removing the watchpoint is correct
Actually, target_insert/remove_hw_breakpoint are supposed to return
non-zero if the operation failed. However, if you look at the implementation
of procfs_set_watchpoint:
procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, int len, int rwflag,
int after)
{
#ifndef UNIXWARE
#ifndef AIX5
[...]
#endif /* AIX5 */
#endif /* UNIXWARE */
return 0;
}
In other words, if h/w watchpoints are not supported, this function
returns zero. Use that directly to insert h/w breakpoints on a system
where this feature is not implemented would lead the debugger to think
that the breakpoint was inserted when in fact it wasn't.
--
Joel
prev parent reply other threads:[~2009-05-15 15:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 21:24 Pierre Muller
2009-05-14 21:30 ` Pierre Muller
2009-05-15 15:41 ` Joel Brobecker
2009-05-15 15:51 ` Joel Brobecker [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=20090515155106.GP7292@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=muller@ics.u-strasbg.fr \
/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