Assertion failure because of missing inferior
Tom Tromey
tromey@redhat.com
Tue Dec 7 18:54:00 GMT 2010
>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
Marc> So, I was thinking that since a frontend shouldn't care which
Marc> inferior is the current one, then '-remove-inferior' could change
Marc> the current inferior to another inferior, before doing the
Marc> removal. This is pretty much what the frontend would have to do
Marc> anyway. Removing the very last inferior would not be allowed.
Marc> The patch below does this. What do you think of this approach?
This makes sense to me.
Marc> +/* Callback used to find the first inferior other than the
Marc> + current one. */
Marc> +static int
Blank line between comment and function start.
Marc> + if (inf == current_inferior ())
Marc> + {
Marc> + struct inferior *new_inferior = iterate_over_inferiors (get_other_inferior, NULL);
This line should be broken somewhere, probably before the '='.
Marc> + if (new_inferior == NULL)
Marc> + error ("Cannot remove last inferior");
Need _() around the text.
Tom
More information about the Gdb-patches
mailing list