Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Stan Shebs <stan@codesourcery.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: msnyder@specifix.com, gdb@sourceware.org
Subject: Re: Address spaces
Date: Fri, 25 Jul 2008 19:24:00 -0000	[thread overview]
Message-ID: <488A25C9.3010601@codesourcery.com> (raw)
In-Reply-To: <200807251849.m6PIncKC025419@brahms.sibelius.xs4all.nl>

Mark Kettenis wrote:
>> Date: Fri, 25 Jul 2008 11:22:11 -0700
>> From: Stan Shebs <stanshebs@earthlink.net>
>>
>> Michael Snyder wrote:
>>     
>>> Anyway, the idea of making CORE_ADDR a struct has been 
>>> around for a long time.  We've done our best to avoid it, 
>>> but sort of always known it would come back one day.
>>>   
>>>       
>> Where my prototyping is evolving is to have a new type of object that is 
>> the struct, tentatively called "target address", consisting of address 
>> space + CORE_ADDR. From poking through all the references to CORE_ADDR, 
>> it looks to me like 90%+ have an implicit single address space, so 
>> structifying seems like an unnecessary nuisance. For instance, when 
>> you're doing prologue analysis you're only going to be working in the 
>> one address space (at least for non-Harvard). So I'm thinking higher 
>> levels will pass around target addresses in a mostly-opaque way, then 
>> when one gets down to working on a specific program / address space, the 
>> CORE_ADDRs are extracted and used much as they are now.
>>
>> While not as abstractly elegant as making all addresses into objects 
>> right off, it doesn't preclude us from going in that direction; someone 
>> who wants to make a subsystem use target addresses instead of CORE_ADDRs 
>> throughout could do so.
>>     
>
> Did you consider extending 'struct ptid' with an adress space
> identifier?  In a way, POSIX processes already correspond to an
> address space, and the ptid is likely to be available in many places
> where you need to make the distinction.
>   
Struct ptid is handy, but by nature it's tied to running inferiors, 
seems like it would be a little out of place if we needed it to to look 
at execs and symbol files before running.

Stan


  reply	other threads:[~2008-07-25 19:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24  0:14 Stan Shebs
2008-07-24  0:30 ` Doug Evans
2008-07-24  6:15   ` Stan Shebs
2008-07-24 15:56     ` Ulrich Weigand
2008-07-24 18:17       ` Stan Shebs
2008-07-24 18:28         ` Doug Evans
2008-07-25  5:52           ` Michael Snyder
2008-07-25  8:50           ` Jeremy Bennett
2008-07-24 20:31         ` Ulrich Weigand
2008-07-25 18:50           ` Stan Shebs
2008-07-25  3:31       ` Michael Snyder
2008-07-24 21:49     ` Paul Pluzhnikov
2008-07-25  3:29     ` Michael Snyder
2008-07-25 18:32       ` Stan Shebs
2008-07-25 19:13         ` Mark Kettenis
2008-07-25 19:24           ` Stan Shebs [this message]
2008-07-31 18:43 ` Andrew Cagney

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=488A25C9.3010601@codesourcery.com \
    --to=stan@codesourcery.com \
    --cc=gdb@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=msnyder@specifix.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