This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Track uninitialized variables
- From: Ian Lance Taylor <iant at google dot com>
- To: Caroline Tice <ctice at apple dot com>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: 08 May 2007 17:28:14 -0700
- Subject: Re: [PATCH]: Track uninitialized variables
- References: <F7F88B21-DF14-478D-A8C3-35CC1EF3C6C2@apple.com>
Caroline Tice <ctice@apple.com> writes:
> As part of some work I've been doing on improving debugging of
> optimized code, I
> have developed the following patch which, while tracking the locations
> of variables,
> also keeps track of whether the variables are initialized or not (it
> makes conservative
> assumptions where it can't be sure). For those places where it is
> sure the variables
> are unintialized, it adds an annotation to the var_location_note,
> which the dwarf
> writer later translates to a new DW_OP (an extension) that indicates a
> variable is uninitialized
> (DW_OP_GNU_uninit).
[ For some reason the line breaks in your e-mail message make it hard
to read. ]
Can you explain why this is useful?
Your patch needs comments for the changes in rtl.def and dwarf2.h.
Using TARGET_DWARF_UNINIT_VARS doesn't make sense to me. This is an
enhancement which depends on the version of gdb being used. It is not
in any meaningful way target specific. I would recommend controlling
this via an option. For Darwin, you can make the option default to on
if you like.
Ian