mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
Replace an assertion in the dwarf code with a warning message.
PR 30327 * dwarf.c (read_and_display_attr_value): Warn if the number of views is greater than the number of locations.
This commit is contained in:
parent
91496180eb
commit
7bb9e56c6a
@ -1,5 +1,9 @@
|
||||
2023-04-11 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 30327
|
||||
* dwarf.c (read_and_display_attr_value): Warn if the number of
|
||||
views is greater than the number of locations.
|
||||
|
||||
PR 30313
|
||||
* dwarf.c (display_debug_lines_decoded): Check for an overlarge
|
||||
number of files or directories.
|
||||
|
@ -2927,8 +2927,14 @@ read_and_display_attr_value (unsigned long attribute,
|
||||
}
|
||||
else
|
||||
{
|
||||
assert (debug_info_p->num_loc_views <= num);
|
||||
num = debug_info_p->num_loc_views;
|
||||
if (debug_info_p->num_loc_views > num)
|
||||
{
|
||||
warn (_("The number of views (%u) is greater than the number of locations (%u)\n"),
|
||||
debug_info_p->num_loc_views, num);
|
||||
debug_info_p->num_loc_views = num;
|
||||
}
|
||||
else
|
||||
num = debug_info_p->num_loc_views;
|
||||
if (num > debug_info_p->num_loc_offsets)
|
||||
warn (_("More DW_AT_GNU_locview attributes than location offset attributes\n"));
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user