From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21621 invoked by alias); 5 Sep 2002 23:29:36 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21605 invoked from network); 5 Sep 2002 23:29:35 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 5 Sep 2002 23:29:35 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 5B2ACD2CC1; Thu, 5 Sep 2002 16:29:35 -0700 (PDT) Date: Thu, 05 Sep 2002 16:29:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: native or target? Message-ID: <20020905232935.GF1194@gnat.com> References: <20020905232440.GV1169@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020905232440.GV1169@gnat.com> User-Agent: Mutt/1.4i X-SW-Source: 2002-09/txt/msg00076.txt.bz2 Hello, I have read the gdbint documentation, but still sometimes have some difficulties deciding where some of the pieces of code should be going. Should be -nat, or -tdep? Difficult to say sometimes. Can anyone help me? I think part of it is due to the fact that I don't have a clear definition of what a native port is. I suppose native is when host and target are the same? I don't have a recent cross-debugger handy to check that: if I am running on a x86-linux machine cross ppc, is the code in i386-nat.c used? Let's take an example of where I am confused: On interix, the PC_IN_SIGTRAMP method works by comparing the PC address against a set of addresses. These addresses are actually to computed at the time when the comparison is made, but were cached earlier. One of the places where these addresses are computed is in the procfs module (ie we deduct these addresses from the proc info). Right now, our code looks like this: proc_get_status (procinfo *pi) { [a. normal processing] #ifdef __INTERIX [b. compute sigtramp-related addresses from proc info] #endif [c. rest of normal processing] } I would like to move the code in [b.] to the right place, and then remplace the #ifdef __INTERIX section by the proper runtime test. But I am confused as to where the right place for this code would be. On one hand the procinfo stuff seem to pertain to the native side (hence the -nat module), but on the other hand, the addresses themselves belong to the interix-tdep module... What would you do? Or maybe the approach of caching the addresses from the proc information is not viable in the current GDB architecture? Thanks, -- Joel