Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Unified Diff: gdb/typeprint.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/tui/tui-win.c ('k') | gdb/ui-out.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/typeprint.c
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index de96fd5fcd1c8a59c075687f792b8f0517ab8429..c25e705d1c7154bf5df410ec9eef948f6e885eed 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -73,7 +73,7 @@ default_print_typedef (struct type *type, struct symbol *new_symbol,
If SHOW is negative, we never show the details of elements' types. */
void
-type_print (struct type *type, char *varstring, struct ui_file *stream,
+type_print (struct type *type, const char *varstring, struct ui_file *stream,
int show)
{
LA_PRINT_TYPE (type, varstring, stream, show, 0);
@@ -139,16 +139,7 @@ whatis_exp (char *exp, int show)
if (((TYPE_CODE (type) == TYPE_CODE_PTR)
|| (TYPE_CODE (type) == TYPE_CODE_REF))
&& (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
- {
- real_type = value_rtti_target_type (val, &full, &top, &using_enc);
- if (real_type)
- {
- if (TYPE_CODE (type) == TYPE_CODE_PTR)
- real_type = lookup_pointer_type (real_type);
- else
- real_type = lookup_reference_type (real_type);
- }
- }
+ real_type = value_rtti_indirect_type (val, &full, &top, &using_enc);
else if (TYPE_CODE (type) == TYPE_CODE_CLASS)
real_type = value_rtti_type (val, &full, &top, &using_enc);
}
@@ -215,7 +206,7 @@ print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
len = TYPE_NFIELDS (type);
for (i = 0; i < len; i++)
{
- if (TYPE_FIELD_BITPOS (type, i) == val)
+ if (TYPE_FIELD_ENUMVAL (type, i) == val)
{
break;
}
« no previous file with comments | « gdb/tui/tui-win.c ('k') | gdb/ui-out.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698