[gdb] Remove '/* *' multi-line comment marker

Doxygen supports a multi-line comment marker '/**'.  In GDB we're using
something slightly similar: '/* *' [1].

Drop this and just use '/*'.

Result of:
...
$ find gdb* -type f -name "*.[ch]" -o -name "*.def" \
    | egrep -v /testsuite/ \
    | xargs sed -i 's%/\* \* %/* %'
...
and manually reverting the change in the comment for BINOP_MUL in
gdb/std-operator.def.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34186

Approved-By: Kevin Buettner <kevinb@redhat.com>
Approved-By: Tom Tromey <tom@tromey.com>

[1] https://sourceware.org/gdb/wiki/DoxygenForGDB
This commit is contained in:
Tom de Vries 2026-06-01 20:14:37 +02:00
parent 79f06b25a4
commit 94e356ac49
9 changed files with 238 additions and 238 deletions

View file

@ -23,7 +23,7 @@
struct ui_file;
struct cmd_list_element;
/* * Control types for commands. */
/* Control types for commands. */
enum misc_command_type
{
@ -70,7 +70,7 @@ typedef std::shared_ptr<command_line> counted_command_line;
/* A unique_ptr specialization for command_line. */
typedef std::unique_ptr<command_line, command_lines_deleter> command_line_up;
/* * Structure for saved commands lines (for breakpoints, defined
/* Structure for saved commands lines (for breakpoints, defined
commands, etc). */
struct command_line
@ -97,7 +97,7 @@ struct command_line
compile;
}
control_u;
/* * For composite commands, the nested lists of commands. For
/* For composite commands, the nested lists of commands. For
example, for "if" command this will contain the then branch and
the else branch, if that is available. */
counted_command_line body_list_0;

View file

