From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by sourceware.org (Postfix) with ESMTPS id 2406F38A90BB for ; Mon, 3 Jun 2024 17:57:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2406F38A90BB Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2406F38A90BB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d34 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717437461; cv=none; b=SbWchs3sCGcjtXz5jbC1g9zUpRvHqrNdcxTh73ZeYTY5sgcV6Mlr6fx/64FRtuosAoPfx6JH5Rl1PBfZJHD2tytmPH60Lfdryv2ijaRZDw0Q5hRnsncgacZbpaEl9LdfRSPNdC7I6TA6FFfnYbBDO4ICInPtQh2qzA0/yP9Pq5E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717437461; c=relaxed/simple; bh=sMlWZxmXuPYWhwTYjsfHCicEkKHYowqfC/rn7wnJErE=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=Ya+sVSAy1T157afTpf8wwD3SwR7P7Xe64/HRyQyAD3SBq2NLVtAuZ7JejfGBpXndZzGZaVN85zaKNonQIV2/ATZqFOjC/FzziB8TqklpLs2EPjdAZLGR0D98oaSlcMtu4N8gi/NBFDRjntCxYNLcxTIZrfqLtEE3DbI2Er44neU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd34.google.com with SMTP id ca18e2360f4ac-7eb12b2bf78so81814539f.0 for ; Mon, 03 Jun 2024 10:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1717437457; x=1718042257; darn=sourceware.org; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0j2jDAVd3Csoyrg5RiO3IRN8MB5Re2WD5H5jqsEt9KM=; b=XV7OOYz4lo4CgdsuYcLUoPnQe/MP+XWbq8+SjVhCPo4lrHKq0BtnqBHWBfw6kwpdwe EffnWYqKVs1cbLafvGcrlQddi9fAXmWceAhXkbFTUkoUFYRvYkl8bqOGcKyMoxmhG9m5 jBJGQp72Vg7MnGx6BUknzGliDzGR03DM7AT6hvmlFYeipn5d9QT9mAo2l2UBfJMGulR5 T0rNJiOHhfq4KsLupI2Yop8C9bejl5dNI7zAcNkToyEZEaQGMG3NRV4h6tbJoYA9vjUZ 4J+9cY0K50fW9vCJ/OUbIt/SpPf9V2U9ztP95R++Tndj66CmVzs+nQxNZZWnwbUCSVYg sCRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717437457; x=1718042257; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0j2jDAVd3Csoyrg5RiO3IRN8MB5Re2WD5H5jqsEt9KM=; b=N7hiPjbZSBbLpR4SwxavfyKlFtEvbYVcymdE0axO+cr0n5lu4p7pVoTjbXdY2D5bAY /mxy51OC04g53gws0/fYOB/9g5ancI5dUOaOqEx0s6x2iAYGXDsb/E6w+1KlNWVSgke4 iwz0z9EXD5GDPYznNhWdGtmASEAj9SbBWmisyJZsc2D/c0dVrBsu8uZvTwOLl1xdFfNQ 5iMn74CJCJiN6tS3n0Q/G9qgheRO0yYVGFXDerKVJodVZu25N63ZXEHDJDGhHEBTj9lK tqKGnvCDX9kYsTi2KgK6jq54Lj3dNJ6659ODdUemn3xpGIdpdNmu9cOKLvr8g3EJy5Ts lJ4w== X-Gm-Message-State: AOJu0YyMyLzWwg7vhcWefBDC7MpcuPlUiAHqrllLqPhK3HFWjySo8Kc+ twBnZ1dIpNd0QkuAjOWM0AbQmlRYiOW9OtIqmQVlP4jOVI2y3ozEhmrix6+byDDtX4H3Tv13rGE = X-Google-Smtp-Source: AGHT+IFo8AknXMOIL9+CasBdHJO30TpgtM/z75wiCLJuWnIEYYRhybJn1sNEfMqxpDPJUrmXJbfUeA== X-Received: by 2002:a05:6602:3425:b0:7e6:f230:4092 with SMTP id ca18e2360f4ac-7eaffeffdeamr1042996139f.15.1717437457053; Mon, 03 Jun 2024 10:57:37 -0700 (PDT) Received: from localhost.localdomain (75-166-134-4.hlrn.qwest.net. [75.166.134.4]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b4881d5d4dsm2084903173.64.2024.06.03.10.57.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 10:57:36 -0700 (PDT) From: Tom Tromey Date: Mon, 03 Jun 2024 11:57:29 -0600 Subject: [PATCH 2/4] Wrap help strings at 80 columns MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240603-doc-string-cols-v1-2-ad67124ba872@adacore.com> References: <20240603-doc-string-cols-v1-0-ad67124ba872@adacore.com> In-Reply-To: <20240603-doc-string-cols-v1-0-ad67124ba872@adacore.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.13.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This patch ensures that all ordinary help strings are wrapped at 80 columns. For the most part this consists of changing code like this (note the embedded \n and the trailing backslash without a newline): -Manage the space-separated list of debuginfod server URLs that GDB will query \ -when missing debuginfo, executables or source files.\nThe default value is \ -copied from the DEBUGINFOD_URLS environment variable."), ... to end each line with \n\, like: +Manage the space-separated list of debuginfod server URLs that GDB will\n\ +query when missing debuginfo, executables or source files.\n\ +The default value is copied from the DEBUGINFOD_URLS environment variable."), --- gdb/cli/cli-cmds.c | 3 ++- gdb/cli/cli-utils.c | 8 ++++---- gdb/debuginfod-support.c | 12 ++++++------ gdb/infcmd.c | 6 ++++-- gdb/memattr.c | 3 +-- gdb/psymtab.c | 3 ++- gdb/record-btrace.c | 10 +++++----- gdb/record-full.c | 4 ++-- gdb/record.c | 26 +++++++++++++------------- gdb/regcache-dump.c | 6 +++--- gdb/symfile.c | 4 ++-- gdb/symmisc.c | 3 ++- 12 files changed, 46 insertions(+), 42 deletions(-) diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 3af794cebaf..ca1ed836c53 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -2751,9 +2751,10 @@ as 0 or -1 depending on the setting."), gdb_setting_internal_fn, NULL); add_internal_function ("_gdb_maint_setting_str", _("\ -$_gdb_maint_setting_str - returns the value of a GDB maintenance setting as a string.\n\ +$_gdb_maint_setting_str - returns the value of a GDB maintenance setting.\n\ Usage: $_gdb_maint_setting_str (setting)\n\ \n\ +Like \"$_gdb_maint_setting\", but the return value is always a string.\n\ auto-boolean values are \"off\", \"on\", \"auto\".\n\ boolean values are \"off\", \"on\".\n\ Some integer settings accept an unlimited value, returned\n\ diff --git a/gdb/cli/cli-utils.c b/gdb/cli/cli-utils.c index 45b30842e00..152fee96f8c 100644 --- a/gdb/cli/cli-utils.c +++ b/gdb/cli/cli-utils.c @@ -197,10 +197,10 @@ info_print_args_help (const char *prefix, bool document_n_flag) { return xstrprintf (_("\ -%sIf NAMEREGEXP is provided, only prints the %s whose name\n\ -matches NAMEREGEXP.\n\ -If -t TYPEREGEXP is provided, only prints the %s whose type\n\ -matches TYPEREGEXP. Note that the matching is done with the type\n\ +%sIf NAMEREGEXP is provided, only prints the %s\n\ +whose name matches NAMEREGEXP.\n\ +If -t TYPEREGEXP is provided, only prints the %s\n\ +whose type matches TYPEREGEXP. Note that the matching is done with the type\n\ printed by the 'whatis' command.\n\ By default, the command might produce headers and/or messages indicating\n\ why no %s can be printed.\n\ diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c index 841b6f2078c..8029c87264d 100644 --- a/gdb/debuginfod-support.c +++ b/gdb/debuginfod-support.c @@ -624,9 +624,9 @@ When set to \"ask\", prompt whether to enable or disable debuginfod." ), add_setshow_string_noescape_cmd ("urls", class_run, _("\ Set the list of debuginfod server URLs."), _("\ Show the list of debuginfod server URLs."), _("\ -Manage the space-separated list of debuginfod server URLs that GDB will query \ -when missing debuginfo, executables or source files.\nThe default value is \ -copied from the DEBUGINFOD_URLS environment variable."), +Manage the space-separated list of debuginfod server URLs that GDB will\n\ +query when missing debuginfo, executables or source files.\n\ +The default value is copied from the DEBUGINFOD_URLS environment variable."), set_debuginfod_urls, get_debuginfod_urls, show_debuginfod_urls, @@ -657,9 +657,9 @@ query.\nTo disable, set to zero. Verbose output is displayed by default."), add_setshow_boolean_cmd ("download-sections", class_maintenance, _("\ Set whether debuginfod may download individual ELF/DWARF sections."), _("\ Show whether debuginfod may download individual ELF/DWARF sections."), _("\ -When enabled, debuginfod may attempt to download individual ELF/DWARF \ -sections from debug info files.\nIf disabled, only whole debug info files \ -may be downloaded."), +When enabled, debuginfod may attempt to download individual ELF/DWARF\n\ +sections from debug info files.\n\ +If disabled, only whole debug info files may be downloaded."), maint_set_debuginfod_download_sections, maint_get_debuginfod_download_sections, nullptr, diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 69db665da75..32dfa03a7e3 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -3280,8 +3280,10 @@ frame.")); add_com_alias ("u", until_cmd, class_run, 1); c = add_com ("advance", class_run, advance_command, _("\ -Continue the program up to the given location (same form as args for break \ -command).\n\ +Continue the program up to the given location.\n\ +Usage: advance LOCSPEC\n\ +The argument is a location specification, i.e., the same forms\n\ +accepted by the 'break' command.\n\ Execution will also stop upon exit from the current stack frame.")); set_cmd_completer (c, location_completer); diff --git a/gdb/memattr.c b/gdb/memattr.c index 735068e5a46..669a5486ddf 100644 --- a/gdb/memattr.c +++ b/gdb/memattr.c @@ -595,8 +595,7 @@ void _initialize_mem () { add_com ("mem", class_vars, mem_command, _("\ -Define attributes for memory region or reset memory region handling to " -"target-based.\n\ +Define or reset attributes for memory regions.\n\ Usage: mem auto\n\ mem LOW HIGH [MODE WIDTH CACHE],\n\ where MODE may be rw (read/write), ro (read-only) or wo (write-only),\n\ diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 20822c3101e..e1c0036e227 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -1564,7 +1564,8 @@ Usage: mt print psymbols [-objfile OBJFILE] [-pc ADDRESS] [--] [OUTFILE]\n\ mt print psymbols [-objfile OBJFILE] [-source SOURCE] [--] [OUTFILE]\n\ Entries in the partial symbol table are dumped to file OUTFILE,\n\ or the terminal if OUTFILE is unspecified.\n\ -If ADDRESS is provided, dump only the symbols for the file with code at that address.\n\ +If ADDRESS is provided, dump only the symbols for the file\n\ +with code at that address.\n\ If SOURCE is provided, dump only that file's symbols.\n\ If OBJFILE is provided, dump only that object file's symbols."), &maintenanceprintlist); diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index 9fec6112755..cd498e4301e 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -3134,7 +3134,7 @@ Set what memory accesses are allowed during replay."), _("\ Show what memory accesses are allowed during replay."), _("Default is READ-ONLY.\n\n\ The btrace record target does not trace data.\n\ -The memory therefore corresponds to the live target and not \ +The memory therefore corresponds to the live target and not\n\ to the current replay position.\n\n\ When READ-ONLY, allow accesses to read-only memory during replay.\n\ When READ-WRITE, allow accesses to read-only and read-write memory during \ @@ -3181,10 +3181,10 @@ Show the cpu to be used for trace decode."), &record_btrace_conf.bts.size, _("Set the record/replay bts buffer size."), _("Show the record/replay bts buffer size."), _("\ -When starting recording request a trace buffer of this size. \ -The actual buffer size may differ from the requested size. \ +When starting recording request a trace buffer of this size.\n\ +The actual buffer size may differ from the requested size.\n\ Use \"info record\" to see the actual buffer size.\n\n\ -Bigger buffers allow longer recording but also take more time to process \ +Bigger buffers allow longer recording but also take more time to process\n\ the recorded execution trace.\n\n\ The trace buffer size may not be changed while recording."), NULL, show_record_bts_buffer_size_value, @@ -3203,7 +3203,7 @@ The trace buffer size may not be changed while recording."), NULL, &record_btrace_conf.pt.size, _("Set the record/replay pt buffer size."), _("Show the record/replay pt buffer size."), _("\ -Bigger buffers allow longer recording but also take more time to process \ +Bigger buffers allow longer recording but also take more time to process\n\ the recorded execution.\n\ The actual buffer size may differ from the requested size. Use \"info record\" \ to see the actual buffer size."), NULL, show_record_pt_buffer_size_value, diff --git a/gdb/record-full.c b/gdb/record-full.c index eb62d186fa5..622eb2fc069 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -2977,8 +2977,8 @@ When ON, query if PREC cannot record memory change of next instruction."), _("\ Print a recorded instruction.\n\ If no argument is provided, print the last instruction recorded.\n\ -If a negative argument is given, prints how the nth previous \ +If a negative argument is given, prints how the nth previous\n\ instruction will be undone.\n\ -If a positive argument is given, prints \ +If a positive argument is given, prints\n\ how the nth following instruction will be redone."), &maintenanceprintlist); } diff --git a/gdb/record.c b/gdb/record.c index b25445713fd..b8ef7287365 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -859,38 +859,38 @@ With a /m or /s modifier, source lines are included (if available).\n\ With a /r modifier, raw instructions in hex are included.\n\ With a /f modifier, function names are omitted.\n\ With a /p modifier, current position markers are omitted.\n\ -With no argument, disassembles ten more instructions after the previous \ +With no argument, disassembles ten more instructions after the previous\n\ disassembly.\n\ -\"record instruction-history -\" disassembles ten instructions before a \ +\"record instruction-history -\" disassembles ten instructions before a\n\ previous disassembly.\n\ -One argument specifies an instruction number as shown by 'info record', and \ +One argument specifies an instruction number as shown by 'info record', and\n\ ten instructions are disassembled after that instruction.\n\ -Two arguments with comma between them specify starting and ending instruction \ +Two arguments with comma between them specify starting and ending instruction\n\ numbers to disassemble.\n\ -If the second argument is preceded by '+' or '-', it specifies the distance \ +If the second argument is preceded by '+' or '-', it specifies the distance\n\ from the first argument.\n\ -The number of instructions to disassemble can be defined with \"set record \ -instruction-history-size\"."), +The number of instructions to disassemble can be defined with\n\ +\"set record instruction-history-size\"."), &record_cmdlist); add_cmd ("function-call-history", class_obscure, cmd_record_call_history, _("\ Prints the execution history at function granularity.\n\ -It prints one line for each sequence of instructions that belong to the same \ +It prints one line for each sequence of instructions that belong to the same\n\ function.\n\ Without modifiers, it prints the function name.\n\ With a /l modifier, the source file and line number range is included.\n\ With a /i modifier, the instruction number range is included.\n\ With a /c modifier, the output is indented based on the call stack depth.\n\ With no argument, prints ten more lines after the previous ten-line print.\n\ -\"record function-call-history -\" prints ten lines before a previous ten-line \ +\"record function-call-history -\" prints ten lines before a previous ten-line\n\ print.\n\ -One argument specifies a function number as shown by 'info record', and \ +One argument specifies a function number as shown by 'info record', and\n\ ten lines are printed after that function.\n\ Two arguments with comma between them specify a range of functions to print.\n\ -If the second argument is preceded by '+' or '-', it specifies the distance \ +If the second argument is preceded by '+' or '-', it specifies the distance\n\ from the first argument.\n\ -The number of functions to print can be defined with \"set record \ -function-call-history-size\"."), +The number of functions to print can be defined with\n\ +\"set record function-call-history-size\"."), &record_cmdlist); /* Sync command control variables. */ diff --git a/gdb/regcache-dump.c b/gdb/regcache-dump.c index bc665dc08a6..1badfe2c9f8 100644 --- a/gdb/regcache-dump.c +++ b/gdb/regcache-dump.c @@ -325,8 +325,8 @@ _initialize_regcache_dump () &maintenanceprintlist); add_cmd ("remote-registers", class_maintenance, maintenance_print_remote_registers, _("\ -Print the internal register configuration including remote register number " -"and g/G packets offset.\n\ -Takes an optional file parameter."), +Print the internal register configuration.\n\ +Usage: maintenance print remote-registers [FILE]\n\ +The remote register number and g/G packets offset are included."), &maintenanceprintlist); } diff --git a/gdb/symfile.c b/gdb/symfile.c index f7f5be5a39a..21b65a860f1 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -3855,8 +3855,8 @@ to execute.\n" READNOW_READNEVER_HELP), &cmdlist); c = add_cmd ("add-symbol-file", class_files, add_symbol_file_command, _("\ Load symbols from FILE, assuming FILE has been dynamically loaded.\n\ -Usage: add-symbol-file FILE [-readnow | -readnever] [-o OFF] [ADDR] \ -[-s SECT-NAME SECT-ADDR]...\n\ +Usage: add-symbol-file FILE [-readnow|-readnever] [-o OFF] [ADDR]\n\ + [-s SECT-NAME SECT-ADDR]...\n\ ADDR is the starting address of the file's text.\n\ Each '-s' argument provides a section name and address, and\n\ should be specified if the data and bss segments are not contiguous\n\ diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 2956ad92fce..74b5e6c850a 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -1052,7 +1052,8 @@ Usage: mt print symbols [-pc ADDRESS] [--] [OUTFILE]\n\ mt print symbols [-objfile OBJFILE] [-source SOURCE] [--] [OUTFILE]\n\ Entries in the full symbol table are dumped to file OUTFILE,\n\ or the terminal if OUTFILE is unspecified.\n\ -If ADDRESS is provided, dump only the symbols for the file with code at that address.\n\ +If ADDRESS is provided, dump only the symbols for the file\n\ +with code at that address.\n\ If SOURCE is provided, dump only that file's symbols.\n\ If OBJFILE is provided, dump only that object file's symbols."), &maintenanceprintlist); -- 2.44.0