From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22258 invoked by alias); 9 May 2007 17:36:51 -0000 Received: (qmail 22248 invoked by uid 22791); 9 May 2007 17:36:50 -0000 X-Spam-Check-By: sourceware.org Received: from mail-out3.apple.com (HELO mail-out3.apple.com) (17.254.13.22) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 May 2007 17:36:44 +0000 Received: from relay5.apple.com (relay5.apple.com [17.128.113.35]) by mail-out3.apple.com (Postfix) with ESMTP id 2031AD3A04; Wed, 9 May 2007 10:36:33 -0700 (PDT) Received: from relay5.apple.com (unknown [127.0.0.1]) by relay5.apple.com (Symantec Mail Security) with ESMTP id 5CCDC29C018; Wed, 9 May 2007 10:36:43 -0700 (PDT) X-AuditID: 11807123-9e88abb0000065b6-5c-464206aac241 Received: from [17.219.199.133] (unknown [17.219.199.133]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by relay5.apple.com (Apple SCV relay) with ESMTP id BCF1530400C; Wed, 9 May 2007 10:36:42 -0700 (PDT) In-Reply-To: References: <80EE31A6-4DF2-4D1F-B23D-8B814C1E6928@apple.com> <717BDA2E-D6FF-4AA5-B857-68BA5B140F5F@apple.com> Mime-Version: 1.0 (Apple Message framework v749.3) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Cc: Jim Blandy , Caroline Tice Content-Transfer-Encoding: 7bit From: Caroline Tice Subject: Re: Ping! [PATCH]: Tracking and reporting uninitialized variables Date: Wed, 09 May 2007 17:36:00 -0000 To: gdb-patches@sourceware.org X-Mailer: Apple Mail (2.749.3) 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/msg00130.txt.bz2 On May 8, 2007, at 5:33 PM, Jim Blandy wrote: > > Caroline Tice writes: >>> 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. >>> >>> I have tested this patch on some small testcases and I have run the >>> gdb dejagnu >>> testsuite with no regressions. I am new to submitting things to >>> this list, so if there >>> is anything else I ought to have done, please let me know >>> (kindly!). > > Hi, Caroline. This seems like a nice patch. > > In a multi-piece location expression, can each piece be individually > initialized or uninitialized? If that's so, then there should also be > an 'initialized' member of 'struct dwarf_expr_piece', which gets set > appropriately for each piece in a multi-piece location expression. > Okay, will do. (Yes, I believe each piece can be individually initialized or uninitialized.) > Either way, the code for DW_OP_GNU_uninit should check that it's the > last opcode in the piece or in the entire expression, as the > DW_OP_reg* cases do. > Will do. > I think the 'struct dwarf_expr_context' member should be named > simply 'initialized', instead of 'var_status'. The 'struct value' > field should be named 'initialized', and the accessor functions should > be named 'value_initialized' and 'set_value_initialized'. The comment > in value.h actually needs to be filled in; the description should be > thorough enough to allow someone who otherwise knows how GDB works to > use those functions, without reading their definitions. > Will do. > I couldn't see from your patch why 'signed_address_type', > 'unsigned_address_type', and 'add_piece' were made visible outside > dwarf2expr.c; that should be left out of the patch if it's not needed. > I went back and checked; making them globally visible was actually for a different patch I did. Sorry; I will remove that from this patch. > Have you filed a copyright assignment with the FSF? Jim Ingham answered this one.