From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>,
gdb-patches@sourceware.org
Subject: Re: [RFA 3/5] Use std::string, std::vector in rust-lang.c
Date: Fri, 23 Sep 2016 16:15:00 -0000 [thread overview]
Message-ID: <a2520bfc-a5f6-4b1c-f754-0a750a902c1f@redhat.com> (raw)
In-Reply-To: <8737kq1urb.fsf@tromey.com>
On 09/23/2016 04:49 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> There's a GNU extension that I think is meant to make it possible
> Pedro> for the debugger to treat uninitialized variables
> Pedro> specially (DW_OP_GNU_uninit), though I don't think we do
> Pedro> much with it.
>
> There were never any docs for it :(
I think all there is the original gcc and gdb patches:
https://gcc.gnu.org/ml/gcc-patches/2007-05/msg00068.html
I remember seeing these back then, but I was still a gdb noob then.
I don't recall the history of the feature after that. From a quick look,
it kind of looks like some pieces of the patches are in the respective
trees, but not all hunks. Maybe they got in, and then mostly reverted.
Thanks,
Pedro Alves
> I think it probably should have been a piece-terminating operation but
> it was never clear if this was how it was actually supposed to work.
> I stuck a comment in dwarf_expr_require_composition to this effect back
> in the day.
>
> Pedro> Not sure gcc emits it, even.
>
> It does, but I don't know under what conditions.
> There's code in dwarf2out.c like:
>
> if (initialized == VAR_INIT_STATUS_UNINITIALIZED)
> add_loc_descr (&result, new_loc_descr (DW_OP_GNU_uninit, 0, 0));
>
> I don't know when that happens though.
>
> Perhaps this could be cleaned up a bit, say by making DW_OP_GNU_uninit a
> piece terminator (I forget the official term here) and by changing gcc
> to emit a location list that indicates that the object is uninitialized
> until after the constructor is run. It might be a little friendlier to
> users, dunno.
>
> Tom
>
next prev parent reply other threads:[~2016-09-23 16:14 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 17:51 [RFA 0/5] Some random C++-ification Tom Tromey
2016-09-22 17:51 ` [RFA 1/5] Use std::string in break-catch-sig.c Tom Tromey
2016-09-23 13:17 ` Yao Qi
2016-09-22 17:51 ` [RFA 3/5] Use std::string, std::vector in rust-lang.c Tom Tromey
2016-09-22 19:03 ` Pedro Alves
2016-09-22 19:24 ` Tom Tromey
2016-09-22 19:35 ` Pedro Alves
2016-09-22 20:37 ` Pierre Muller
[not found] ` <57e4328a.c3c4620a.59d5b.803fSMTPIN_ADDED_BROKEN@mx.google.com>
2016-09-23 9:44 ` Pedro Alves
2016-09-23 15:56 ` Tom Tromey
2016-09-23 16:15 ` Pedro Alves [this message]
2016-09-22 17:51 ` [RFA 2/5] Use std::string in cp-namespace.c Tom Tromey
2016-09-22 19:08 ` Pedro Alves
2016-09-22 20:56 ` Tom Tromey
2016-09-22 17:51 ` [RFA 4/5] Use std::vector in objfiles.c Tom Tromey
2016-09-22 19:03 ` [RFA 5/5] Use std::string rather than dyn-string Tom Tromey
2016-09-22 19:10 ` [RFA 0/5] Some random C++-ification Pedro Alves
2016-09-22 19:15 ` Pedro Alves
2016-09-22 23:10 ` Trevor Saunders
2016-09-23 15:47 ` Tom Tromey
2016-09-23 15:49 ` Pedro Alves
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=a2520bfc-a5f6-4b1c-f754-0a750a902c1f@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
--cc=tom@tromey.com \
/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