|
34 | 34 | translation, looks like this. */ |
35 | 35 | struct comp_unit_head |
36 | 36 | { |
37 | | - unsigned int length; |
38 | | - unsigned char version; |
39 | | - unsigned char addr_size; |
40 | | - unsigned char signed_addr_p; |
41 | | - sect_offset abbrev_sect_off; |
| 37 | + unsigned int length = 0; |
| 38 | + unsigned char version = 0; |
| 39 | + unsigned char addr_size = 0; |
| 40 | + unsigned char signed_addr_p = 0; |
| 41 | + sect_offset abbrev_sect_off {}; |
42 | 42 |
|
43 | 43 | /* Size of file offsets; either 4 or 8. */ |
44 | | - unsigned int offset_size; |
| 44 | + unsigned int offset_size = 0; |
45 | 45 |
|
46 | 46 | /* Size of the length field; either 4 or 12. */ |
47 | | - unsigned int initial_length_size; |
| 47 | + unsigned int initial_length_size = 0; |
48 | 48 |
|
49 | | - enum dwarf_unit_type unit_type; |
| 49 | + enum dwarf_unit_type unit_type {}; |
50 | 50 |
|
51 | 51 | /* Offset to first die in this cu from the start of the cu. |
52 | 52 | This will be the first byte following the compilation unit header. */ |
53 | | - cu_offset first_die_cu_offset; |
| 53 | + cu_offset first_die_cu_offset {}; |
54 | 54 |
|
55 | 55 | /* Offset to the first byte of this compilation unit header in the |
56 | 56 | .debug_info section, for resolving relative reference dies. */ |
57 | | - sect_offset sect_off; |
| 57 | + sect_offset sect_off {}; |
58 | 58 |
|
59 | 59 | /* For types, offset in the type's DIE of the type defined by this TU. */ |
60 | | - cu_offset type_cu_offset_in_tu; |
| 60 | + cu_offset type_cu_offset_in_tu {}; |
61 | 61 |
|
62 | 62 | /* 64-bit signature of this unit. For type units, it denotes the signature of |
63 | 63 | the type (DW_UT_type in DWARF 4, additionally DW_UT_split_type in DWARF 5). |
64 | 64 | Also used in DWARF 5, to denote the dwo id when the unit type is |
65 | 65 | DW_UT_skeleton or DW_UT_split_compile. */ |
66 | | - ULONGEST signature; |
| 66 | + ULONGEST signature = 0; |
67 | 67 |
|
68 | 68 | /* Return the total length of the CU described by this header. */ |
69 | 69 | unsigned int get_length () const |
|
0 commit comments