From: "Maciej W. Rozycki" <macro@mips.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org,
"Maciej W. Rozycki" <macro@linux-mips.org>,
Mark Kettenis <kettenis@gnu.org>
Subject: Re: hbreak.exp: Test hardware breakpoints
Date: Tue, 23 Oct 2007 17:10:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.61.0710231733140.7693@perivale.mips.com> (raw)
In-Reply-To: <20070930011752.GA21283@caradoc.them.org>
On Sat, 29 Sep 2007, Daniel Jacobowitz wrote:
> Maciej posted a patch to test hardware breakpoints. It passes on
> i386-linux, using current HEAD GDB. I wanted to see what would happen
> when the test was run against gdbserver, which does not support
> hardware breakpoints on i386 (yet). We encountered the long-standing
> bug that nm-i386.h overrides target.h using #define; this means that
> a native i386 GDB incorrectly tries to use ptrace even when connected
> to a remote target.
>
> I saw two ways to test: build a cross debugger or fix the bug. I
> fixed the bug. Unfortunately that broke the test:
>
> (gdb) hbreak main
> No hardware breakpoint support in the target.
> UNSUPPORTED: gdb.base/hbreak.exp: hardware breakpoints
>
> This is "target exec", since we have not yet started the program.
> While we were using #define to override GDB's defaults, this worked;
> every target, even exec, claimed to support watchpoints. Now that
> only "target child" supports hardware watchpoints, you can't insert
> hardware breakpoints before the program is running.
>
> This is the status quo on other targets too.
>
> How do you all feel about leaving the hbreak-before-run problem for
> another day, and adjusting the test to start the program running
> before trying hbreak?
Have we reached any conclusion on this matter? I cannot seem to find
any...
I am certainly fine to adjust the test script, at least for now -- no
problem. The question is how problematic, if at all, the change is to
people in actual debugging. For example, how often is a hardware
breakpoint used locally before a program is started:
(gdb) hbreak foo
(gdb) run
How about:
(gdb) break main
(gdb) run
[main() hit]
(gdb) hbreak foo
(gdb) continue
[foo() hit]
(gdb) run
And similarly for remote targets -- presumably having to define a
breakpoint before a connection is opened to the target is a non-issue, but
how about:
(gdb) target bar
(gdb) load
(gdb) hbreak foo
(gdb) run
[foo() hit]
(gdb) target bar
Not that these cases bother me terribly much, but they should be noted and
dismissed if not important enough.
Maciej
next prev parent reply other threads:[~2007-10-23 16:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-12 18:10 Maciej W. Rozycki
2007-09-21 23:01 ` Daniel Jacobowitz
2007-09-24 11:23 ` Maciej W. Rozycki
2007-09-24 11:32 ` Daniel Jacobowitz
2007-09-26 14:03 ` Maciej W. Rozycki
2007-09-26 14:21 ` Daniel Jacobowitz
2007-09-26 14:25 ` Maciej W. Rozycki
2007-09-26 14:29 ` Pedro Alves
2007-09-26 14:57 ` Maciej W. Rozycki
2007-09-26 15:51 ` Daniel Jacobowitz
2007-09-27 9:58 ` Maciej W. Rozycki
2007-09-27 12:08 ` Daniel Jacobowitz
2007-09-30 1:18 ` Daniel Jacobowitz
2007-10-23 17:10 ` Maciej W. Rozycki [this message]
2008-02-27 15:39 ` Maciej W. Rozycki
2008-03-01 4:40 ` Daniel Jacobowitz
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=Pine.LNX.4.61.0710231733140.7693@perivale.mips.com \
--to=macro@mips.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=kettenis@gnu.org \
--cc=macro@linux-mips.org \
/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