From: Yuri <yuri@rawbw.com>
To: gdb@sourceware.org
Subject: Re: Why gdb-7.1 doesn't set hardware watchpoints on i7 CPU (amd64)?
Date: Thu, 30 Jun 2011 23:40:00 -0000 [thread overview]
Message-ID: <4E0D0957.6040003@rawbw.com> (raw)
In-Reply-To: <CALoOobPkcR6zJXXYQ3O-bP=gwW0CoyGLkfNhbC5k1n8xbnDQ-g@mail.gmail.com>
Please find below the log of the whole session with gdb_7_3-branch (BTW
it still prints the 7.2 version number).
I used this C++ program:
#include <string.h>
void ms(char *p) {
memset(p, 0, 1024);
}
main() {
char buf1[1024];
buf1[256] = 7;
ms(buf1);
}
Please also note that with watchpoint active it was taking a long time
for gdb to restart the program after 'Starting program' line.
Yuri
---- gdb session log ----
[yuri@mybsd ~/gdb]$ gdb ./main
GNU gdb (GDB) 7.2.90.20110630-cvs
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-freebsd8.2".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/home/yuri/gdb/main...done.
(gdb) b main
Breakpoint 1 at 0x40065b: file main.C, line 9.
(gdb) r
Starting program: /usr/home/yuri/gdb/main
Breakpoint 1, main () at main.C:9
9 buf1[256] = 7;
(gdb) n
10 ms(buf1);
(gdb) p &buf1[256]
$1 = 0x7fffffffddd0 "\a"
(gdb) watch *(char*)0x7fffffffddd0
Watchpoint 2: *(char*)0x7fffffffddd0
(gdb) c
Continuing.
Watchpoint 2: *(char*)0x7fffffffddd0
Old value = 7 '\a'
New value = 0 '\000'
0x0000000800b78074 in memset () from /lib/libc.so.7
(gdb) c
Continuing.
Watchpoint 2: *(char*)0x7fffffffddd0
Old value = 0 '\000'
New value = 1 '\001'
0x0000000800505c6c in ?? () from /libexec/ld-elf.so.1
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/home/yuri/gdb/main
^C
Program received signal SIGINT, Interrupt.
0x0000000800505959 in ?? () from /libexec/ld-elf.so.1
(gdb) quit
A debugging session is active.
Inferior 1 [process 49302] will be killed.
Quit anyway? (y or n) y
next prev parent reply other threads:[~2011-06-30 23:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 3:20 Yuri
2010-12-27 5:07 ` Paul Pluzhnikov
2011-06-30 22:31 ` Yuri
2011-06-30 22:50 ` Paul Pluzhnikov
2011-06-30 23:40 ` Yuri [this message]
2011-07-01 10:02 ` Pedro Alves
2011-06-30 22:27 ` Yuri
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=4E0D0957.6040003@rawbw.com \
--to=yuri@rawbw.com \
--cc=gdb@sourceware.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