Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch][python] Fix python/14513
Date: Wed, 02 Oct 2013 09:30:00 -0000	[thread overview]
Message-ID: <524BE7B3.3030805@redhat.com> (raw)
In-Reply-To: <8738p1uam6.fsf@fleche.redhat.com>

On 18/09/13 21:40, Tom Tromey wrote:
>>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
> 
> Phil> If you look at the testsuite for py-param, they do have this option.
> 
> Oh right!  I forgot about that, sorry.
> 
> Phil> What do you think?
> 
> Ugh.  Well, while we don't actually promise to print anything, it seems
> weird to require a string result just to throw it away.  How about we
> remove the "else" clause and not print anything at all if the
> get_set_string method is not implemented?  This ought to clean up most
> uses.

I think you mean the else clause in the py-param.c code?  If so, we
cannot remove it as it preserves < 7.3 API:

  else
    {
      /* We have to preserve the existing < GDB 7.3 API.  If a
	 callback function does not exist, then attempt to read the
	 set_doc attribute.  */
      set_doc_string  = get_doc_string (obj, set_doc_cst);
    }

I am not sure what the resolution is here.  At some point we have to
decide whether we have anything valid to print.  We can hoist the
fprint into both of these branches, but even in the "else" clause we
have to check if we actually have anything as the fprint adds a
newline to the set documentation:

fprintf_filtered (gdb_stdout, "%s\n", set_doc_string);

What are your thoughts on this?

Cheers,

Phil


  reply	other threads:[~2013-10-02  9:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 13:17 Phil Muldoon
2013-09-18 20:26 ` Tom Tromey
2013-09-18 20:34   ` Phil Muldoon
2013-09-18 20:40     ` Tom Tromey
2013-10-02  9:30       ` Phil Muldoon [this message]
2013-10-21 21:58         ` Tom Tromey
2013-10-30  9:01           ` Phil Muldoon
2013-11-08  3:18             ` Tom Tromey

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=524BE7B3.3030805@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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