mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
sim/arm: Prevent NULL pointer dereference in sim_create_inferior.
2013-11-07 Will Newton <will.newton@linaro.org> PR gdb/9195 * arm/wrapper.c (sim_create_inferior): Avoid calling bfd_get_mach with a NULL bfd.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2013-11-07 Will Newton <will.newton@linaro.org>
|
||||||
|
|
||||||
|
PR gdb/9195
|
||||||
|
* arm/wrapper.c (sim_create_inferior): Avoid calling
|
||||||
|
bfd_get_mach with a NULL bfd.
|
||||||
|
|
||||||
2013-06-21 Nick Clifton <nickc@redhat.com>
|
2013-06-21 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* msp430: New Directory.
|
* msp430: New Directory.
|
||||||
|
@ -244,11 +244,15 @@ sim_create_inferior (sd, abfd, argv, env)
|
|||||||
char **arg;
|
char **arg;
|
||||||
|
|
||||||
if (abfd != NULL)
|
if (abfd != NULL)
|
||||||
ARMul_SetPC (state, bfd_get_start_address (abfd));
|
{
|
||||||
|
ARMul_SetPC (state, bfd_get_start_address (abfd));
|
||||||
|
mach = bfd_get_mach (abfd);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ARMul_SetPC (state, 0); /* ??? */
|
{
|
||||||
|
ARMul_SetPC (state, 0); /* ??? */
|
||||||
mach = bfd_get_mach (abfd);
|
mach = 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch (mach)
|
switch (mach)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user