From: Jim Blandy <jimb@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: Location list support for DWARF-2
Date: Wed, 09 Apr 2003 05:05:00 -0000 [thread overview]
Message-ID: <vt2he98cl9e.fsf@zenia.red-bean.com> (raw)
In-Reply-To: <20030312224043.GA8247@nevyn.them.org>
This looks good to me --- please commit it, once you've addressed the
minor things I mention here.
(Yay!)
Daniel Jacobowitz <drow@mvista.com> writes:
> > Rather than putting 'if (foo->is_list)' everywhere, why not just
> > introduce a separate 'struct location_funcs' for location lists?
> > Aside from just being cleaner, you'll save a word in each baton.
>
> Actually, it won't save any space to remove is_list: it goes into the
> padding between size and the following CORE_ADDR/pointer. It does save
> space for non-location-list variables though, because of the base
> address, so I think it's a good idea.
Okay, I think that's a big improvement.
> It requires introducing one annoying hack in dwarf_expr_frame_base
> but I'm not terribly upset by it.
I can think of a nice solution in C++, but it would lose so much in
the translation to C that it's not worth it.
> +struct dwarf2_loclist_baton
> +{
> + CORE_ADDR base_address;
> + unsigned char *data;
> + unsigned short size;
> + struct objfile *objfile;
> +};
The fields of this structure need to be documented, as do those of
dwarf2_locexpr_baton.
> + {
> + dwarf2_invalid_attrib_class_complaint ("location description",
> + SYMBOL_NATURAL_NAME (sym));
> + baton->size = 0;
> + baton->data = NULL;
> + }
dwarf2_evaluate_loc_desc isn't prepared to handle this; it'll get an
error when it tries to fetch the top value off the stack after
evaluating no location instructions, won't it? It should probably
return a value with its "optimized_out" flag set.
next prev parent reply other threads:[~2003-04-09 5:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-10 16:06 Daniel Jacobowitz
2003-03-12 21:40 ` Jim Blandy
2003-03-12 22:42 ` Daniel Jacobowitz
2003-04-08 16:46 ` Daniel Jacobowitz
2003-04-09 5:05 ` Jim Blandy [this message]
2003-04-13 15:43 ` 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=vt2he98cl9e.fsf@zenia.red-bean.com \
--to=jimb@redhat.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.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