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: [PATCH]: Tracking and reporting uninitialized variables


> 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.


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