From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12840 invoked by alias); 12 Apr 2010 19:58:00 -0000 Received: (qmail 12826 invoked by uid 48); 12 Apr 2010 19:58:00 -0000 Date: Mon, 12 Apr 2010 19:58:00 -0000 From: "joost at cnoc dot nl" To: gdb-prs@sourceware.org Message-ID: <20100412195759.11492.joost@cnoc.nl> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug pascal/11492] New: Patch to print (pascal) arrays of integer right X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2010-q2/txt/msg00064.txt.bz2 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.