From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18387 invoked by alias); 11 May 2003 15:35:34 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 18375 invoked from network); 11 May 2003 15:35:28 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 11 May 2003 15:35:28 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 241162B2F; Sun, 11 May 2003 11:35:28 -0400 (EDT) Message-ID: <3EBE6DC0.8070807@redhat.com> Date: Sun, 11 May 2003 15:35:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Liang, James" Cc: "'gdb@sources.redhat.com'" Subject: Re: question about target.to_stratum References: <71251C7D5FB1D2119C8F0008C7A44ED103792080@es07snlnt.sandia.gov> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00197.txt.bz2 > What is the meaning and use of to_stratum? What is it used to represent? The idea was that the target was made up of a number of layers and the user could move between them. For instance: - threads - core file - the executable file If gdb needed to read the target's memory, it was able to work its way down the stratum until it found one that could furnish the request. A read of the text segment, in the above, would end up being handled by the executable/file stratum. The benefit was that the user could change stratum layers (e.g., replace "core file" with "live process") and consequently switch between conceptual targets (did that make sense?). It turned out though, that things are more complicated than this. Instead of a few simple layers a directed graph is involved vis: .-< core file <- thread layer / exe \ `-< live process <- thread layer Unfortunatly, the current target infrastructure isn't up to this. GDB needs to instead allow multiple active targets. Allowing multiple active threads, targets, and address spaces are all on the "things to do today list" ... On a bright note, frames, register cache and architecture were also all once on that list. > I noticed that the push_target function in target.c closes existing targets > of the same stratum. If my user types > target after starting up, this always causes it to close the target > that I am trying to push because they both have the same stratum. > I looked at the way exec does it, and I can tell that it changes the stratum > to dummy before calling push again, but I don't see where. How does this > work? That I don't know. Andrew