Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jonas Maebe <jonas.maebe@elis.ugent.be>
Cc: FPC Core Developer List <core@freepascal.org>,
	       "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>,
	       gdb-patches@sourceware.org
Subject: Re: [Core] [RFC] dwarf debug information: Handle Free Pascal virtual table indexes
Date: Fri, 14 May 2010 17:28:00 -0000	[thread overview]
Message-ID: <m3zl02qww9.fsf@fleche.redhat.com> (raw)
In-Reply-To: <AC70CDDE-FA76-4395-AAF8-601EAA4A88E4@elis.ugent.be> (Jonas	Maebe's message of "Thu, 13 May 2010 23:14:04 +0200")

>>>>> "Jonas" == Jonas Maebe <jonas.maebe@elis.ugent.be> writes:

>> So I guess we can safely try to reuse the existing C++ branch in the
>> DWARF reader for the Pascal case.

Jonas> I agree. And I assume it is currently not used because we don't
Jonas> generate an AT_containing_type attribute (because that's used by
Jonas> GDB's DWARF parser to initialise fnp->fcontext). That should not
Jonas> be too difficult to add, but I'm not sure what it's doing in the
Jonas> debug info as part of a TAG_subprogram.

I misread the code a little yesterday -- I didn't notice that the
existing code is stripping an initial DW_OP_ref.  So I think if FPC
emitted correct DWARF, gdb would already handle it.  Well, maybe
... there is a "fnp->voffset += 2" in there that I don't understand the
rationale for.

The AT_containing_type stuff seems to be some historical relic in gcc.
The reason it is important now is that it is the way gdb recognizes that
it should use a gcc-specific hack.

Jonas> As far as I can see, it's only defined by the DWARF3 spec for
Jonas> DW_TAG_ptr_to_member_type entries (which are not supported by
Jonas> GDB, and I'm not entirely sure about what their purpose is).

They are for the C++ pointer-to-member feature.  GDB doesn't implement
these because GCC doesn't emit them, preferring instead another
GCC-specific hack :-(.  There is a PR in GCC bugzilla for this too.

Tom


      reply	other threads:[~2010-05-14 16:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <23651.5388860882$1273672053@news.gmane.org>
2010-05-12 21:24 ` Tom Tromey
2010-05-13  7:59   ` Pierre Muller
     [not found]   ` <11064.3996195451$1273708856@news.gmane.org>
2010-05-13 17:29     ` Tom Tromey
2010-05-13 18:12       ` [Core] " Jonas Maebe
2010-05-13 21:13         ` Tom Tromey
2010-05-13 21:25           ` Jonas Maebe
2010-05-14 17:28             ` Tom Tromey [this message]

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=m3zl02qww9.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=core@freepascal.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jonas.maebe@elis.ugent.be \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /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