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 ()