[patch/rfc; RFA:testsuite] Revamp store for lval_register and lval_reg_frame_relative

Andrew Cagney ac131313@redhat.com
Sat Nov 2 21:06:00 GMT 2002


Hello,

The attached patch merges the lval_register and lval_reg_frame_relative 
store-register code.  It now treads lval_register just like 
lval_reg_frame_relative only the former always applies to the current 
(inner most) frame.

As a bonus, the merge manages to eliminate any calls to the functions 
write_register_bytes(), read_register_bytes(), and get_saved_register() 
in tha file.

But wait, there's more!  The patch adds tests to check that GDB can 
actually store a value correctly in a target register.

And if you test the patch in the next 15 minutes, the merge will also 
fix the very long standing bug where GDB would occasionally loose the 
selected frame:
	(gdb) up
	10	v = v + v;
	(gdb) print v
	$1 = 10
	(gdb) set variable v = 20
	(gdb) print v
	No symbol "v" in current context.
	(gdb) down
	Bottom (i.e., innermost) frame selected; you cannot go down.
	(gdb) up
	10	v = v + v;
	(gdb) print v
	$2 = 20
The code now restores the selected frame after the frame-cache flush.

I'll look to commit the valops.c patch in a few days (it depends on an 
earlier frame_register() patch).

Fernando,
the new store.{exp,c} test cases?  The tests fail without this patch and 
pass with the patch applied.

Andrew

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20021102/56ba44d3/attachment.ksh>


More information about the Gdb-patches mailing list