From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5126 invoked by alias); 2 May 2007 03:10:22 -0000 Received: (qmail 5118 invoked by uid 22791); 2 May 2007 03:10:21 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (213.8.233.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 02 May 2007 03:10:19 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-198-33.inter.net.il [83.130.198.33]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id HTD77280 (AUTH halo1); Wed, 2 May 2007 06:10:10 +0300 (IDT) Date: Wed, 02 May 2007 03:10:00 -0000 Message-Id: From: Eli Zaretskii To: Caroline Tice CC: gdb-patches@sourceware.org In-reply-to: <80EE31A6-4DF2-4D1F-B23D-8B814C1E6928@apple.com> (message from Caroline Tice on Tue, 1 May 2007 17:14:39 -0700) Subject: Re: [PATCH]: Tracking and reporting uninitialized variables Reply-to: Eli Zaretskii References: <80EE31A6-4DF2-4D1F-B23D-8B814C1E6928@apple.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00026.txt.bz2 > From: Caroline Tice > Date: Tue, 1 May 2007 17:14:39 -0700 > Cc: Caroline Tice > > 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.