mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 12:03:41 +08:00
Don't create _Complex type name if there is no target type name
This causes gdb to crash in strlen. Happens if init_complex_type is called for a type created by dbx_init_float_type in stabsread.c. gdb/ChangeLog: 2020-10-22 Hannes Domani <ssbssa@yahoo.de> * gdbtypes.c (init_complex_type): Check target type name.
This commit is contained in:
parent
4b4bb603fd
commit
6b9d0dfda4
@ -1,3 +1,7 @@
|
||||
2020-10-22 Hannes Domani <ssbssa@yahoo.de>
|
||||
|
||||
* gdbtypes.c (init_complex_type): Check target type name.
|
||||
|
||||
2020-10-22 Simon Marchi <simon.marchi@polymtl.ca>
|
||||
|
||||
* target-debug.h (target_debug_print_struct_target_ops_p):
|
||||
|
@ -3283,7 +3283,7 @@ init_complex_type (const char *name, struct type *target_type)
|
||||
|
||||
if (TYPE_MAIN_TYPE (target_type)->flds_bnds.complex_type == nullptr)
|
||||
{
|
||||
if (name == nullptr)
|
||||
if (name == nullptr && target_type->name () != nullptr)
|
||||
{
|
||||
char *new_name
|
||||
= (char *) TYPE_ALLOC (target_type,
|
||||
|
Loading…
Reference in New Issue
Block a user