From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17601 invoked by alias); 14 Feb 2003 13:46:29 -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 17486 invoked from network); 14 Feb 2003 13:46:18 -0000 Received: from unknown (HELO localhost.redhat.com) (193.41.215.82) by 172.16.49.205 with SMTP; 14 Feb 2003 13:46:18 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 099FF3CF1; Fri, 14 Feb 2003 02:15:34 +0100 (CET) Message-ID: <3E4C4336.1080706@redhat.com> Date: Fri, 14 Feb 2003 13:46:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Warkentin Cc: gdb@sources.redhat.com Subject: Re: How to know which processor I'm targetting at runtime References: <034301c2d208$ec67eb80$0202040a@catdog> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00227.txt.bz2 > I have some ugly code that relies on a define from one of our > config/arch/tm*.h files. Essentially we're just doing: > > #define SOLIB_PROCESSOR [x86|mips|arm....] > > so that we can do some setup elsewhere. Is there a nice way to get which > architecture I'm running at runtime? I'd like to get rid of our tm files if > possible. gdbarch_bfd_arch_info (current_gdbarch) returns a `struct bfd_arch_info' which contains everything you need. Andrew