From: Tom Tromey Date: Fri, 31 May 2024 16:13:17 +0000 (-0600) Subject: Call gdbpy_fix_doc_string_indentation for function help X-Git-Tag: gdb-16-branchpoint~477 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf0a21777530ff364a7f30a79e1fd3616e5a6c7e;p=thirdparty%2Fbinutils-gdb.git 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. --- 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)); } } }