Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/python] Handle error in gdbpy_initialize_gdb_readline
Date: Fri, 07 Aug 2026 13:26:57 -0600	[thread overview]
Message-ID: <87pkztybni.fsf@tromey.com> (raw)
In-Reply-To: <20260807164842.3619235-1-tdevries@suse.de> (Tom de Vries's message of "Fri, 7 Aug 2026 18:48:42 +0200")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom>    if (eval_python_command (code, Py_file_input) == 0)
Tom>      PyOS_ReadlineFunctionPointer = gdbpy_readline_wrapper;
Tom> +  else
Tom> +    {
Tom> +      if (PyErr_Occurred ())
Tom> +	{
Tom> +	  PyErr_Print ();
Tom> +	  PyErr_Clear ();

It's a bit more normal in the python layer to use gdbpy_print_stack,
since that respects user error-reporting settings.

Tom> +      warning (_("Disabling import readline failed, python-interactive"
Tom> +		 " command disabled"));

CLI command names in output are normally double-quoted and displayed
using command_style.

thanks,
Tom

  reply	other threads:[~2026-08-07 19:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 16:48 Tom de Vries
2026-08-07 19:26 ` Tom Tromey [this message]
2026-08-07 22:36   ` Tom de Vries

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=87pkztybni.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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