From: Tom Tromey <tromey@redhat.com>
To: dje@google.com (Doug Evans)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] decode_line_spec_* cleanup
Date: Thu, 28 Jun 2012 21:01:00 -0000 [thread overview]
Message-ID: <87fw9f40e2.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20120628195537.3B6D01E13A1@ruffy2.mtv.corp.google.com> (Doug Evans's message of "Thu, 28 Jun 2012 12:55:37 -0700 (PDT)")
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> First: Yes, I know these function names are really long :-).
Yeah. I think they make the code harder to read.
Doug> I'm happy to change them, but decode_line_spec and decode_line_spec_1
Doug> just don't work for me.
I think "spec" and "as_default" don't add much value. Then you would
have decode_line_with_current_source and
decode_line_with_last_displayed. That is better but still on the long
side. Perhaps "with" is also not needed.
Another approach would be to separate the defaults-getting from
decode_line in general.
Doug> +struct symtabs_and_lines
Doug> +decode_line_spec_with_current_source_as_default (char *string, int flags)
Doug> +{
[...]
Doug> + /* We use whatever is set as the current source line. We do not try
Doug> + and get a default or it will recursively call us! */
Doug> + cursal = get_current_source_symtab_and_line ();
This seems a little weird since this is already the default.
In a way this makes the "with_current_source_as_default" more confusing,
since that does not actually name the difference between this function
and decode_line_1.
Tom
next prev parent reply other threads:[~2012-06-28 21:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-28 19:55 Doug Evans
2012-06-28 21:01 ` Tom Tromey [this message]
2012-06-28 21:10 ` Doug Evans
2012-06-29 22:49 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=87fw9f40e2.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=dje@google.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