From: Tom Tromey <tromey@redhat.com>
To: Daniel Gutson <daniel.gutson@tallertechnologies.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Add autocompletion for convenience vars in print and set
Date: Tue, 20 May 2014 16:36:00 -0000 [thread overview]
Message-ID: <87tx8ks8yv.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CAF5HaEUYNe60EPby2Mxbgxy68unMpoxYr8BnQAQNUV_z04wVsw@mail.gmail.com> (Daniel Gutson's message of "Tue, 20 May 2014 12:51:46 -0300")
>>>>> "Daniel" == Daniel Gutson <daniel.gutson@tallertechnologies.com> writes:
Daniel> I could not find any testsuite where to add tests for this; if
Daniel> there are, please let me know.
See testsuite/gdb.base/completion.exp
Daniel> exp : VARIABLE
Daniel> {
Daniel> - write_dollar_variable (pstate, $1);
Daniel> + if (!parse_completion)
Daniel> + write_dollar_variable (pstate, $1);
Daniel> }
I think this isn't correct. I think it won't work if you try to
complete on a field name where the "LHS" has a convenience variable.
That is something like:
set $var = (struct x *) malloc (...)
complete print $var.somethin
Instead I think you need a new production, like "exp : VARIABLE COMPLETE".
Daniel> + if (p != NULL && *p == '$')
Daniel> + return complete_internalvar (p + 1);
I'm not sure this is correct either, but offhand I don't know.
Should it not look at "word"?
Daniel> + VEC (char_ptr) * ret = current_language->la_make_symbol_completion_list (
Daniel> + text, word,
Daniel> + TYPE_CODE_UNDEF);
No space before "ret".
The line breaks look odd, I would break before the "=" and not after the "(".
thanks,
Tom
next prev parent reply other threads:[~2014-05-20 16:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 15:51 Daniel Gutson
2014-05-20 15:52 ` Daniel Gutson
2014-05-20 16:36 ` Tom Tromey [this message]
2014-05-22 15:17 ` Daniel Gutson
2014-05-27 15:18 ` Daniel Gutson
2014-05-27 16:46 ` Andrew Burgess
2014-05-27 20:24 ` Daniel Gutson
2016-02-25 21:23 ` Daniel Gutson
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=87tx8ks8yv.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=daniel.gutson@tallertechnologies.com \
--cc=gdb-patches@sourceware.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