Wrap help options when building help string

When building a help string, it's possible that the resulting options
will go over 80 columns.  This patch changes this code to add line
wrapping where needed.

This can most be seen by looking "help bt" and in particular the
"-frame-info" help text.
This commit is contained in:
Tom Tromey
2024-06-03 10:06:51 -06:00
parent ada6f4701b
commit a03d5b9bf3
2 changed files with 42 additions and 24 deletions

View File

@@ -29,6 +29,9 @@
#include "gdbsupport/intrusive_list.h"
#include "gdbsupport/buildargv.h"
/* The allowed length of a line in a documentation string. */
constexpr int cli_help_line_length = 80;
/* Not a set/show command. Note that some commands which begin with
"set" or "show" might be in this category, if their syntax does
not fall into one of the following categories. */