Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Ulisses Furquim" <ulissesf@gmail.com>
To: gdb@sourceware.org
Subject: Watchpoints in an ARM platform
Date: Thu, 31 May 2007 10:18:00 -0000	[thread overview]
Message-ID: <d23110170705310318i17008caera3edc1d3f69e9dce@mail.gmail.com> (raw)

Hi,

I was experimenting with gdb 6.6 on an ARM device and I noticed a
problem with watchpoints. I was using a simple application I compiled
with a cross-compiler like this:

$ arm-none-linux-gnueabi-gcc testgdb.c -g3 -O0 -Wall
-fno-omit-frame-pointer -o testgdb --sysroot /tftpboot/ltib

Here is a gdb session to better show you the problem:

$ gdb ./testgdb
GNU gdb 6.6
Copyright (C) 2006 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 "arm-none-linux-gnueabi"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) b Dummy1
Breakpoint 1 at 0x8390: file testgdb.c, line 6.
(gdb) r
Starting program: /testgdb
Hello World!

Breakpoint 1, Dummy1 () at testgdb.c:6
6               for(i=0; i<10 ; i++)
(gdb) l 6
1       #include <stdio.h>
2
3       void Dummy1()
4       {
5               int i;
6               for(i=0; i<10 ; i++)
7               {
8                       printf("itteration %d\n",i);
9               }
10      }
(gdb) rwatch i
Target does not support this type of hardware watchpoint.
(gdb) awatch i
Target does not support this type of hardware watchpoint.
(gdb) watch i
Watchpoint 2: i
(gdb) c
Continuing.
Watchpoint 2: i

Old value = 33480
New value = 0
0x00008398 in Dummy1 () at testgdb.c:6
6               for(i=0; i<10 ; i++)
(gdb) c
Continuing.

Watchpoint 2 deleted because the program has left the block in
which its expression is valid.
0x0000828c in ?? ()
(gdb) n
Cannot find bounds of current function
(gdb)
Cannot find bounds of current function
(gdb) q
The program is running.  Exit anyway? (y or n) y
$

It says the target doesn't support that type of hardware watchpoint
when I've tried rwatch and awatch, but it works when I use the watch
command (maybe using some software watchpoint). After that I can
continue and it correctly stops the program the first time, but when I
continue again something goes wrong and gdb gets confused. Do you have
any idea why this happens? Am I missing anything here?

Best regards,

-- Ulisses


             reply	other threads:[~2007-05-31 10:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31 10:18 Ulisses Furquim [this message]
2007-05-31 17:23 ` Daniel Jacobowitz
2007-05-31 18:30   ` Ulisses Furquim

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=d23110170705310318i17008caera3edc1d3f69e9dce@mail.gmail.com \
    --to=ulissesf@gmail.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