This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [MI] core awareness
On Tue, Jan 12, 2010 at 2:56 PM, Doug Evans <dje@google.com> wrote:
> On Tue, Jan 12, 2010 at 1:43 PM, Vladimir Prus
> <vladimir@codesourcery.com> wrote:
>> Thanks. Here's the version I've just checked in. Differs from above in:
>>
>> ? ? ? ?- mi-support.exp fix to make it not crash on the 'core' field
>> ? ? ? ?- demand_private_info now initialized 'extra' to 0, and does not rely
>> ? ? ? ? ?on luck.
>
> Hi.
>
> Nit: features/threads.dtd didn't get checked in.
>
Sorry, one more nit.
I'm getting a build failure:
cc1: warnings being treated as errors
../../../src/gdb/mi/mi-main.c: In function 'mi_cmd_list_thread_groups':
../../../src/gdb/mi/mi-main.c:518: warning: 'tree' may be used
uninitialized in this function
../../../src/gdb/mi/mi-main.c:518: note: 'tree' was declared here
make: *** [mi-main.o] Error 1
Checked in as obvious.
2010-01-12 Doug Evans <dje@google.com>
* mi/mi-main.c (list_available_thread_groups): Avoid "may be used
uninitialized" warning from gcc on local `tree'.
Index: mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.162
diff -u -p -r1.162 mi-main.c
--- mi/mi-main.c 12 Jan 2010 21:40:24 -0000 1.162
+++ mi/mi-main.c 12 Jan 2010 23:00:51 -0000
@@ -513,9 +513,10 @@ list_available_thread_groups (VEC (int)
struct osdata_item *item;
int ix_items;
/* This keeps a map from integer (pid) to VEC (struct osdata_item *)*
- The vector contains information about all threads for the given
- pid. */
- splay_tree tree;
+ The vector contains information about all threads for the given pid.
+ This is assigned an initial value to avoid "may be used uninitialized"
+ warning from gcc. */
+ splay_tree tree = NULL;
/* get_osdata will throw if it cannot return data. */
data = get_osdata ("processes");