From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14760 invoked by alias); 26 Dec 2007 13:19:52 -0000 Received: (qmail 14750 invoked by uid 22791); 26 Dec 2007 13:19:51 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 26 Dec 2007 13:19:45 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E3D8E2A9691 for ; Wed, 26 Dec 2007 08:19:43 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fnQ1VyfnbmA8 for ; Wed, 26 Dec 2007 08:19:43 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 076482A9690 for ; Wed, 26 Dec 2007 08:19:43 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 0D9DDE7ACA; Wed, 26 Dec 2007 17:19:35 +0400 (RET) Date: Wed, 26 Dec 2007 14:23:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFA/x86_64] Add handling for TYPE_CODE_CHAR in inferior fun calls Message-ID: <20071226131934.GN31301@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="R3G7APHDIzY6R/pk" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00416.txt.bz2 --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 711 Hello, There was on ommision inside amd64-tdep.c:amd64_classify regarding the handling of TYPE_CODE_CHAR types. This shows up when printing the return value after making a function call inside the inferior. This shows up inside gdb.ada/char_param.exp: FAIL: gdb.ada/char_param.exp: call next Here is what the logs show: (gdb) call next (first) $3 = 0 '["00"]' The expected output is: (gdb) call next (first) $3 = 98 'b' The following patch fixes that ommission: 2007-12-26 Joel Brobecker * amd64-tdep.c (amd64_classify): Add handling of TYPE_CODE_CHAR. Tested on x86_64-linux, fixes the FAIL above. No regression. OK to commit? Thanks, -- Joel --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="amd64-tdep.c.diff" Content-length: 655 Index: amd64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/amd64-tdep.c,v retrieving revision 1.43 diff -u -p -r1.43 amd64-tdep.c --- amd64-tdep.c 6 Dec 2007 16:32:58 -0000 1.43 +++ amd64-tdep.c 26 Dec 2007 12:59:49 -0000 @@ -359,6 +359,7 @@ amd64_classify (struct type *type, enum class. */ if ((code == TYPE_CODE_INT || code == TYPE_CODE_ENUM || code == TYPE_CODE_BOOL || code == TYPE_CODE_RANGE + || code == TYPE_CODE_CHAR || code == TYPE_CODE_PTR || code == TYPE_CODE_REF) && (len == 1 || len == 2 || len == 4 || len == 8)) class[0] = AMD64_INTEGER; --R3G7APHDIzY6R/pk--