From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23742 invoked by alias); 19 Apr 2008 00:18:25 -0000 Received: (qmail 23722 invoked by uid 22791); 19 Apr 2008 00:18:24 -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; Sat, 19 Apr 2008 00:18:05 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 94227983D9; Fri, 18 Apr 2008 21:35:16 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 6664D983D6; Fri, 18 Apr 2008 21:35:16 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JmyEj-0000Vm-4u; Fri, 18 Apr 2008 17:35:13 -0400 Date: Sat, 19 Apr 2008 00:32:00 -0000 From: Daniel Jacobowitz To: Craig Silverstein Cc: bauerman@br.ibm.com, gdb-patches@sourceware.org Subject: Re: Patch to handle compressed sections Message-ID: <20080418213513.GA1669@caradoc.them.org> Mail-Followup-To: Craig Silverstein , bauerman@br.ibm.com, gdb-patches@sourceware.org References: <20080401140953.GD12753@caradoc.them.org> <20080402000638.1BD1B3F25EF@localhost> <20080402001637.GA18178@caradoc.them.org> <20080403054128.A45A43F25F0@localhost> <20080403064309.5454D3F25F0@localhost> <20080414234559.A3AA03F23CF@localhost> <20080417161526.GF17488@caradoc.them.org> <20080417185752.244673F23EF@localhost> <20080417190324.GA21743@caradoc.them.org> <20080418212806.28E4C3F24C4@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080418212806.28E4C3F24C4@localhost> User-Agent: Mutt/1.5.17 (2007-12-11) 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: 2008-04/txt/msg00391.txt.bz2 Message-ID: <20080419003200.4wn-dyURhZuo1Q81a6WxONZrADo8eyvJX96zaGtQ2hM@z> On Fri, Apr 18, 2008 at 02:28:06PM -0700, Craig Silverstein wrote: > } I see. Well, you could use bfd_getb32 twice... I just felt that the > } eight copies of that line were excessive. > > Then you'd do something like > size = (a << 32) + b; > which likewise won't work well (well, will give a compiler warning) on > 32-bit systems. Not on 32-bit systems, on systems without a 64-bit type. I don't know if that even describes any system GDB still compiles on. > I agree the code ends up being verbose, but it's pretty > straightforward and robust. Would you be ok with the code going in > the way it is now? Robust is not the word I'd use, since it'll silently drop bits if the section is in fact monstrously huge. Of course, if you had such a file and tried to open it on a system without a 64-bit type, this seems like the least thing that would go wrong. I've no objection to the current version. -- Daniel Jacobowitz CodeSourcery