From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15096 invoked by alias); 11 Oct 2007 15:54:25 -0000 Received: (qmail 15087 invoked by uid 22791); 11 Oct 2007 15:54:25 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 11 Oct 2007 15:54:21 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 1253B981F3; Thu, 11 Oct 2007 15:54:20 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id EAD98981F2; Thu, 11 Oct 2007 15:54:19 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1Ig0Mc-00065A-Sy; Thu, 11 Oct 2007 11:54:18 -0400 Date: Thu, 11 Oct 2007 15:57:00 -0000 From: Daniel Jacobowitz To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org Subject: Re: [patch 1/4] libdecnumber support Message-ID: <20071011155418.GA22982@caradoc.them.org> Mail-Followup-To: Thiago Jung Bauermann , gdb-patches@sourceware.org References: <20070920215410.062714003@br.ibm.com> <20070920215539.570827491@br.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070920215539.570827491@br.ibm.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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-10/txt/msg00290.txt.bz2 I'll review all these now. Before you check them in, though, give me a chance to get libdecnumber merged into the src repository. It shouldn't take long. On Thu, Sep 20, 2007 at 06:54:11PM -0300, Thiago Jung Bauermann wrote: > +#include > +#include > +#include "defs.h" > +#include "dfp.h" What do you need ctype.h for? That will tell me whether you really want ctype.h or libiberty's locale-independent safe-ctype.h. defs.h should always be first. endian.h is not portable. You should probably use the autoconf macro AC_C_BIGENDIAN. > +/* Convert decimal type to its string representation. LEN is the length > + of the decimal type, 4 bytes for decimal32, 8 bytes for decimal64 and > + 16 bytes for decimal128. */ > +void > +decimal_to_string (const uint8_t *decbytes, int len, char *s) > +{ > + uint8_t *dec = (uint8_t *)malloc (len); You didn't include anything that would give you uint8_t; use gdb_byte. Also we never use malloc, only xmalloc. Or you could avoid the allocation by using gdb_byte dec[16]. > + break; > + default: > + free (dec); Spaces and tabs mixed up? xfree, like xmalloc. > + error(_("Unknown decimal floating point type.\n")); Space before parentheses please. > +/* There is a project intended to add DFP support into GCC, described in > + http://gcc.gnu.org/wiki/Decimal%20Floating-Point. This file is intended > + to add DFP support into GDB. */ This comment doesn't belong here. The file is part of GDB once the patch is applied. > +#ifndef DFP_H > +#define DFP_H > +#include > +#include > +#include Don't include standard headers here; stick to what defs.h provides. Just as well, since neither string.h nor stdint.h is portable. -- Daniel Jacobowitz CodeSourcery