From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26864 invoked by alias); 11 Feb 2009 19:18:09 -0000 Received: (qmail 26855 invoked by uid 22791); 11 Feb 2009 19:18:08 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Feb 2009 19:18:03 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 19CCD2A96C3; Wed, 11 Feb 2009 14:18:03 -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 AxVcxRZcwqtp; Wed, 11 Feb 2009 14:18:03 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id D47FD2A95DC; Wed, 11 Feb 2009 14:18:02 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 49EE0E7ACD; Wed, 11 Feb 2009 11:17:59 -0800 (PST) Date: Wed, 11 Feb 2009 19:18:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] Flat DW_TAG_module support (PR fortran/9806) Message-ID: <20090211191759.GB13021@adacore.com> References: <20090207143504.GA28253@host0.dyn.jankratochvil.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090207143504.GA28253@host0.dyn.jankratochvil.net> 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: 2009-02/txt/msg00242.txt.bz2 > 2009-02-07 Jan Kratochvil > > PR fortran/9806 > * dwarf2read.c (scan_partial_symbols (process_die ): New. Just a few minor requests... > gdb/testsuite/ > 2009-02-07 Jan Kratochvil > > PR fortran/9806 > * gdb.fortran/module.exp, gdb.fortran/module.f90: New. This part looks OK to me, although I do have one suggestion. > + case DW_TAG_module: > + /* FIXME: Support the separate Fortran module namespaces. */ > + if (pdi->has_children) > + scan_partial_symbols (pdi->die_child, lowpc, highpc, cu); > + break; To be consistent with the current approach, would you mind putting this code into its own routine (add_partial_module), and then call this routine from here. I know it's a little bit overkill given the current limited implementation, but it'll set things up nicely for when we do want to implement modules support. > + case DW_TAG_module: > + /* FIXME: Support the separate Fortran module namespaces. */ > + if (die->child != NULL) > + { > + struct die_info *child_die = die->child; > + > + while (child_die && child_die->tag) > + { > + process_die (child_die, cu); > + child_die = sibling_die (child_die); > + } > + } Same here: Can we put this in its own subprogram (read_module)? > +gdb_test "print i" "\\$\[0-9\]+ = 42" Here, your expected output is not incorrect. But you can also drop the complex regexp that matches the "$NUM" part of the output if you like: gdb_test "print i" " = 42" This is a common practice in our testsuite. -- Joel