From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joost van der Sluis <joost@cnoc.nl>
Cc: archer@sourceware.org
Subject: Re: Calculating array length
Date: Mon, 15 Jun 2009 11:57:00 -0000 [thread overview]
Message-ID: <20090615115701.GA12218@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <1244841847.11453.3.camel@wsjoost>
On Fri, 12 Jun 2009 23:24:07 +0200, Joost van der Sluis wrote:
> Sometimes CHECK_TYPEDEF is already called on a type with the wrong
> object_addres set. So I have to clear all this information from the
> type-definition. How can I do that? Making a new copy of the type
> without this information should also be ok.
I would rather to fix the code than to try to clear some wrong information.
object_address_get_data must not be called before check_typedef as then
check_typedef would fail to find the right boundaries and other info.
If object_address_get_data is forgotten to be called before accessing the data
after check_typedef then one should just call object_address_get_data.
I see now that object_address_get_data should be probably just called by
check_typedef. check_typedef was not being used by the VLA patch the time
object_address_get_data was introduced so thanks for the notice, going to
check it more.
The real problem is that there should be a different GDB internal C type on
input to check_typedef than on its output so the compiler would enforce the
GDB developer to call check_typedef exactly at the right time.
Another possibility would be to drop check_typedef and instead make all the
accessors (like TYPE_LOW_BOUND) evaluating the values on each call
(dynamically).
But these are outside of the scope of the VLA patch.
Thanks,
Jan
next prev parent reply other threads:[~2009-06-15 11:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-07 10:23 Joost van der Sluis
2009-06-07 14:48 ` Jan Kratochvil
2009-06-07 16:06 ` Joost van der Sluis
2009-06-07 17:49 ` Jan Kratochvil
2009-06-07 17:59 ` Jan Kratochvil
2009-06-12 21:24 ` Joost van der Sluis
2009-06-15 11:57 ` Jan Kratochvil [this message]
2009-06-15 12:16 ` Jan Kratochvil
2009-06-14 20:30 ` Joost van der Sluis
2009-06-20 22:34 ` Jan Kratochvil
2009-06-22 12:07 ` Joost van der Sluis
2009-06-22 12: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=20090615115701.GA12218@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=archer@sourceware.org \
--cc=joost@cnoc.nl \
/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).