From bf0a21777530ff364a7f30a79e1fd3616e5a6c7e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 31 May 2024 10:13:17 -0600 Subject: [PATCH] Call gdbpy_fix_doc_string_indentation for function help If you invoke "help function _caller_is", you'll see that the help text is indented strangely. The fix for this is to add a call to gdbpy_fix_doc_string_indentation in the appropriate spot, as is already done for Python commands and parameters. --- gdb/python/py-function.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/python/py-function.c b/gdb/python/py-function.c index 58ae0d058e2..2b65d8bc87d 100644 --- a/gdb/python/py-function.c +++ b/gdb/python/py-function.c @@ -120,6 +120,8 @@ fnpy_init (PyObject *self, PyObject *args, PyObject *kwds) docstring = python_string_to_host_string (ds_obj.get ()); if (docstring == NULL) return -1; + docstring + = gdbpy_fix_doc_string_indentation (std::move (docstring)); } } }