From: Tom Tromey <tromey@redhat.com>
To: dje@google.com (Doug Evans)
Cc: gdb-patches@sourceware.org, iant@google.com,
Keith Seitz <keiths@redhat.com>
Subject: Re: [RFC] Initial pass at supporting the Go language
Date: Mon, 02 Jan 2012 19:13:00 -0000 [thread overview]
Message-ID: <m3vcotncjg.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20111228210206.B6B762461C9@ruffy.mtv.corp.google.com> (Doug Evans's message of "Wed, 28 Dec 2011 13:02:06 -0800 (PST)")
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> This patch is a first pass at supporting the Go language.
Doug> There's still lots to do, but this is a start.
Nice work.
Doug> I have a few things I'd like to clean up before checking in
Doug> but I don't plan on removing all FIXMEs.
Doug> And I still need to document Go specific features.
A few notes below.
Doug> +/* Go objects should be embedded in a DW_TAG_module DIE,
Doug> + and it's not clear if/how imported objects will appear.
Doug> + To keep Go support simple until that's worked out,
Doug> + go back through what we've read and create something usable.
Doug> + We could do this while processing each DIE, and feels kinda cleaner,
Doug> + but that way is more invasive.
Doug> + This is to, for example, allow the user to type "p var" or "b main"
Doug> + without having to specify the package name, and allow lookups
Doug> + of module.object to work in contexts that use the expression
Doug> + parser. */
I think this over-exposes some buildsym details to dwarf2read.
How much more invasive is the alternative?
Doug> + And if not, it should be clearly documented why not.
Doug> + OTOH, why are we demangling at all here?
Doug> + new_symbol_full assumes we return the mangled name.
Doug> + I realize things are changing in this area, I just forget how. */
Doug> + if (cu->language == language_go)
Doug> + {
Doug> +#if 0
Doug> + demangled = cu->language_defn->la_demangle (mangled, 0);
Doug> +#else
Doug> + /* This is a lie, but we already lie to the caller new_symbol_full.
Doug> + This just undoes that lie until things are cleaned up. */
Doug> + demangled = NULL;
Doug> +#endif
I've CC'd Keith to see if he can clear this up.
Doug> +/* FIXME: IWBN to use c-exp.y's parse_number if we could. */
You could export it as c_parse_number or something like that, I suppose.
Doug> + FIXME: Hacky, but until things solidify it's not worth much more. */
I think you could safely remove this FIXME.
Doug> + /*{"->", RIGHT_ARROW, BINOP_END}, Doesn't exist in Go. */
Doug> +#if 0 /* -> doesn't exist in Go. */
Doug> + if (in_parse_field && tokentab2[i].token == RIGHT_ARROW)
Doug> + last_was_structop = 1;
Doug> +#endif
I think you could zap this dead code.
Doug> + /* TODO(dje): The encapsulation of what a pointer is belongs in value.c.
Doug> + I.e. If there's going to be unpack_pointer, there should be
Doug> + unpack_value_field_as_pointer. Do this until we can get
Doug> + unpack_value_field_as_pointer. */
Doug> + LONGEST addr;
Eventually I want us to get rid of val_print entirely and only have
value_print. Then this won't be a problem; since you will just use the
value API to access fields.
Doug> + /* TODO(dje): Perhaps we should pass "UTF8" for ENCODING.
Doug> + The target encoding is a global switch.
Doug> + Either choice is problematic. */
Doug> + i = val_print_string (elt_type, NULL, addr, length, stream, options);
What is the problem here?
Tom
next prev parent reply other threads:[~2012-01-02 19:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-28 21:13 Doug Evans
2011-12-29 3:50 ` Eli Zaretskii
2011-12-29 5:17 ` Joel Brobecker
2012-01-03 17:38 ` Doug Evans
2012-01-03 17:52 ` Joel Brobecker
2012-01-25 20:00 ` Doug Evans
2012-01-02 19:13 ` Tom Tromey [this message]
2012-01-03 3:20 ` Joel Brobecker
2012-01-03 18:12 ` Doug Evans
2012-01-03 19:50 ` Tom Tromey
2012-01-03 20:02 ` Keith Seitz
2015-01-20 17:34 ` golang compiler (6g) testsuite board file [Re: [RFC] Initial pass at supporting the Go language] Jan Kratochvil
2015-01-21 17:59 ` Doug Evans
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=m3vcotncjg.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=iant@google.com \
--cc=keiths@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