Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: dje@google.com (Doug Evans)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] new python features: gdb.GdbError, gdb.string_to_argv
Date: Sun, 23 May 2010 18:55:00 -0000	[thread overview]
Message-ID: <83pr0mo76x.fsf@gnu.org> (raw)
In-Reply-To: <20100522165438.5D5A48439A@ruffy.mtv.corp.google.com>

> Date: Sat, 22 May 2010 09:54:38 -0700 (PDT)
> From: dje@google.com (Doug Evans)
> 
> While writing some gdb commands in python I needed to be able to
> flag users errors without causing a traceback to be printed,
> and I wanted a utility to translate the argument string into an argv.

Thanks.

> +When implementing @value{GDBN} commands in Python via @code{gdb.Command},
> +it is useful to be able to throw an exception that doesn't cause a
> +traceback to be printed.  For example, the user may have invoked the
> +command incorrectly.  Use the @code{gdb.GdbError} exception
> +to handle this case.  Example:

I suggest a @findex entry about gdb.GdbError here.

> +To break @var{argument} up into an argv-like string use
> +@code{gdb.string_to_argv}.
> +Arguments are separated by spaces and may be quoted.

and a @findex entry here about gdb.string_to_argv.

> --- NEWS	30 Apr 2010 07:04:52 -0000	1.379
> +++ NEWS	22 May 2010 16:51:50 -0000
> @@ -87,7 +87,9 @@ is now deprecated.
>     set/show in the CLI.
>  
>  ** New functions gdb.target_charset, gdb.target_wide_charset,
> -   gdb.progspaces, and gdb.current_progspace.
> +   gdb.progspaces, gdb.current_progspace, and gdb.string_to_argv.
> +
> +** New exception gdb.GdbError.

This part is okay.

Thanks.


      parent reply	other threads:[~2010-05-23 17:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-22 17:36 Doug Evans
2010-05-22 19:00 ` Tom Tromey
2010-05-22 21:19   ` Doug Evans
2010-05-24 16:27     ` Tom Tromey
2010-05-24 18:04       ` Doug Evans
2010-05-24 22:57         ` Tom Tromey
2010-05-25  3:05           ` Doug Evans
2010-05-23 18:55 ` Eli Zaretskii [this message]

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=83pr0mo76x.fsf@gnu.org \
    --to=eliz@gnu.org \
    --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