Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: <hebisch@math.uni.wroc.pl>
Cc: <gdb-patches@sources.redhat.com>
Subject: Re: PATCH: Read Dwarf2 info from Pascal
Date: Thu, 12 May 2005 13:44:00 -0000	[thread overview]
Message-ID: <52093.204.151.174.7.1115905044.squirrel@websd.u-strasbg.fr> (raw)
In-Reply-To: <E1DWDhl-0003ag-00@hera.math.uni.wroc.pl>


Waldek Hebisch said:
> The patch below adds Pascal support to `dwarf2read.c':
>  - reading Dwarf2 info about sets
>  - recognizing the language as Pascal
>  - allowing namespace declaration (modules) for Pascal
>
> Without the patch gdb can not be used with new versions of Gnu Pascal
> (at least in default mode): gpc based of gcc-3.x defaults to Dwarf2
> debug info (and gdb stops working once a set is found).

  The patch seems fine to me,
but I have no DWARF experience at all,
thus I am just supposing that the code is good.
This patch needs to be approved by the dwarf maintainer,
not by me.

> The patch is against gdb-6.3, but applies to cvs version (from May 7): I
> have tested it on Debian Woody and the patch coused no new test failures
> (however, unpatched cvs version had 55 unexpected test failures).

  What test are you talking about?
I think that there are no pascal specific tests in
the gdb testsuite (unless I missed much more
that what I thought).
  Are you talking about a GPC testsuite?

> The patch is an updated version of the patch I attached to PR 1477 (BTW,
> is anybody looking at Pascal problems?).

  I am still officially maintainer of
the pascal language support,
but I didn't have much time the last year.
I just read the subject of the gdb mailing lists,
thattís why I answer to your email.

  I did not look at the problem database for ages...


> If OK please apply, I have no CVS write access. The patch is small, so I
> hope it can go in without legal problems, but if needed I will
> fill the copyright assignment to FSF.

  I don't know about this issue, maybe Andrew or Eli can answer this?

> ChangeLog:
>
> 2005-05-04  Waldek Hebisch (hebisch@math.uni.wroc.pl)
>
> 	* dwarf2read.c: Add Pascal support.

This should probably be more detailed...

> --- gdb-6.3.orig/gdb/dwarf2read.c	2004-10-16 02:41:00.000000000 +0200
> +++ gdb-6.3/gdb/dwarf2read.c	2005-05-06 20:28:41.000000000 +0200
> @@ -913,6 +913,8 @@
>
>  static void read_enumeration_type (struct die_info *, struct dwarf2_cu
> *);
>
> +static void read_set_type (struct die_info *, struct dwarf2_cu *); +
>  static void process_enumeration_scope (struct die_info *, struct
> dwarf2_cu *);
>
>  static struct type *dwarf_base_type (int, int, struct dwarf2_cu *);
> @@ -2648,6 +2650,9 @@
>        read_enumeration_type (die, cu);
>        process_enumeration_scope (die, cu);
>        break;
> +    case DW_TAG_set_type:
> +      read_set_type (die, cu);
> +      break;
>
>      /* FIXME drow/2004-03-14: These initialize die->type, but do not
> create
>         a symbol or process any children.  Therefore it doesn't do
> anything
> @@ -4009,6 +4014,24 @@
>    return new_prefix;
>  }
>
> +static void
> +read_set_type (struct die_info * die, struct dwarf2_cu *cu)
> +{
> +  struct type *domain_type;
> +
> +  /* Return if we've already decoded this type. */
> +  if (die->type)
> +    {
> +      return;
> +    }
> +
> +  domain_type = die_type (die, cu);
> +
> +  die->type = create_set_type (NULL, domain_type);
> +
> +}
> +
> +
>  /* Given a pointer to a die which begins an enumeration, process all
>     the dies that define the members of the enumeration, and create the
> symbol for the enumeration type.
> @@ -6096,9 +6119,11 @@
>      case DW_LANG_Ada95:
>        cu->language = language_ada;
>        break;
> +    case DW_LANG_Pascal83:
> +      cu->language = language_pascal;
> +      break;
>      case DW_LANG_Cobol74:
>      case DW_LANG_Cobol85:
> -    case DW_LANG_Pascal83:
>      case DW_LANG_Modula2:
>      default:
>        cu->language = language_minimal;
> @@ -6861,6 +6886,7 @@
>  	case DW_TAG_structure_type:
>  	case DW_TAG_union_type:
>  	case DW_TAG_enumeration_type:
> +        case DW_TAG_set_type:
>  	  SYMBOL_CLASS (sym) = LOC_TYPEDEF;
>  	  SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN;
>
> @@ -7182,6 +7208,9 @@
>      case DW_TAG_enumeration_type:
>        read_enumeration_type (die, cu);
>        break;
> +    case DW_TAG_set_type:
> +      read_set_type (die, cu);
> +      break;
>      case DW_TAG_subprogram:
>      case DW_TAG_subroutine_type:
>        read_subroutine_type (die, cu);
> @@ -7239,7 +7268,8 @@
>    struct die_info *parent;
>
>    if (cu->language != language_cplus
> -      && cu->language != language_java)
> +      && cu->language != language_java
> +      && cu->language != language_pascal)
>      return NULL;
>
>    parent = die->parent;
>
>
> --
>                               Waldek Hebisch
> hebisch@math.uni.wroc.pl


Pierre Muller

on stay at UMR 166
Complex Fluids Laboratory
Rhodia Research Center, Cranbury, New Jersey
mailto:muller@ics.u-strasbg.fr
Phone : 1-609-860-4757



  reply	other threads:[~2005-05-12 13:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-12 13:37 Waldek Hebisch
2005-05-12 13:44 ` Pierre Muller [this message]
2005-05-12 14:37   ` Waldek Hebisch
2005-05-18  2:23 ` Daniel Jacobowitz

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=52093.204.151.174.7.1115905044.squirrel@websd.u-strasbg.fr \
    --to=muller@ics.u-strasbg.fr \
    --cc=gdb-patches@sources.redhat.com \
    --cc=hebisch@math.uni.wroc.pl \
    /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