This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH]: Tracking and reporting uninitialized variables
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Caroline Tice <ctice at apple dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 02 May 2007 06:10:14 +0300
- Subject: Re: [PATCH]: Tracking and reporting uninitialized variables
- References: <80EE31A6-4DF2-4D1F-B23D-8B814C1E6928@apple.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Caroline Tice <ctice@apple.com>
> Date: Tue, 1 May 2007 17:14:39 -0700
> Cc: Caroline Tice <ctice@apple.com>
>
> As part of some work I have been doing on improving debugging of
> optimized code, I have created a GCC patch that tags variables it
> believes are uninitialized with a new Dwarf op (an extension),
> DW_OP_GNU_uninit. I have submitted that patch to the GCC patches
> list and am waiting for approval to commit it. I have also created
> the following gdb patch to recognize the new op and inform the user
> when a variable the user requests to see is uninitialized.
Thanks.
What would be really nice is if you'd add a feature whereby I could
catch references to uninitialized variables, something like
(gdb) rwatch foo if uninitialized
That would cause GDB to stop the program whenever it tries to use the
value of a variable that wasn't initialized.