]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: use std::string vector for macro definition
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 24 Jul 2024 19:07:14 +0000 (15:07 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 30 Jul 2024 12:52:57 +0000 (08:52 -0400)
commit1cb8a69ec2955e736e24340ef476fed5abeb7703
tree455e2660fbd9baef25503f966967702810efc008
parenta7763df8fbabe0d364d7f1e418683ee460518998
gdb: use std::string vector for macro definition

Use std::vector<std::string> when defining macros, to avoid the manual
memory management.

With the use of std::vector, the separate `int argc` parameter is no
longer needed, we can use the size of the vector instead.  However, for
some functions, this parameter had a dual function.  For object-like
macros, it was interpreted as a `macro_special_kind` enum.  For these
functions, remove `argc`, but add a new `special_kind` parameter.

Change-Id: Ice76a6863dfe598335e3b8d5d077513e50975cc5
Approved-By: Tom de Vries <tdevries@suse.de>
gdb/dwarf2/macro.c
gdb/macrocmd.c
gdb/macrotab.c
gdb/macrotab.h