public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug pascal/11492] New: Patch to print (pascal) arrays of integer right
@ 2010-04-12 19:58 joost at cnoc dot nl
  2010-04-12 22:37 ` [Bug pascal/11492] " sergiodj at redhat dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: joost at cnoc dot nl @ 2010-04-12 19:58 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <bug-11492-4717@http.sourceware.org/bugzilla/>]

end of thread, other threads:[~2015-04-21 20:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-12 19:58 [Bug pascal/11492] New: Patch to print (pascal) arrays of integer right joost at cnoc dot nl
2010-04-12 22:37 ` [Bug pascal/11492] " sergiodj at redhat dot com
2010-04-13  7:53 ` joost at cnoc dot nl
2010-04-13  8:16 ` muller at ics dot u-strasbg dot fr
2010-04-13  9:24 ` muller at ics dot u-strasbg dot fr
2010-04-13 10:43 ` joost at cnoc dot nl
2010-05-08 15:20 ` muller at ics dot u-strasbg dot fr
2010-05-12 12:47 ` muller at ics dot u-strasbg dot fr
2010-05-15 20:47 ` jan dot kratochvil at redhat dot com
     [not found] <bug-11492-4717@http.sourceware.org/bugzilla/>
2014-09-12 22:01 ` sergiodj at redhat dot com
2015-04-21 20:41 ` muller at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).