diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 66faf85bc4..261b54eefe 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-02-16 Mike Frysinger + + PR gdb/9734: + * remote-sim.c (gdbsim_create_inferior): Call error() when + sim_create_inferior() fails. + 2012-02-16 Josh Matthews * machoread.c: Initialize nbr_syms to avoid warnings-as-errors failure. diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 2a586e5e80..ee73cce47c 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -641,7 +641,10 @@ gdbsim_create_inferior (struct target_ops *target, char *exec_file, char *args, } else argv = NULL; - sim_create_inferior (sim_data->gdbsim_desc, exec_bfd, argv, env); + + if (sim_create_inferior (sim_data->gdbsim_desc, exec_bfd, argv, env) + != SIM_RC_OK) + error (_("Unable to create sim inferior.")); inferior_ptid = sim_data->remote_sim_ptid; inferior_appeared (current_inferior (), ptid_get_pid (inferior_ptid));