From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3645 invoked by alias); 10 Jul 2003 04:57:35 -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 3638 invoked from network); 10 Jul 2003 04:57:34 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by sources.redhat.com with SMTP; 10 Jul 2003 04:57:34 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva.cipe.redhat.com [10.0.1.10]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h6A4vXK18404 for ; Thu, 10 Jul 2003 00:57:33 -0400 Received: from free.redhat.lsd.ic.unicamp.br (free.redhat.lsd.ic.unicamp.br [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.9/8.12.9) with ESMTP id h6A4vWhN026140 for ; Thu, 10 Jul 2003 01:57:32 -0300 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.9/8.12.9/Submit) id h6A4vVgc026136; Thu, 10 Jul 2003 01:57:31 -0300 To: gdb-patches@sources.redhat.com Subject: Re: AM33/2.0 support for mn10300-elf References: From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Thu, 10 Jul 2003 04:57:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2003-07/txt/msg00207.txt.bz2 --=-=-= Content-length: 403 On Jul 10, 2003, Alexandre Oliva wrote: > This patch introduces support for AM33/2.0, that adds a > single-precision floating-point unit to AM33. The GCC and binutils > corresponding patches are already in the corresponding CVS trees; > newlib has just been posted for review. Ok to install? And this is the patch that introduces am33_2.0-unknown-linux-gnu support in GDB. Ok? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gdb-am33linux.patch Content-length: 6217 Index: sim/ChangeLog from Alexandre Oliva 2001-08-07 Michael Keezer * configure.in (target): Add am33_2.0 to mn10300 case * configure: Rebuild. Index: sim/configure =================================================================== RCS file: /cvs/uberbaum/sim/configure,v retrieving revision 1.10 diff -u -p -r1.10 configure --- sim/configure 13 Apr 2003 16:44:57 -0000 1.10 +++ sim/configure 10 Jul 2003 04:13:00 -0000 @@ -1441,7 +1441,7 @@ case "${target}" in only_if_gcc=yes extra_subdirs="${extra_subdirs} igen" ;; - mn10300*-*-*) + mn10300*-*-* | am33_2.0*-*-*) # The mn10300 simulator can only be compiled by gcc. sim_target=mn10300 only_if_gcc=yes Index: sim/configure.in =================================================================== RCS file: /cvs/uberbaum/sim/configure.in,v retrieving revision 1.11 diff -u -p -r1.11 configure.in --- sim/configure.in 13 Apr 2003 16:44:57 -0000 1.11 +++ sim/configure.in 10 Jul 2003 04:13:00 -0000 @@ -80,7 +80,7 @@ case "${target}" in only_if_gcc=yes extra_subdirs="${extra_subdirs} igen" ;; - mn10300*-*-*) + mn10300*-*-* | am33_2.0*-*-*) # The mn10300 simulator can only be compiled by gcc. sim_target=mn10300 only_if_gcc=yes Index: gdb/ChangeLog from Alexandre Oliva 2002-02-25 Jackie Smith Cashion * configure.tgt (am33_2.0*-*-*_): Remove unused target. From Kevin Buettner : * configure.tgt (am33_2.0*-*-linux*): New target. * mn10300-tdep.c (solib-svr4.h): Include. (mn10300_linux_svr4_fetch_link_map_offsets): New function. * config/mn10300/linux.mt: New file. * config/mn10300/tm-linux.h: New file. 2001-08-07 Michael Keezer * configure.tgt: put blank line after target_cpu case. 2001-08-07 Michael Keezer * configure.tgt: Add am33_2.0 target_cpu & target. Index: gdb/configure.tgt =================================================================== RCS file: /cvs/uberbaum/gdb/configure.tgt,v retrieving revision 1.107 diff -u -p -r1.107 configure.tgt --- gdb/configure.tgt 13 Jun 2003 17:49:49 -0000 1.107 +++ gdb/configure.tgt 10 Jul 2003 04:13:37 -0000 @@ -12,6 +12,7 @@ case "${target_cpu}" in +am33_2.0*) gdb_target_cpu=mn10300 ;; alpha*) gdb_target_cpu=alpha ;; arm*) gdb_target_cpu=arm ;; avr*) gdb_target_cpu=avr ;; @@ -176,6 +177,7 @@ mips*-*-*) gdb_target=embed ;; # OBSOLETE mn10200-*-*) gdb_target=mn10200 ;; mn10300-*-*) gdb_target=mn10300 ;; +am33_2.0*-*-linux*) gdb_target=linux ;; none-*-*) gdb_target=none ;; Index: gdb/config/mn10300/linux.mt =================================================================== RCS file: gdb/config/mn10300/linux.mt diff -N gdb/config/mn10300/linux.mt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gdb/config/mn10300/linux.mt 10 Jul 2003 04:13:39 -0000 @@ -0,0 +1,6 @@ +# Target: Matsushita mn10300 running Linux +TDEPFILES= mn10300-tdep.o solib.o solib-svr4.o +TM_FILE= tm-linux.h + +SIM_OBS = remote-sim.o +SIM = ../sim/mn10300/libsim.a Index: gdb/config/mn10300/tm-linux.h =================================================================== RCS file: gdb/config/mn10300/tm-linux.h diff -N gdb/config/mn10300/tm-linux.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gdb/config/mn10300/tm-linux.h 10 Jul 2003 04:13:39 -0000 @@ -0,0 +1,60 @@ +/* Target definitions for Matsushita AM33-2 processor running Linux. + Copyright 2002 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* The mn10300 target is fully multi-arched and, therefore, does not have + a "tm" file. The mn10300 target does not support Linux shared libraries. + At this time shared library support and full multi-arch support are + mutually exclusive. + + The AM33-2 target does support Linux shared libraries and, therefore, must + be only partially multi-arched. This allows the specification of this "tm" + file from which the generic tm-linux.h is included (which, in turn, + includes the required solib.h). + + Notice that gdb/configure.tgt sets the following: + + target_cpu == mn10300: target_cpu == am33_2.0*-*-linux*: + gdb_target_cpu=mn10300 gdb_target_cpu=mn10300 + gdb_target=mn10300 gdb_target=linux + gdb_target == mn10300: gdb_target == linux: + gdb_multi_arch=yes gdb_multi_arch= + +This causes the mn10300 target to look in gdb/config/mn10300 for mn10300.mt +and specifies that this target is fully multi-arched. And it causes the AM33-2 +target to look in that same directory for linux.mt. Since gdb_multi_arch is +not defined for this target, linux.mt can specify the TM_FILE symbol pointing +to gdb/config/mn10300/tm-linux.h (this file). */ + +/* Pull in generic linux definitions. */ +#include "tm-linux.h" + +/* Set the multi-arch level to "partial". */ +#define GDB_MULTI_ARCH 1 + +/* Use target_specific function to define link map offsets. + Specify this function here with a #define instead of calling + set_solib_svr4_fetch_link_map_offsets in mn10300_gdbarch_init. + This keeps this functionality isolated to the am33_2.0-linux-gnu target. + mn10300-elf targets cannot call set_solib_svr4_fetch_link_map_offsets + because solib-svr4.c is not linked in for them. */ + +extern struct link_map_offsets *mn10300_linux_svr4_fetch_link_map_offsets (void); +#define SVR4_FETCH_LINK_MAP_OFFSETS() mn10300_linux_svr4_fetch_link_map_offsets () --=-=-= Content-length: 289 -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer --=-=-=--