]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Call gdbpy_fix_doc_string_indentation for function help
authorTom Tromey <tromey@adacore.com>
Fri, 31 May 2024 16:13:17 +0000 (10:13 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 11 Nov 2024 14:44:27 +0000 (07:44 -0700)
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

index 58ae0d058e2bbb43239da770a4efbcddb4fa6e8f..2b65d8bc87d634672d20370f6288eb4a5f112d57 100644 (file)
@@ -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));
            }
        }
     }