@ -81,20 +81,20 @@
#define O_BINARY 0
#endif
/* * System root path, used to find libraries etc. */
/* System root path, used to find libraries etc. */
extern std::string gdb_sysroot;
/* * GDB datadir, used to store data files. */
/* GDB datadir, used to store data files. */
extern std::string gdb_datadir;
/* * If not empty, the possibly relocated path to python's "lib" directory
/* If not empty, the possibly relocated path to python's "lib" directory
specified with --with-python. */
extern std::string python_libdir;
/* * Search path for separate debug files. */
/* Search path for separate debug files. */
extern std::string debug_file_directory;
/* * Languages represented in the symbol table and elsewhere.
/* Languages represented in the symbol table and elsewhere.
This should probably be in language.h, but since enum's can't
be forward declared to satisfy opaque references before their
actual definition, needs to be here.
@ -136,7 +136,7 @@ static_assert (nr_languages <= (1 << LANGUAGE_BITS));
/* The number of bytes needed to represent all languages. */
#define LANGUAGE_BYTES ((LANGUAGE_BITS + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT)
/* * A generic, not quite boolean, enumeration. This is used for
/* A generic, not quite boolean, enumeration. This is used for
set/show commands in which the options are on/off/automatic. */
enum auto_boolean
{
@ -145,28 +145,28 @@ enum auto_boolean
AUTO_BOOLEAN_AUTO
};
/* * Potential ways that a function can return a value of a given
/* Potential ways that a function can return a value of a given
type. */
enum return_value_convention
{
/* * Where the return value has been squeezed into one or more
/* Where the return value has been squeezed into one or more
registers. */
RETURN_VALUE_REGISTER_CONVENTION,
/* * Commonly known as the "struct return convention". The caller
/* Commonly known as the "struct return convention". The caller
passes an additional hidden first parameter to the caller. That
parameter contains the address at which the value being returned
should be stored. While typically, and historically, used for
large structs, this is convention is applied to values of many
different types. */
RETURN_VALUE_STRUCT_CONVENTION,
/* * Like the "struct return convention" above, but where the ABI
/* Like the "struct return convention" above, but where the ABI
guarantees that the called function stores the address at which
the value being returned is stored in a well-defined location,
such as a register or memory slot in the stack frame. Don't use
this if the ABI doesn't explicitly guarantees this. */
RETURN_VALUE_ABI_RETURNS_ADDRESS,
/* * Like the "struct return convention" above, but where the ABI
/* Like the "struct return convention" above, but where the ABI
guarantees that the address at which the value being returned is
stored will be available in a well-defined location, such as a
register or memory slot in the stack frame. Don't use this if
@ -212,68 +212,68 @@ extern int print_address_symbolic (struct gdbarch *, CORE_ADDR,
extern void print_address (struct gdbarch *, CORE_ADDR, struct ui_file *);
extern const char *pc_prefix (CORE_ADDR);
/* * Possible lvalue types. Like enum language, this should be in
/* Possible lvalue types. Like enum language, this should be in
value.h, but needs to be here for the same reason. */
enum lval_type
{
/* * Not an lval. */
/* Not an lval. */
not_lval,
/* * In memory. */
/* In memory. */
lval_memory,
/* * In a register. Registers are relative to a frame. */
/* In a register. Registers are relative to a frame. */
lval_register,
/* * In a gdb internal variable. */
/* In a gdb internal variable. */
lval_internalvar,
/* * Value encapsulates a callable defined in an extension language. */
/* Value encapsulates a callable defined in an extension language. */
lval_xcallable,
/* * Part of a gdb internal variable (structure field). */
/* Part of a gdb internal variable (structure field). */
lval_internalvar_component,
/* * Value's bits are fetched and stored using functions provided
/* Value's bits are fetched and stored using functions provided
by its creator. */
lval_computed
};
/* * Parameters of the "info proc" command. */
/* Parameters of the "info proc" command. */
enum info_proc_what
{
/* * Display the default cmdline, cwd and exe outputs. */
/* Display the default cmdline, cwd and exe outputs. */
IP_MINIMAL,
/* * Display `info proc mappings'. */
/* Display `info proc mappings'. */
IP_MAPPINGS,
/* * Display `info proc status'. */
/* Display `info proc status'. */
IP_STATUS,
/* * Display `info proc stat'. */
/* Display `info proc stat'. */
IP_STAT,
/* * Display `info proc cmdline'. */
/* Display `info proc cmdline'. */
IP_CMDLINE,
/* * Display `info proc environ'. */
/* Display `info proc environ'. */
IP_ENVIRON,
/* * Display `info proc exe'. */
/* Display `info proc exe'. */
IP_EXE,
/* * Display `info proc cwd'. */
/* Display `info proc cwd'. */
IP_CWD,
/* * Display `info proc files'. */
/* Display `info proc files'. */
IP_FILES,
/* * Display all of the above. */
/* Display all of the above. */
IP_ALL
};
/* * Default radixes for input and output. Only some values supported. */
/* Default radixes for input and output. Only some values supported. */
extern unsigned input_radix;
extern unsigned output_radix;
/* * Optional native machine support. Non-native (and possibly pure
/* Optional native machine support. Non-native (and possibly pure
multi-arch) targets do not need a "nm.h" file. This will be a
symlink to one of the nm-*.h files, built by the `configure'
script. */
@ -294,7 +294,7 @@ extern unsigned output_radix;
# include "fopen-bin.h"
#endif
/* * Convert a LONGEST to an int. This is used in contexts (e.g. number of
/* Convert a LONGEST to an int. This is used in contexts (e.g. number of
arguments to a function, number in a value history, register number, etc.)
where the value must not be larger than can fit in an int. */
@ -359,10 +359,10 @@ extern int (*deprecated_ui_load_progress_hook) (const char *section,
#define ISATTY(FP) (isatty (fileno (FP)))
#endif
/* * A width that can achieve a better legibility for GDB MI mode. */
/* A width that can achieve a better legibility for GDB MI mode. */
#define GDB_MI_MSG_WIDTH 80
/* * Special block numbers */
/* Special block numbers */
enum block_enum
{

View file

@ -35,13 +35,13 @@ struct dwarf2_per_objfile;
enum call_site_parameter_kind
{
/* * Use field call_site_parameter.u.dwarf_reg. */
/* Use field call_site_parameter.u.dwarf_reg. */
CALL_SITE_PARAMETER_DWARF_REG,
/* * Use field call_site_parameter.u.fb_offset. */
/* Use field call_site_parameter.u.fb_offset. */
CALL_SITE_PARAMETER_FB_OFFSET,
/* * Use field call_site_parameter.u.param_offset. */
/* Use field call_site_parameter.u.param_offset. */
CALL_SITE_PARAMETER_PARAM_OFFSET
};
@ -116,25 +116,25 @@ private:
} addresses;
} m_loc;
/* * Discriminant for union field_location. */
/* Discriminant for union field_location. */
enum kind m_loc_kind;
};
union call_site_parameter_u
{
/* * DW_TAG_formal_parameter's DW_AT_location's DW_OP_regX
/* DW_TAG_formal_parameter's DW_AT_location's DW_OP_regX
as DWARF register number, for register passed
parameters. */
int dwarf_reg;
/* * Offset from the callee's frame base, for stack passed
/* Offset from the callee's frame base, for stack passed
parameters. This equals offset from the caller's stack
pointer. */
CORE_ADDR fb_offset;
/* * Offset relative to the start of this PER_CU to
/* Offset relative to the start of this PER_CU to
DW_TAG_formal_parameter which is referenced by both
caller and the callee. */
@ -156,19 +156,19 @@ struct call_site_parameter
union call_site_parameter_u u;
/* * DW_TAG_formal_parameter's DW_AT_call_value. It is never NULL. */
/* DW_TAG_formal_parameter's DW_AT_call_value. It is never NULL. */
const gdb_byte *value;
size_t value_size;
/* * DW_TAG_formal_parameter's DW_AT_call_data_value.
/* DW_TAG_formal_parameter's DW_AT_call_data_value.
It may be NULL if not provided by DWARF. */
const gdb_byte *data_value;
size_t data_value_size;
};
/* * A place where a function gets called from, represented by
/* A place where a function gets called from, represented by
DW_TAG_call_site. It can be looked up from symtab->call_site_htab. */
struct call_site
@ -202,20 +202,20 @@ struct call_site
caller_frame, callback);
}
/* * List successor with head in FUNC_TYPE.TAIL_CALL_LIST. */
/* List successor with head in FUNC_TYPE.TAIL_CALL_LIST. */
struct call_site *tail_call_next = nullptr;
/* * Describe DW_AT_call_target. Missing attribute uses
/* Describe DW_AT_call_target. Missing attribute uses
m_loc_kind == DWARF_BLOCK with m_loc.dwarf_block == nullptr. */
struct call_site_target target {};
/* * Size of the PARAMETER array. */
/* Size of the PARAMETER array. */
unsigned parameter_count = 0;
/* * CU of the function where the call is located. It gets used
/* CU of the function where the call is located. It gets used
for DWARF blocks execution in the parameter array below. */
dwarf2_per_cu *const per_cu = nullptr;
@ -229,7 +229,7 @@ private:
const unrelocated_addr m_unrelocated_pc;
public:
/* * Describe DW_TAG_call_site's DW_TAG_formal_parameter. */
/* Describe DW_TAG_call_site's DW_TAG_formal_parameter. */
struct call_site_parameter parameter[];
};

