gdb, dwarf: add assert to dwarf2_get_pc_bounds
In dwarf2_get_pc_bounds we were writing unchecked to *lowpc. This commit adds a gdb_assert to first check that lowpc != nullptr. Approved-by: Tom Tromey <tom@tromey.com>
This commit is contained in:
parent
69570475c6
commit
06740cf11f
1 changed files with 1 additions and 0 deletions
|
@ -11092,6 +11092,7 @@ dwarf2_get_pc_bounds (struct die_info *die, unrelocated_addr *lowpc,
|
|||
&& !per_objfile->per_bfd->has_section_at_zero)
|
||||
return PC_BOUNDS_INVALID;
|
||||
|
||||
gdb_assert (lowpc != nullptr);
|
||||
*lowpc = low;
|
||||
if (highpc != nullptr)
|
||||
*highpc = high;
|
||||
|
|
Loading…
Add table
Reference in a new issue