Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Koning <pkoning@equallogic.com>
To: drow@mvista.com
Cc: eliz@elta.co.il, gdb-patches@sources.redhat.com
Subject: Re: proposed PATCH: make watchpoints work correctly
Date: Thu, 29 May 2003 17:41:00 -0000	[thread overview]
Message-ID: <16086.17988.605671.621116@pkoning.dev.equallogic.com> (raw)
In-Reply-To: <20030529153705.GC10807@nevyn.them.org>

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 632 bytes --]

>>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:

 Daniel> I don't know how facile you are with expect, but could you
 Daniel> either write a full testcase or at least give me a small
 Daniel> sample code and session transcript to reduce the problem, so
 Daniel> that this can go into the testsuite?

I know next to nothing about expect, and from a quick look at some
testsuite files it would take me some time to construct a proper
testcase file.

Attached are a test program and a before and after log of a session
that shows the issue with awatch.  The test run was on RedHat 8.0
linux, gdb 5.3 native.

       paul

[-- Attachment #2: awatch.c --]
[-- Type: text/plain, Size: 113 bytes --]

volatile int i, j;

int main (int argc, char **argv)
{
    i = 1;
    j = 1;
    j = 2;
    j = 3;
    i = 2;
}


[-- Attachment #3: before.log --]
[-- Type: text/plain, Size: 1274 bytes --]

[pkoning@pkoning gdb-5.3]$ gdb/gdb a.out
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) b main
Breakpoint 1 at 0x8048318: file awatch.c, line 5.
(gdb) run
Starting program: /usr/src/gdb-5.3/a.out

Breakpoint 1, main (argc=1, argv=0xbffffae4) at awatch.c:5
5           i = 1;
(gdb) awatch i
Hardware access (read/write) watchpoint 2: i
(gdb) s
6           j = 1;
(gdb)
Hardware access (read/write) watchpoint 2: i

Value = 0
main (argc=1, argv=0xbffffae4) at awatch.c:7
7           j = 2;
(gdb)
Hardware access (read/write) watchpoint 2: i

Value = 0
main (argc=1, argv=0xbffffae4) at awatch.c:8
8           j = 3;
(gdb)
Hardware access (read/write) watchpoint 2: i

Value = 0
main (argc=1, argv=0xbffffae4) at awatch.c:9
9           i = 2;
(gdb)
Hardware access (read/write) watchpoint 2: i

Old value = 0
New value = 2
main (argc=1, argv=0xbffffae4) at awatch.c:10
10      }
(gdb) q
The program is running.  Exit anyway? (y or n) y

[-- Attachment #4: after.log --]
[-- Type: text/plain, Size: 971 bytes --]

[pkoning@pkoning gdb-5.3]$ gdb/gdb a.out
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) b main
Breakpoint 1 at 0x8048318: file awatch.c, line 5.
(gdb) run
Starting program: /usr/src/gdb-5.3/a.out

Breakpoint 1, main (argc=1, argv=0xbffffae4) at awatch.c:5
5           i = 1;
(gdb) awatch i
Hardware access (read/write) watchpoint 2: i
(gdb) s
6           j = 1;
(gdb)
7           j = 2;
(gdb)
8           j = 3;
(gdb)
9           i = 2;
(gdb)
Hardware access (read/write) watchpoint 2: i

Old value = 0
New value = 2
main (argc=1, argv=0xbffffae4) at awatch.c:10
10      }
(gdb) q
The program is running.  Exit anyway? (y or n) y

  reply	other threads:[~2003-05-29 17:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-28 16:01 Paul Koning
2003-05-28 16:02 ` Paul Koning
2003-05-28 16:42 ` Daniel Jacobowitz
2003-05-28 19:54 ` Eli Zaretskii
2003-05-28 20:27   ` Paul Koning
2003-05-29  3:27     ` Eli Zaretskii
2003-05-29  4:36       ` Nathan J. Williams
2003-05-29 15:14         ` Eli Zaretskii
2003-05-29 15:17       ` Paul Koning
2003-05-29 15:37         ` Daniel Jacobowitz
2003-05-29 17:41           ` Paul Koning [this message]
2003-06-02  4:19         ` Eli Zaretskii
2003-06-04 14:51           ` Paul Koning
2003-06-29  4:15             ` 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=16086.17988.605671.621116@pkoning.dev.equallogic.com \
    --to=pkoning@equallogic.com \
    --cc=drow@mvista.com \
    --cc=eliz@elta.co.il \
    --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