From: Tom Tromey <tromey@redhat.com>
To: Joost van der Sluis <joost@cnoc.nl>
Cc: gdb@sourceware.org, Pierre Free Pascal <pierre@freepascal.org>
Subject: Re: Patch for allowing calling pascal-methods (fpc)
Date: Wed, 05 Oct 2011 18:14:00 -0000 [thread overview]
Message-ID: <m3aa9fjog1.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1316548459.13994.7.camel@feddie.cnoc.lan> (Joost van der Sluis's message of "Tue, 20 Sep 2011 21:54:19 +0200")
>>>>> "Joost" == Joost van der Sluis <joost@cnoc.nl> writes:
Joost> More digging convinced me that the actual problem is in
Joost> lookup_struct_elt_type.
Could you explain why?
I am not sure that applying this patch is ok. It is generic code, so
this change may negatively affect other languages -- it is hard to be
sure without replicating your analysis.
Perhaps some other Pascal-specific fix would be more obviously safe.
Do you have copyright papers in place? If not, contact me off-list to
get started.
Joost> Attached is a patch which makes it possible for gdb to call methods and
Joost> print the result. A testsuite-run did not show any regressions. The
Joost> patch also contains a test with an example.
Patches should go to gdb-patches and have a ChangeLog entry.
See gdb/CONTRIBUTE.
Joost> + if (t_method_name && (strcmp_iw (t_method_name, name) == 0))
Joost> + {
Joost> + if (TYPE_FN_FIELDLIST_LENGTH(type, i) == 1)
Joost> + {
Joost> + return TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (type, i), 0);
Joost> + }
Joost> + else if (!(noerr))
Joost> + error (_("Could not determine which %s has to be used."), name);
This seems iffy for C++.
Tom
next prev parent reply other threads:[~2011-10-05 18:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 19:54 Joost van der Sluis
2011-10-05 18:14 ` Tom Tromey [this message]
2011-10-12 7:46 ` Joost van der Sluis
2011-10-19 20:06 ` Tom Tromey
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=m3aa9fjog1.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb@sourceware.org \
--cc=joost@cnoc.nl \
--cc=pierre@freepascal.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).