File diff suppressed because it is too large Load diff

View file

@ -35,7 +35,7 @@ extern int return_child_result_value;
extern int batch_silent;
extern int batch_flag;
/* * The name of the interpreter if specified on the command line. */
/* The name of the interpreter if specified on the command line. */
extern std::string interpreter_p;
/* From mingw-hdep.c, used by main.c. */

View file

@ -19,7 +19,7 @@
OP (TYPE_CODE_PTR) /**< Pointer type */
/* * Array type with lower & upper bounds.
/* Array type with lower & upper bounds.
Regardless of the language, GDB represents multidimensional
array types the way C does: as arrays of arrays. So an
@ -46,10 +46,10 @@ OP (TYPE_CODE_FLAGS) /**< Bit flags type */
OP (TYPE_CODE_FUNC) /**< Function type */
OP (TYPE_CODE_INT) /**< Integer type */
/* * Floating type. This is *NOT* a complex type. */
/* Floating type. This is *NOT* a complex type. */
OP (TYPE_CODE_FLT)
/* * Void type. The length field specifies the length (probably
/* Void type. The length field specifies the length (probably
always one) which is used in pointer arithmetic involving
pointers to this type, but actually dereferencing such a
pointer is invalid; a void type has no length and no actual
@ -60,13 +60,13 @@ OP (TYPE_CODE_VOID)
OP (TYPE_CODE_SET) /**< Pascal sets */
OP (TYPE_CODE_RANGE) /**< Range (integers within spec'd bounds). */
/* * A string type which is like an array of character but prints
/* A string type which is like an array of character but prints
differently. It does not contain a length field as Pascal
strings (for many Pascals, anyway) do; if we want to deal with
such strings, we should use a new type code. */
OP (TYPE_CODE_STRING)
/* * Unknown type. The length field is valid if we were able to
/* Unknown type. The length field is valid if we were able to
deduce that much about the type, or 0 if we don't even know
that. */
OP (TYPE_CODE_ERROR)
@ -74,13 +74,13 @@ OP (TYPE_CODE_ERROR)
/* C++ */
OP (TYPE_CODE_METHOD) /**< Method type */
/* * Pointer-to-member-function type. This describes how to access a
/* Pointer-to-member-function type. This describes how to access a
particular member function of a class (possibly a virtual
member function). The representation may vary between different
C++ ABIs. */
OP (TYPE_CODE_METHODPTR)
/* * Pointer-to-member type. This is the offset within a class to
/* Pointer-to-member type. This is the offset within a class to
some particular data member. The only currently supported
representation uses an unbiased offset, with -1 representing
NULL; this is used by the Itanium C++ ABI (used by GCC on all
@ -93,7 +93,7 @@ OP (TYPE_CODE_RVALUE_REF) /**< C++ rvalue reference types */
OP (TYPE_CODE_CHAR) /**< *real* character type */
/* * Boolean type. 0 is false, 1 is true, and other values are
/* Boolean type. 0 is false, 1 is true, and other values are
non-boolean (e.g. FORTRAN "logical" used as unsigned int). */
OP (TYPE_CODE_BOOL)
@ -108,16 +108,16 @@ OP (TYPE_CODE_DECFLOAT) /**< Decimal floating point. */
OP (TYPE_CODE_MODULE) /**< Fortran module. */
/* * Internal function type. */
/* Internal function type. */
OP (TYPE_CODE_INTERNAL_FUNCTION)
/* * Methods implemented in extension languages. */
/* Methods implemented in extension languages. */
OP (TYPE_CODE_XMETHOD)
/* * Fixed Point type. */
/* Fixed Point type. */
OP (TYPE_CODE_FIXED_POINT)
/* * Fortran namelist is a group of variables or arrays that can be
/* Fortran namelist is a group of variables or arrays that can be
read or written.
Namelist syntax: NAMELIST / groupname / namelist_items ...

View file

@ -29,7 +29,7 @@ enum val_prettyformat
{
Val_no_prettyformat = 0,
Val_prettyformat,
/* * Use the default setting which the user has specified. */
/* Use the default setting which the user has specified. */
Val_prettyformat_default
};

