This is the mail archive of the gdb-prs@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]

[Bug pascal/11492] New: Patch to print (pascal) arrays of integer right


With this patch an array of integers is printed like this:

$8 = {50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62}

Without this patch it is printed as if it is a string:

$23 = '23456789:;<=>'

I like the first option better. ;)

patch:

--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -82,9 +85,8 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
 	    }
 	  /* For an array of chars, print with string syntax.  */
 	  if ((eltlen == 1 || eltlen == 2 || eltlen == 4)
-	      && ((TYPE_CODE (elttype) == TYPE_CODE_INT)
-	       || ((current_language->la_language == language_pascal)
-		   && (TYPE_CODE (elttype) == TYPE_CODE_CHAR)))
+	      && ((current_language->la_language == language_pascal)
+		   && (TYPE_CODE (elttype) == TYPE_CODE_CHAR))
 	      && (options->format == 0 || options->format == 's'))
 	    {
 	      /* If requested, look for the first null char and only print

-- 
           Summary: Patch to print (pascal) arrays of integer right
           Product: gdb
           Version: archer
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: pascal
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: joost at cnoc dot nl
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=11492

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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