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: Updated patch for Bug 13217 - thread apply all detach throws a SEGFAULT


>>>>> "Ali" == ali anwar <ali_anwar@codesourcery.com> writes:

Ali> +  if (thread_count ())
Ali> +    {
Ali> +      struct thread_info tp_array [thread_count ()];

You can't use variable-length arrays in gdb.
Probably xmalloc and a cleanup is your best option here.

Ali> +      for(k = 0; k != i; k++)

Space between 'for' and '('.

Ali> +            switch_to_thread ((&tp_array [k])->ptid);

No space before '['.  This occurs in a couple places.

Tom


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