View file

@ -23,10 +23,10 @@
#include <inttypes.h>
#include "gdbsupport/offset-type.h"
/* * A byte from the program being debugged. */
/* A byte from the program being debugged. */
typedef unsigned char gdb_byte;
/* * An address in the program being debugged. Host byte order. */
/* An address in the program being debugged. Host byte order. */
typedef uint64_t CORE_ADDR;
/* Like a CORE_ADDR, but not directly convertible. This is used to
@ -38,16 +38,16 @@ DEFINE_OFFSET_TYPE (unrelocated_addr, CORE_ADDR);
typedef int64_t LONGEST;
typedef uint64_t ULONGEST;
/* * The largest CORE_ADDR value. */
/* The largest CORE_ADDR value. */
#define CORE_ADDR_MAX (~(CORE_ADDR) 0)
/* * The largest ULONGEST value, 0xFFFFFFFFFFFFFFFF for 64-bits. */
/* The largest ULONGEST value, 0xFFFFFFFFFFFFFFFF for 64-bits. */
#define ULONGEST_MAX (~(ULONGEST) 0)
/* * The largest LONGEST value, 0x7FFFFFFFFFFFFFFF for 64-bits. */
/* The largest LONGEST value, 0x7FFFFFFFFFFFFFFF for 64-bits. */
#define LONGEST_MAX ((LONGEST) (ULONGEST_MAX >> 1))
/* * The smallest LONGEST value, 0x8000000000000000 for 64-bits. */
/* The smallest LONGEST value, 0x8000000000000000 for 64-bits. */
#define LONGEST_MIN ((LONGEST) (~(LONGEST) 0 ^ LONGEST_MAX))
enum tribool { TRIBOOL_UNKNOWN = -1, TRIBOOL_FALSE = 0, TRIBOOL_TRUE = 1 };

View file

@ -23,13 +23,13 @@
/* Static host-system-dependent parameters for GDB. */
/* * Number of bits in a char or unsigned char for the target machine.
/* Number of bits in a char or unsigned char for the target machine.
Just like CHAR_BIT in <limits.h> but describes the target machine. */
#if !defined (TARGET_CHAR_BIT)
#define TARGET_CHAR_BIT 8
#endif
/* * If we picked up a copy of CHAR_BIT from a configuration file
/* If we picked up a copy of CHAR_BIT from a configuration file
(which may get it by including <limits.h>) then use it to set
the number of bits in a host char. If not, use the same size
as the target. */