mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
PR32829, SEGV on objdump function debug_type_samep
u.kenum is always non-NULL, see debug_make_enum_type. PR 32829 * debug.c (debug_type_samep): Correct incomplete enum test. (debug_write_type): Remove dead code.
This commit is contained in:
parent
7bc46c9978
commit
6c3458a8b7
1 changed files with 3 additions and 6 deletions
|
|
@ -2554,9 +2554,6 @@ debug_write_type (struct debug_handle *info,
|
|||
case DEBUG_KIND_UNION_CLASS:
|
||||
return debug_write_class_type (info, fns, fhandle, type, tag);
|
||||
case DEBUG_KIND_ENUM:
|
||||
if (type->u.kenum == NULL)
|
||||
return (*fns->enum_type) (fhandle, tag, (const char **) NULL,
|
||||
(bfd_signed_vma *) NULL);
|
||||
return (*fns->enum_type) (fhandle, tag, type->u.kenum->names,
|
||||
type->u.kenum->values);
|
||||
case DEBUG_KIND_POINTER:
|
||||
|
|
@ -3097,9 +3094,9 @@ debug_type_samep (struct debug_handle *info, struct debug_type_s *t1,
|
|||
break;
|
||||
|
||||
case DEBUG_KIND_ENUM:
|
||||
if (t1->u.kenum == NULL)
|
||||
ret = t2->u.kenum == NULL;
|
||||
else if (t2->u.kenum == NULL)
|
||||
if (t1->u.kenum->names == NULL)
|
||||
ret = t2->u.kenum->names == NULL;
|
||||
else if (t2->u.kenum->names == NULL)
|
||||
ret = false;
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue