From: Simon Marchi Date: Tue, 23 Jun 2020 19:40:23 +0000 (-0400) Subject: gdb: add some more empty lines in loc.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1fb5ee620365501977d0d6cd9d90c277c67c38e3;p=binutils-gdb.git gdb: add some more empty lines in loc.c Add some empty lines at places I forgot in the previous patch. gdb/ChangeLog: * dwarf2/loc.c (decode_debug_loclists_addresses): Add empty lines. Change-Id: I8a9f3766ede1ce750e0703023285dca873bce0da --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6b21c192729..08e4d310e44 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-06-23 Simon Marchi + + * dwarf2/loc.c (decode_debug_loclists_addresses): Add empty + lines. + 2020-06-23 Simon Marchi * dwarf2/loc.c (decode_debug_loc_dwo_addresses): Add empty diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index 732c41d1c8c..445d71a5ef1 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -184,60 +184,77 @@ decode_debug_loclists_addresses (dwarf2_per_cu_data *per_cu, loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &u64); if (loc_ptr == NULL) return DEBUG_LOC_BUFFER_OVERFLOW; + *high = dwarf2_read_addr_index (per_cu, per_objfile, u64); *new_ptr = loc_ptr; return DEBUG_LOC_BASE_ADDRESS; + case DW_LLE_startx_length: loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &u64); if (loc_ptr == NULL) return DEBUG_LOC_BUFFER_OVERFLOW; + *low = dwarf2_read_addr_index (per_cu, per_objfile, u64); *high = *low; loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &u64); if (loc_ptr == NULL) return DEBUG_LOC_BUFFER_OVERFLOW; + *high += u64; *new_ptr = loc_ptr; return DEBUG_LOC_START_LENGTH; + case DW_LLE_start_length: if (buf_end - loc_ptr < addr_size) return DEBUG_LOC_BUFFER_OVERFLOW; + if (signed_addr_p) *low = extract_signed_integer (loc_ptr, addr_size, byte_order); else *low = extract_unsigned_integer (loc_ptr, addr_size, byte_order); + loc_ptr += addr_size; *high = *low; + loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &u64); if (loc_ptr == NULL) return DEBUG_LOC_BUFFER_OVERFLOW; + *high += u64; *new_ptr = loc_ptr; return DEBUG_LOC_START_LENGTH; + case DW_LLE_end_of_list: *new_ptr = loc_ptr; return DEBUG_LOC_END_OF_LIST; + case DW_LLE_base_address: if (loc_ptr + addr_size > buf_end) return DEBUG_LOC_BUFFER_OVERFLOW; + if (signed_addr_p) *high = extract_signed_integer (loc_ptr, addr_size, byte_order); else *high = extract_unsigned_integer (loc_ptr, addr_size, byte_order); + loc_ptr += addr_size; *new_ptr = loc_ptr; return DEBUG_LOC_BASE_ADDRESS; + case DW_LLE_offset_pair: loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &u64); if (loc_ptr == NULL) return DEBUG_LOC_BUFFER_OVERFLOW; + *low = u64; loc_ptr = gdb_read_uleb128 (loc_ptr, buf_end, &u64); if (loc_ptr == NULL) return DEBUG_LOC_BUFFER_OVERFLOW; + *high = u64; *new_ptr = loc_ptr; return DEBUG_LOC_OFFSET_PAIR; + /* Following cases are not supported yet. */ case DW_LLE_startx_endx: case DW_LLE_start_end: