diff options
author | Zoran Zaric <Zoran.Zaric@amd.com> | 2021-02-26 10:14:53 +0000 |
---|---|---|
committer | Zoran Zaric <zoran.zaric@amd.com> | 2021-08-05 16:38:48 +0100 |
commit | fb4cdecb7e3b9cab8a83f3e69a9deafcf53501fe (patch) | |
tree | ef0493c05bbf26c01ef3c91f82de7b5dbc1035b6 /gdb/dwarf2/expr.h | |
parent | 183657edcd11c6fd84b4cf3721250086784999de (diff) | |
download | fsf-binutils-gdb-fb4cdecb7e3b9cab8a83f3e69a9deafcf53501fe.zip fsf-binutils-gdb-fb4cdecb7e3b9cab8a83f3e69a9deafcf53501fe.tar.gz fsf-binutils-gdb-fb4cdecb7e3b9cab8a83f3e69a9deafcf53501fe.tar.bz2 |
Cleanup of the dwarf_expr_context constructor
Move the initial values for dwarf_expr_context class data members
to the class declaration in expr.h.
gdb/ChangeLog:
* dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context):
Remove initial data members values.
* dwarf2/expr.h (dwarf_expr_context): Add initial values
to the class data members.
Diffstat (limited to 'gdb/dwarf2/expr.h')
-rw-r--r-- | gdb/dwarf2/expr.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/dwarf2/expr.h b/gdb/dwarf2/expr.h index b28a077..60021eb 100644 --- a/gdb/dwarf2/expr.h +++ b/gdb/dwarf2/expr.h @@ -132,32 +132,32 @@ struct dwarf_expr_context std::vector<dwarf_stack_value> stack; /* Target architecture to use for address operations. */ - struct gdbarch *gdbarch; + struct gdbarch *gdbarch = nullptr; /* Target address size in bytes. */ - int addr_size; + int addr_size = 0; /* DW_FORM_ref_addr size in bytes. If -1 DWARF is executed from a frame context and operations depending on DW_FORM_ref_addr are not allowed. */ - int ref_addr_size; + int ref_addr_size = 0; /* The current depth of dwarf expression recursion, via DW_OP_call*, DW_OP_fbreg, DW_OP_push_object_address, etc., and the maximum depth we'll tolerate before raising an error. */ - int recursion_depth, max_recursion_depth; + int recursion_depth = 0, max_recursion_depth = 0x100; /* Location of the value. */ - enum dwarf_value_location location; + dwarf_value_location location = DWARF_VALUE_MEMORY; /* For DWARF_VALUE_LITERAL, the current literal value's length and data. For DWARF_VALUE_IMPLICIT_POINTER, LEN is the offset of the target DIE of sect_offset kind. */ - ULONGEST len; - const gdb_byte *data; + ULONGEST len = 0; + const gdb_byte *data = nullptr; /* Initialization status of variable: Non-zero if variable has been initialized; zero otherwise. */ - int initialized; + int initialized = 0; /* A vector of pieces. |