Re: [PATCH] [gdb/python] Handle error in gdbpy_initialize_gdb_readline
Tom de Vries <[email protected]>
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
On 8/7/26 9:26 PM, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries <[email protected]> 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. Hi Tom, thanks for the review. I've fixed these two issues in a v2 ( https://sourceware.org/pipermail/gdb-patches/2026-August/229270.html ). Thanks, - Tom