gdb bug on Fedora Core 3?
From: iQ199 (iQ199_at_163.net)
Date: 04/23/05
- Next message: terryshel1313: "missing gifs"
- Previous message: Moe Trin: "Re: Dial-up connections"
- Next in thread: Tommy Reynolds: "Re: gdb bug on Fedora Core 3?"
- Reply: Tommy Reynolds: "Re: gdb bug on Fedora Core 3?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 23 Apr 2005 12:33:26 +0800
The code is very easy:
#include <stdio.h>
main()
{
char *str;
int size = 10;
int i;
str = (char*)malloc(size);
for (i = size; i > 1; i--)
str[size - i] = '*';
str[size - 1] = '\0';
printf("str=%s\n", str);
}
I want watch "str[size - i]" in gdb, but it report error:
gcc -g -o test test.c
gdb testgdb test
(gdb) b 10
Breakpoint 1 at 0x80483e0: file test.c, line 10.
(gdb) r
Starting program: /root/tmp/test
Breakpoint 1, main() at test.c:10
10 str[size - i] = '*';
(gdb) watch str[size - i]
Hardware watchpoint 2: str[size - i]
(gdb) n
warning: Could not remove hardware watchpoint 2.
Warning:
Could not insert hardware watchpoint 2.
Could not insert hardware breakpoints:
You may have requested too may hardware breakpoints/watchpoints.
it only report error on Fedora Core 3.
i tseted it on redhat linux 9.0/Fedora Core 1, no error.
- Next message: terryshel1313: "missing gifs"
- Previous message: Moe Trin: "Re: Dial-up connections"
- Next in thread: Tommy Reynolds: "Re: gdb bug on Fedora Core 3?"
- Reply: Tommy Reynolds: "Re: gdb bug on Fedora Core 3?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|