aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:08:01 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:08:01 -0400
commit1d6286ed048eb1997a0afea0f18cb9eb1789f386 (patch)
tree48207320acbbca8f9252bb1d11ca41d3780c4564 /gdb/dwarf2
parent7f9f399b34b7e2278eb1e8d6b7653e2b38070c55 (diff)
downloadgdb-1d6286ed048eb1997a0afea0f18cb9eb1789f386.zip
gdb-1d6286ed048eb1997a0afea0f18cb9eb1789f386.tar.gz
gdb-1d6286ed048eb1997a0afea0f18cb9eb1789f386.tar.bz2
gdb: add type::has_varargs / type::set_has_varargs
Add the `has_varargs` and `set_has_varargs` methods on `struct type`, in order to remove the `TYPE_VARARGS` macro. In this patch, the macro is changed to use the getter, so all the call sites of the macro that are used as a setter are changed to use the setter method directly. The next patch will remove the macro completely. gdb/ChangeLog: * gdbtypes.h (struct type) <has_varargs, set_has_varargs>: New methods. (TYPE_VARARGS): Use type::has_varargs, change all write call sites to use type::set_has_varargs. Change-Id: I898a1093ae40808b37a7c6fced7f6fa2aae604de
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index f4f3a02..e61eda7 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -17707,7 +17707,8 @@ read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu)
if (child_die->tag == DW_TAG_formal_parameter)
nparams++;
else if (child_die->tag == DW_TAG_unspecified_parameters)
- TYPE_VARARGS (ftype) = 1;
+ ftype->set_has_varargs (true);
+
child_die = child_die->sibling;
}