From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: Language of registers
Date: Sat, 25 Nov 2006 11:22:00 -0000 [thread overview]
Message-ID: <200611251421.43173.vladimir@codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
At the moment, MI varobj assume that register values have a language. As
result, if you try to look at values of $xmm1 in a C++ program, you'll find
that this registers has a 'public' field -- which is not reasonable.
The attached patch causes MI to always force the C language for register
values, so no special processing takes place. OK?
- Volodya
* varobj.c (varobj_create): For register values,
always use C as the language.
[-- Attachment #2: c_registers__gdb_mainline.diff --]
[-- Type: text/x-diff, Size: 794 bytes --]
=== gdb/varobj.c
==================================================================
--- gdb/varobj.c (/mirrors/gdb_mainline) (revision 2298)
+++ gdb/varobj.c (/patches/gdb/c_registers/gdb_mainline) (revision 2298)
@@ -518,7 +518,15 @@
var->type = value_type (var->value);
/* Set language info */
- lang = variable_language (var);
+ if (VALUE_REGNUM (var->value) != -1)
+ /* For register values, we don't want any language
+ specific processing, so use the less specialized
+ language. Otherwise, in C++ programs registers likes
+ xmm1 will feature 'public' children, that makes no
+ sense for registers. */
+ lang = vlang_c;
+ else
+ lang = variable_language (var);
var->root->lang = languages[lang];
/* Set ourselves as our root */
next reply other threads:[~2006-11-25 11:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-25 11:22 Vladimir Prus [this message]
2006-11-27 14:03 ` Daniel Jacobowitz
2006-11-28 17:12 ` Vladimir Prus
2006-11-28 17:23 ` Daniel Jacobowitz
2006-11-28 18:09 ` Vladimir Prus
2006-12-01 14:32 ` Daniel Jacobowitz
2006-12-01 18:03 ` Jim Ingham
2006-11-29 10:12 ` Vladimir Prus
2006-11-27 0:43 Nick Roberts
2006-11-27 6:32 ` Vladimir Prus
2006-11-27 7:37 ` Eli Zaretskii
2006-12-06 21:54 Nick Roberts
2006-12-06 22:03 ` Daniel Jacobowitz
2006-12-06 22:55 ` Nick Roberts
2006-12-06 23:10 ` Daniel Jacobowitz
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=200611251421.43173.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--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