Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] better dwarf checking for values on the stack
Date: Fri, 11 Sep 2009 21:19:00 -0000	[thread overview]
Message-ID: <e394668d0909111419q34f4848dhf5e3fde307b274a8@mail.gmail.com> (raw)
In-Reply-To: <m3d45xgvx9.fsf@fleche.redhat.com>

On Fri, Sep 11, 2009 at 11:48 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@google.com> writes:
>
> Doug> 2009-09-10  Doug Evans  <dje@google.com>
> Doug>   Add better checking for values on stack.
> Doug>   * dwarf2expr.h (dwarf_value_location): Rename DWARF_VALUE_STACK to
> Doug>   DWARF_VALUE_DWARF_STACK, all uses updated.
> Doug>   New enum DWARF_VALUE_MEMORY_STACK.
> Doug>   * dwarf2expr.c (execute_stack_op, case DW_OP_fbreg): Mark location
> Doug>   as DWARF_VALUE_MEMORY_STACK.
> Doug>   (execute_stack_op, case DW_OP_call_frame_cfa): Ditto.
> Doug>   (execute_stack_op, cases DW_OP_deref, DW_OP_deref_size): Mark
> Doug>   location as DWARF_VALUE_MEMORY.
> Doug>   (execute_stack_op, case DW_OP_piece): Remove unused addr_or_regnum.
>
> I think the tracking idea is sound, but I think this implementation has
> a flaw.
>
> It seems to me that the inferior-stack-ness of a value must be an
> attribute carried alongside the value on the dwarf stack.
>
> Here's a really bogus example that I hope still shows what I mean:
>
>  DW_OP_call_frame_cfa
>  DW_OP_deref
>  DW_OP_call_frame_cfa
>  DW_OP_drop
>
> After the drop, ctx->location will be DWARF_VALUE_MEMORY_STACK.
> However, this is incorrect.
>
> Tom
>

Yeah, I was wondering about this.  [It's what prompted my question on IRC.]


  reply	other threads:[~2009-09-11 21:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-10 23:21 Doug Evans
2009-09-11 18:48 ` Tom Tromey
2009-09-11 21:19   ` Doug Evans [this message]
2009-09-11 23:23     ` Doug Evans
2009-09-12  0:40       ` Doug Evans
2009-09-14 17:54       ` Tom Tromey
2009-09-14 23:04         ` Doug Evans
2009-09-15 16:05           ` Tom Tromey
2009-09-15 16:10             ` Joel Brobecker
2009-09-15 16:22               ` Doug Evans
2009-09-15 20:20           ` Cary Coutant
2009-09-15 20:36             ` Doug Evans
2009-09-15 20:47               ` Cary Coutant

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=e394668d0909111419q34f4848dhf5e3fde307b274a8@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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