This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFC] Fix bug in MI -data-list-register-values, PSEUDO_REGS ignored
- From: Salvador Eduardo Tropea <salvador at inti dot gov dot ar>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 25 Aug 2004 13:21:51 -0300
- Subject: [RFC] Fix bug in MI -data-list-register-values, PSEUDO_REGS ignored
Hi!
That´s the first time a send a patch here, sorry if I´m doing anything
wrong.
Problem: -data-list-register-values gives an error about invalid
register number for some registers reported by -data-list-register-names.
Solution: The real problem is that mi_cmd_data_list_register_names
computes "numregs = NUM_REGS + NUM_PSEUDO_REGS" but
mi_cmd_data_list_register_values computes "numregs = NUM_REGS". So the
solution is to also compute the pseudo registers.
The patch is trivial and is attached.
I thing the Changelog entry should be something like:
2004-08-25 Salvador E. Tropea <set@users.sf.net>
* mi/mi-main.c (mi_cmd_data_list_register_values): Fixed wrong
register number computation.
--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set@computer.org set@ieee.org
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013
Index: gdb/mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.64
diff -u -r1.64 mi-main.c
--- gdb/mi/mi-main.c 3 Aug 2004 00:57:27 -0000 1.64
+++ gdb/mi/mi-main.c 25 Aug 2004 14:12:50 -0000
@@ -423,7 +423,7 @@
case, some entries of REGISTER_NAME will change depending upon
the particular processor being debugged. */
- numregs = NUM_REGS;
+ numregs = NUM_REGS + NUM_PSEUDO_REGS;
if (argc == 0)
{