public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* ``struct location''
@ 2002-07-08 20:00 Andrew Cagney
  2002-07-08 20:53 ` Daniel Berlin
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2002-07-08 20:00 UTC (permalink / raw)
  To: gdb

Hello,

This is a hunch.

I think there should be a ``struct location'' object to go with the 
``struct type'' object.  The ``struct value'' object would then be made 
of, the TYPE, LOCATION and, once the value has been read from memory, 
its VALUE.

This would make it possible for location expression evaluators and 
similar (e.g., unwind functions describing register locations) to return 
a ``location'' without any need to refer to types.

Having the location as an abstraction would also make it possible for 
GDB's ``location'' code to evolve independantly of the ``struct value'' 
- this is something we know we need since at present GDB can't describe 
things like values with a location that spreads across multiple 
registers and memory.

thoughts?
Andrew

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ``struct location''
  2002-07-08 20:00 ``struct location'' Andrew Cagney
@ 2002-07-08 20:53 ` Daniel Berlin
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Berlin @ 2002-07-08 20:53 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb


On Monday, July 8, 2002, at 10:59  PM, Andrew Cagney wrote:

> Hello,
>
> This is a hunch.
>
> I think there should be a ``struct location'' object to go with the 
> ``struct type'' object.  The ``struct value'' object would then be 
> made of, the TYPE, LOCATION and, once the value has been read from 
> memory, its VALUE.

>
> This would make it possible for location expression evaluators and 
> similar (e.g., unwind functions describing register locations) to 
> return a ``location'' without any need to refer to types.
>

> Having the location as an abstraction would also make it possible for 
> GDB's ``location'' code to evolve independantly of the ``struct 
> value'' - this is something we know we need since at present GDB can't 
> describe things like values with a location that spreads across 
> multiple registers and memory.
>


> thoughts?
>
Were you gone during April (seriously)?
Check the mailing list archives.

The whole loc_computed patch I submitted was the result of a discussion 
on how to do this.

that's what the struct location_funcs are meant to do.

"
/* A structure of function pointers describing the location of a
    variable, structure member, or structure base class.
"
> Andrew
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-09  3:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-08 20:00 ``struct location'' Andrew Cagney
2002-07-08 20:53 ` Daniel Berlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).