This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Assertion failure because of missing inferior


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]