public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: flameroc@gmail.com, yao@codesourcery.com, gdb@sourceware.org
Subject: Re: Hardware breakpoint limitation issue during the gdb regression test
Date: Thu, 09 Aug 2012 10:42:00 -0000	[thread overview]
Message-ID: <20120809104209.GA25622@host2.jankratochvil.net> (raw)
In-Reply-To: <201208091030.q79AURkU017337@glazunov.sibelius.xs4all.nl>

On Thu, 09 Aug 2012 12:30:27 +0200, Mark Kettenis wrote:
> No, x86 has even less hardware breakpoints (4).  But it will fall back
> to using software breakpoints.

It will not.

But in fact it is better this way as even suggested by Markus Metzger as if
GDB drops to using software watchpoints the debugging just "locks up" and user
does not know why.

(gdb) start
(gdb) l 1,1
1	long v1, v2, v3, v4, v5;
(gdb) watch v1
Hardware watchpoint 2: v1
(gdb) watch v2
Hardware watchpoint 3: v2
(gdb) watch v3
Hardware watchpoint 4: v3
(gdb) watch v4
Hardware watchpoint 5: v4
(gdb) watch v5
Hardware watchpoint 6: v5
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       hw watchpoint  keep y                      v1
3       hw watchpoint  keep y                      v2
4       hw watchpoint  keep y                      v3
5       hw watchpoint  keep y                      v4
6       hw watchpoint  keep y                      v5
(gdb) c
Continuing.
Warning:
Could not insert hardware watchpoint 5.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.


It is more a bug that in this case no error message is given:

(gdb) l 2,2
2	long a[5];
(gdb) watch a
Watchpoint 2: a


Regards,
Jan

  reply	other threads:[~2012-08-09 10:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08  8:55 Terry Guo
2012-08-08 16:40 ` Liang Cheng
2012-08-09  0:03 ` Luis Gustavo
2012-08-09  3:48 ` Yao Qi
2012-08-09  9:12   ` Terry Guo
2012-08-09 10:30     ` Mark Kettenis
2012-08-09 10:42       ` Jan Kratochvil [this message]
2012-08-09 16:00         ` Eli Zaretskii

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=20120809104209.GA25622@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=flameroc@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=yao@codesourcery.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).