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: [MI][patch v2] -break-list to specify "thread-group"


>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:

Marc> I had forgotten to update the tests to take into consideration the
Marc> new parameter.  Those tests use -break-list in multiple places.
Marc> The new patch below does update the testsuite.
Marc> Only one new regression happens:

Marc> FAIL: gdb.mi/mi-nsmoribund.exp: thread specific breakpoint at thread_function

Marc> This was a latent problem where the unexpected 'thread' field was
Marc> being sucked into a '.*' pattern, which hid the error.  Because
Marc> the problem is in lib/mi-support.exp it is not as simple to fix.
Marc> Since the problem is not caused by my patch, I suggest not to fix
Marc> it right away.

We try not to let any regressions in.
So I think it does need to be fixed before this patch can go in.

Marc> Finally, one should note that this extra 'thread-group' field will now
Marc> appear in multiple command outputs and notifications.  Things such as
Marc> '-break-list', '-break-insert', '-break-info', '=breakpoint-modified'.
Marc> I believe that this all makes sense since a breakpoint is associated with
Marc> an inferior and the frontend may want to know that.

Totally fine, IMO.

Marc> +  /* Go through list in reverse order to print inferiors ids in
Marc> +     increasing order. */
Marc> +  for (index = len - 1; index >= 0; index--)

It isn't clear to me that it is reliable to assume that the inferior
list is sorted.

However, this shouldn't really matter for clients, either.

Marc> +       {
Marc> +         char mi_group[10];
Marc> +         sprintf (mi_group, "i%d", inf_num[index]);

Blank line between declarations and code.

Marc> +      int inf_num[number_of_inferiors ()];

I think you'd have to use alloca here -- but it is better to use a VEC
anyway.

Tom


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