This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC] dwarf debug information: Handle Free Pascal virtual table indexes
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <tromey at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>, "'FPC Core Developer List'" <core at freepascal dot org>
- Date: Thu, 13 May 2010 02:00:45 +0200
- Subject: RE: [RFC] dwarf debug information: Handle Free Pascal virtual table indexes
- References: <23651.5388860882$1273672053@news.gmane.org> <m3zl04zyrz.fsf@fleche.redhat.com>
Tom,
you have to take into account that
I know about nothing about DWARF :(
> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé?: Wednesday, May 12, 2010 9:49 PM
> À?: Pierre Muller
> Cc?: gdb-patches@sourceware.org
> Objet?: Re: [RFC] dwarf debug information: Handle Free Pascal virtual
> table indexes
>
> >>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
> writes:
>
> Pierre> DW_AT_vtable_elem_location attribute a BLOCK consisting of
> Pierre> a DW_OP_constu marker followed by a unsigned_leb128 value
> Pierre> to indicate the offset within the virtual table of a virtual
> Pierre> function.
>
> By my reading, this is incorrect DWARF. Or is there more to the
> expression than that?
What do you exactly mean by expression here?
> If it is not possible to fix the compiler, then I would propose making
> this conditional on language_pascal.
>
> If there is more to the expression, then maybe decode_locdesc already
> handles it and we just need to update the gate in dwarf2_add_member_fn.
I could indeed replace the call read_unsigned_leb128
by a call to decode_locdesc using DW_BLK(attr) but this
is still different from the other call to decode_locdesc
earlier in the same function, because context is not set in Free Pascal
case.
It is possible probably to fix the compile once
I understand clearly what is wrong...
But anyhow, this patch would allow released versions to be
read correctly.
Pierre