mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 12:03:41 +08:00
2007-07-24 Michael Snyder <msnyder@access-company.com>
* ax-gdb.c (find_field): Guard against null ptr.
This commit is contained in:
parent
6baf377280
commit
747f3d1889
@ -1,3 +1,7 @@
|
|||||||
|
2007-07-24 Michael Snyder <msnyder@access-company.com>
|
||||||
|
|
||||||
|
* ax-gdb.c (find_field): Guard against null ptr.
|
||||||
|
|
||||||
2007-07-24 Ulrich Weigand <uweigand@de.ibm.com>
|
2007-07-24 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
* regformats/reg-spu.dat: Fix order of npc, id registers.
|
* regformats/reg-spu.dat: Fix order of npc, id registers.
|
||||||
|
13
gdb/ax-gdb.c
13
gdb/ax-gdb.c
@ -1172,12 +1172,15 @@ find_field (struct type *type, char *name)
|
|||||||
{
|
{
|
||||||
char *this_name = TYPE_FIELD_NAME (type, i);
|
char *this_name = TYPE_FIELD_NAME (type, i);
|
||||||
|
|
||||||
if (this_name && strcmp (name, this_name) == 0)
|
if (this_name)
|
||||||
return i;
|
{
|
||||||
|
if (strcmp (name, this_name) == 0)
|
||||||
|
return i;
|
||||||
|
|
||||||
if (this_name[0] == '\0')
|
if (this_name[0] == '\0')
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
_("find_field: anonymous unions not supported"));
|
_("find_field: anonymous unions not supported"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
error (_("Couldn't find member named `%s' in struct/union `%s'"),
|
error (_("Couldn't find member named `%s' in struct/union `%s'"),
|
||||||
|
Loading…
Reference in New Issue
Block a user