Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: Daniel Berlin <dan@cgsoftware.com>
Cc: gdb-patches@sources.redhat.com, gdb@sources.redhat.com
Subject: Re: [PATCH] Add support for tracking/evaluating dwarf2 location expressions
Date: Wed, 23 May 2001 21:53:00 -0000	[thread overview]
Message-ID: <np4rub1h4t.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <87wv77zym7.fsf@dynamic-addr-83-177.resnet.rochester.edu>

Hey, everyone.  If folks think the general direction we're going here
(explained in my first post to this thread) is not a good idea, speak
now.  Stuff is happening.

Daniel Berlin <dan@cgsoftware.com> writes:
> void init_locexpr (locexpr *);
> void destroy_locexpr (locexpr *);
> void locexpr_push_op  (locexpr, enum locexpr_opcode, const char *, ...);
> void locexpr_get_op (locexpr, unsigned int,  enum locexpr_opcode *);
> void locexpr_get_longest (locexpr, unsigned int, LONGEST *);
> void locexpr_get_ulongest (locexpr, unsigned int, ULONGEST *);
> void locexpr_get_uchar (locexpr, unsigned int, unsigned char *);
> value_ptr evaluate_locexpr (struct symbol *, struct frame_info *, locexpr, struct type *);

GDB tends not to use typedefs, which I think is a good thing.  I think
`struct locexpr' would be better.

There should be a way to efficiently build locexprs in obstacks.

How big are your stack elements?  I think it's very important that the
semantics of a particular string of bytecodes be independent of word
size issues.  That is, if I construct a particular string, I want it
to compute the same values no matter what sort of host I'm running on.
Have you thought about how to ensure that architecturally?  Think
about right shifts, divides, comparisons --- anything that can bring
information down from the upper bits.

> I kept bregx only because we already have a location type for based
> registers, so it seemed to make sense (Admittedly, all it does is take
> us from two opcodes to one for this).

I think it should be deleted.

> fbreg we can't get rid of, we don't necessarily know the frame
> register at debug reading time (it may itself be using a location list
> to say where it is).

Yep, it's its own animal.

> We could get rid of the "default" opcodes deref and xderef, and just
> always use xderef_size and deref_size with an explicit size.

I think we should do that.

> If everyone agrees, i'll write up the docs on these opcodes, and the
> functions to manipulate location expressions.

Yeah, the interface isn't clear to me.  I'm especially curious about
that constructor.  Varargs give me the heebie-jeebies.  I think Andrew
has said he feels the same way.

> Eventually, I'll get rid of all the other location types, but this can
> be done incrementally, so it's no rush at all.

Right, that's where I want to go with this too.  Note that if we do
that, the LOC_* enum encodes information about whether something is an
argument or not (i.e., LOC_ARG vs. LOC_LOCAL, LOC_REGISTER
vs. LOC_REGPARM).  We'll need to encode that information otherhow.


  reply	other threads:[~2001-05-23 21:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-30 11:11 Daniel Berlin
2001-03-30 15:36 ` Andrew Cagney
2001-03-30 18:53   ` Daniel Berlin
2001-04-06 11:53     ` Andrew Cagney
2001-04-06 12:10       ` Daniel Berlin
2001-04-06 12:36         ` Kevin Buettner
2001-04-06 23:18           ` [PATCH] Add support for tracking/evaluating dwarf2 locationexpressions Daniel Berlin
2001-05-21 14:46 ` [PATCH] Add support for tracking/evaluating dwarf2 location expressions Jim Blandy
2001-05-21 18:49   ` Daniel Berlin
2001-05-22 12:46     ` Jim Blandy
2001-05-22 13:51       ` Daniel Berlin
2001-05-22 23:14         ` Jim Blandy
2001-05-23  8:51           ` Daniel Berlin
2001-05-23 11:53           ` Daniel Berlin
2001-05-23 21:53             ` Jim Blandy [this message]
2001-05-23 22:56               ` Daniel Berlin
2001-06-06  9:07   ` Andrew Cagney
2001-06-06  9:46     ` Daniel Berlin
2001-06-07  7:29       ` Andrew Cagney
2001-03-30 13:49 David Taylor
2001-03-30 14:42 ` Daniel Berlin
2001-03-30 15:14   ` Andrew Cagney
2001-03-30 18:44     ` Daniel Berlin
2001-03-30 15:23   ` Elena Zannoni
2001-03-30 15:24   ` Andrew Cagney
2001-03-30 18:46     ` Daniel Berlin
2001-04-06 12:02       ` Andrew Cagney
2001-04-06 12:40         ` Daniel Berlin

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=np4rub1h4t.fsf@zwingli.cygnus.com \
    --to=jimb@zwingli.cygnus.com \
    --cc=dan@cgsoftware.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=gdb@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