Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Salvador Eduardo Tropea <salvador@inti.gov.ar>
To: gdb-patches@sources.redhat.com
Subject: [RFC] Fix bug in MI -data-list-register-values, PSEUDO_REGS ignored
Date: Wed, 25 Aug 2004 16:21:00 -0000	[thread overview]
Message-ID: <412CBC9F.2050201@inti.gov.ar> (raw)

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

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


[-- Attachment #2: -data-list-register-values.patch --]
[-- Type: text/plain, Size: 532 bytes --]

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)
     {




             reply	other threads:[~2004-08-25 16:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25 16:21 Salvador Eduardo Tropea [this message]
2004-09-12 14:52 ` Andrew Cagney
2004-09-13 20:29   ` Salvador Eduardo Tropea
2004-09-13 20:53     ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=412CBC9F.2050201@inti.gov.ar \
    --to=salvador@inti.gov.ar \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox