From: "Jim Blandy" <jimb@red-bean.com>
To: "Gaius Mulley" <gaius@glam.ac.uk>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Enhanced language support for Modula-2
Date: Sun, 26 Feb 2006 05:44:00 -0000 [thread overview]
Message-ID: <8f2776cb0602252137q7e716ffaibd7b88eeb0d16e43@mail.gmail.com> (raw)
In-Reply-To: <87wtfjfwmu.fsf@j228-gm.comp.glam.ac.uk>
On 25 Feb 2006 12:31:05 +0000, Gaius Mulley <gaius@glam.ac.uk> wrote:
> I guess the Modula-2 mode can use a different method. Would it be
> allowable for me to extend the
>
> #define TYPE_FLAG_xxx
>
> sequence (currently bits 0..15 are used). So for example:
>
> #define TYPE_FLAG_LANG_CHAR (1 << 16)
>
> and set this flag if we see DW_ATE_signed_char or
> DW_ATE_unsigned_char. Later in the Modula-2 language section this bit
> could be tested and the appropriate action taken. Obviously I'd need
> to set this bit in stabsread.c as well. This would also allow Pascal
> to utilise CHAR rather than see a tiny integer.
If Modula-2 has a genuinely distinct character type, then I think
TYPE_CODE_CHAR is the right type for you to use. It's just that it
isn't for C. So the code in dwarf2read.c needs to choose the type
code for a given DWARF base type based on the language of the
compilation unit that contains the die. I think you'll need to test
cu->language, and set the type code appropriately in each case.
That may sound icky, but given that DWARF has decided to represent
different languages' types with a unified set of die tags, it seems
the reasonable way to go. If, over time, read_base_type gets really
complicated due to this sort of thing, then we could always have some
sort of language-specific hook function. But since GDB uses the same
approach to types that Dwarf does --- a unified set of type codes used
by all the languages --- we only really have to attend to the cases
where GDB's mappings are different from DWARF's, so I think it should
be okay for now.
next prev parent reply other threads:[~2006-02-26 5:37 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-15 23:15 Gaius Mulley
2006-02-16 0:20 ` Jim Blandy
2006-02-16 11:06 ` Gaius Mulley
2006-02-20 15:05 ` Daniel Jacobowitz
2006-02-20 21:42 ` Jim Blandy
2006-02-21 11:06 ` Gaius Mulley
2006-02-21 19:01 ` Jim Blandy
2006-02-25 13:17 ` Gaius Mulley
2006-02-26 5:44 ` Jim Blandy [this message]
2006-02-26 5:46 ` Daniel Jacobowitz
2006-02-28 5:37 ` Gaius Mulley
2006-02-28 13:53 ` Jim Blandy
2006-03-02 8:57 ` Gaius Mulley
2006-03-02 17:27 ` Jim Blandy
2006-02-21 19:21 ` Jim Blandy
2006-02-21 20:51 ` Eli Zaretskii
2006-02-21 20:50 ` Eli Zaretskii
2006-02-21 20:57 ` Mark Kettenis
2006-02-22 5:33 ` Eli Zaretskii
2006-02-22 18:36 ` Eli Zaretskii
2006-02-16 4:34 ` Eli Zaretskii
2006-02-16 11:11 ` Gaius Mulley
2006-04-20 13:23 Gaius Mulley
2006-04-20 14:35 ` Eli Zaretskii
2006-04-20 18:47 ` Mark Kettenis
2006-04-20 18:54 ` Eli Zaretskii
2006-05-04 7:17 ` Gaius Mulley
2006-05-04 15:37 ` Daniel Jacobowitz
2006-05-04 18:01 ` Jim Blandy
2006-05-08 14:09 ` Gaius Mulley
2006-05-08 17:47 ` Jim Blandy
2006-05-09 22:57 ` Gaius Mulley
2006-05-10 21:45 ` Jim Blandy
2006-05-11 12:37 ` Gaius Mulley
2006-05-12 18:18 ` Joel Brobecker
2006-05-12 18:27 ` Jim Blandy
2006-05-13 13:31 ` Gaius Mulley
2006-05-13 11:02 ` Gaius Mulley
2006-05-08 21:03 ` Eli Zaretskii
2006-05-04 16:12 ` Eli Zaretskii
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=8f2776cb0602252137q7e716ffaibd7b88eeb0d16e43@mail.gmail.com \
--to=jimb@red-bean.com \
--cc=gaius@glam.ac.uk \
--cc=gdb-patches@sources.redhat.com \
/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