This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Updated patch for Bug 13217 - thread apply all detach throws a SEGFAULT
- From: Tom Tromey <tromey at redhat dot com>
- To: ali_anwar <ali_anwar at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Mon, 10 Dec 2012 13:20:18 -0700
- Subject: Re: Updated patch for Bug 13217 - thread apply all detach throws a SEGFAULT
- References: <5062EA9B.1060505@codesourcery.com> <871uhnwkf3.fsf@fleche.redhat.com> <50C62BBB.6010404@codesourcery.com>
>>>>> "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