This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: fix `gdb -write' case
On 05/09/2011 10:53 PM, Tom Tromey wrote:
> Here is Jan's one-line reproducer:
>
> echo 'char s[]="a";main(){return s[0]=='"'a';}"|gcc -o v -x c - -g;./v;echo $?;~/redhat/gdb-6.8/gdb/gdb -nx -write ./v -ex 'set var s="b"' -ex q;./v;echo $?
Is this patch to fix bugs against gdb 6.8? I am still unable to
reproduce this problem on gdb 20110505-cvs.
$ ./gdb/gdb -nx -write ~/Work/gdb-write
(gdb) set var s="b"
evaluation of this expression requires the target program to be active
(gdb) b main
Breakpoint 1 at 0x80483b7: file gdb-write.c, line 3.
(gdb) run
Starting program: /home/yao/Work/gdb-write
BFD: reopening /home/yao/Work/gdb-write: Text file busy
[This message above repeats]
Breakpoint 1, main () at gdb-write.c:3
3 main(){return s[0]=='a';}
(gdb) set var s="b"
BFD: reopening /home/yao/Work/gdb-write: Text file busy
....
Invalid cast.
Is it a separate issue?
--
Yao (éå)