This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]: Track uninitialized variables


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


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