This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] proper display of reference type


Hi folks,

the following patch fixes the display of reference types, e.g. selects
the proper default layout for their display. This problem has been reported
twice already (*sigh*) and is still open....

It has to be applied to gdb/printcmd.c.

diff -Naur ./printcmd.c ../../gdb-6.6-patched/gdb/./printcmd.c
--- ./printcmd.c        2006-10-17 22:17:44.000000000 +0200
+++ ../../gdb-6.6-patched/gdb/./printcmd.c      2007-08-28 15:08:21.000000000 +0200
@@ -282,11 +282,12 @@
       break;

     default:
-      if (format == 0
+      if (format == 0 /* FIX THOR: Print references also by this */
          || TYPE_CODE (type) == TYPE_CODE_ARRAY
          || TYPE_CODE (type) == TYPE_CODE_STRING
          || TYPE_CODE (type) == TYPE_CODE_STRUCT
          || TYPE_CODE (type) == TYPE_CODE_UNION
+         || TYPE_CODE (type) == TYPE_CODE_REF
          || TYPE_CODE (type) == TYPE_CODE_NAMESPACE)
        /* If format is 0, use the 'natural' format for that type of
           value.  If the type is non-scalar, we have to use language

Greetings,
	Thomas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]