From: Caroline Tice <ctice@apple.com>
To: gdb-patches@sourceware.org
Cc: Caroline Tice <ctice@apple.com>
Subject: Ping! [PATCH]: Tracking and reporting uninitialized variables
Date: Tue, 08 May 2007 16:26:00 -0000 [thread overview]
Message-ID: <717BDA2E-D6FF-4AA5-B857-68BA5B140F5F@apple.com> (raw)
In-Reply-To: <80EE31A6-4DF2-4D1F-B23D-8B814C1E6928@apple.com>
On May 1, 2007, at 5:14 PM, Caroline Tice wrote:
>
> 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!).
>
> Is this patch okay to commit to gdb?
>
> -- Caroline Tice
> ctice@apple.com
>
>
>
> 2007-05-01 Caroline Tice <ctice@apple.com>
>
> * c-valprint.c (c_value_print): If the var_status field of the
> value struct is 0, print out "[uninitialized]" before the
> value.
> * dwarf2expr.c (add_piece): Make function non-static.
> (unsigned_address_type): Likewise.
> (signed_address_type): Likewise.
> (execute_stack_op): Initialize ctx->var_status field; allow
> DW_OP_GNU_uninit as legal op following a DW_OP_reg op or a
> DW_OP_regx op; add case for DW_OP_GNU_uninit and update
> ctx->var_status appropriately.
> * dwarf2expr.h (struct dwarf_expr_context): New field,
> var_status.
> (unsigned_address_type): Add extern declaration.
> (signed_address_type): Likewise.
> (add_piece): Likewise.
> * dwarf2loc.c (dwarf2_evaluate_loc_desc): Add call to
> set_var_status.
> * dwarf2read.c (dwarf_stack_op_name): Add case for
> DW_OP_GNU_uninit.
> (decode_locdesc): Add case for DW_OP_GNU_uninit.
> * value.c (struct value): New field, var_status.
> (allocate_value): Initialize new field.
> (set_var_status): New function.
> (value_var_status): New function.
> * value.h (value_var_status): New extern declaration.
> (set_var_status): Likewise.
> * include/elf/dwarf2.h: (enum dwarf_location_atom): Add new
> DW_OP,
> DW_OP_GNU_uninit.
>
>
> <fsf-gdb-patch.txt>
next prev parent reply other threads:[~2007-05-08 16:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-02 0:14 Caroline Tice
2007-05-02 3:10 ` Eli Zaretskii
[not found] ` <233FDE1A-ABAF-40E9-9799-0B6938D8BE2E@apple.com>
2007-05-03 3:06 ` Eli Zaretskii
2007-05-08 16:26 ` Caroline Tice [this message]
2007-05-09 0:33 ` Ping! " Jim Blandy
2007-05-09 0:38 ` Jim Ingham
2007-05-09 1:09 ` Jim Blandy
2007-05-09 17:36 ` Caroline Tice
2007-05-09 21:04 ` Caroline Tice
2007-05-16 23:35 ` Jim Blandy
2007-05-17 17:18 ` Caroline Tice
2007-05-18 0:00 ` Jim Blandy
2007-05-18 16:38 ` Caroline Tice
2007-05-18 17:05 ` Jim Blandy
2007-05-18 17:14 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=717BDA2E-D6FF-4AA5-B857-68BA5B140F5F@apple.com \
--to=ctice@apple.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox