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: Sat, 12 Sep 2009 00:40:00 -0000 [thread overview]
Message-ID: <e394668d0909111739g6581b264lb661a96266bd228@mail.gmail.com> (raw)
In-Reply-To: <e394668d0909111623o5f78ede7t5041bdb5052481ba@mail.gmail.com>
On Fri, Sep 11, 2009 at 4:23 PM, Doug Evans<dje@google.com> wrote:
> On Fri, Sep 11, 2009 at 2:19 PM, Doug Evans<dje@google.com> wrote:
>>>Tom Tromey wrote:
>>>[...]
>>> It seems to me that the inferior-stack-ness of a value must be an
>>> attribute carried alongside the value on the dwarf stack.
>>>[...]
>>
>> Yeah, I was wondering about this. [It's what prompted my question on IRC.]
>
> How about this?
>
> 2009-09-11 Doug Evans <dje@google.com>
>
> * dwarf2expr.h (dwarf_value_location): Add more comments describing
> enum values.
> (struct dwarf_stack_value): New struct.
> (struct dwarf_expr_context): Change type of `stack' from CORE_ADDR*
> to structd dwarf_stack_value*.
> (struct dwarf_expr_piece): Move `v.value' into its own struct, v.expr,
> all uses updated.
> Add v.expr.in_stack_memory.
> (dwarf_expr_push): Update declaration.
> (dwarf_expr_fetch_in_stack_memory): Declare.
> * dwarf2expr.c (dwarf_expr_grow_stack): Update calculation of
> size of stack value.
> (dwarf_expr_push): New arg in_stack_memory, all callers updated.
> (dwarf_expr_fetch_in_stack_memory): New function.
> (add_piece): Set in_stack_memory for non-literal values.
> (execute_stack_op, case DW_OP_fbreg): Call dwarf_expr_push ourselves,
> mark value as in stack memory.
> (execute_stack_op, case DW_OP_call_frame_cfa): Ditto.
> (execute_stack_op, cases DW_OP_swap, DW_OP_rot): Update type of
> dwarf stack value.
> * dwarf2loc.c (read_pieced_value): Call read_stack for values known
> to be on the program's stack.
> (dwarf2_evaluate_loc_desc, case DWARF_VALUE_MEMORY): Call
> set_value_stack only for objects known to be in stack memory.
> * dwarf2-frame.c (execute_stack_op): New arg initial_in_stack_memory,
> all callers updated.
>
For completeness' sake ...
Yeah, I don't propagate in_stack_memory for DW_OP_dup, etc. etc.
If ya like the basic idea, I'll add in all the other details.
next prev parent reply other threads:[~2009-09-12 0:40 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
2009-09-11 23:23 ` Doug Evans
2009-09-12 0:40 ` Doug Evans [this message]
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=e394668d0909111739g6581b264lb661a96266bd228@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