Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Flat DW_TAG_module support (PR fortran/9806)
Date: Wed, 11 Feb 2009 19:18:00 -0000	[thread overview]
Message-ID: <20090211191759.GB13021@adacore.com> (raw)
In-Reply-To: <20090207143504.GA28253@host0.dyn.jankratochvil.net>

> 2009-02-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	PR fortran/9806
> 	* dwarf2read.c (scan_partial_symbols <DW_TAG_module)
> 	(process_die <DW_TAG_module>): New.

Just a few minor requests...

> gdb/testsuite/
> 2009-02-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	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


  reply	other threads:[~2009-02-11 19:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-07 14:35 Jan Kratochvil
2009-02-11 19:18 ` Joel Brobecker [this message]
2009-02-11 20:15   ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090211191759.GB13021@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox