This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PRecord] Memory gets set even if users responds 'n' to query


Hi,

while looking into the query stuff we have been discussing I ran into
the weird behavior where PRecord sets memory even if I answer 'n' to the
query.  I've done a little troubleshooting and it seems that the query
code is not the problem.  So, I thought that maybe even though PRecord
returns
from its method right away when I say 'n' to the query, the memory
has already been changed.  Could that be?  I didn't investigate further.

Also, I didn't try it with changing registers.

I'm pretty sure it used to work properly.

Thanks

Marc

Here is the session:

GNU gdb (GDB) 6.8.50.20090720-cvs
Copyright (C) 2009 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 "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) l
1	int main() {
2	    int a = 1;
3	    int b = 10;
4	
5	    a++;
6	    b++;
7	
8	    return a;
9	}
10	
(gdb) start
Temporary breakpoint 1 at 0x80483f5: file b.cc, line 2.
Starting program: /home/marc/testing/a.out 
re
Temporary breakpoint 1, main () at b.cc:2
2	    int a = 1;
(gdb) record
(gdb) n
3	    int b = 10;
(gdb) n
5	    a++;
(gdb) n
6	    b++;
(gdb) n
8	    return a;
(gdb) rn
6	    b++;
(gdb) p a
$1 = 2
(gdb) set var a = 8
Because GDB is in replay mode, writing to memory will make the execution
log unusable from this point onward.  Write memory at address
0xbffff6b0?(y or [n]) n
(gdb) p a
$2 = 8
(gdb) 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]