From: Ulrich Weigand Date: Fri, 24 Nov 2006 19:54:16 +0000 (+0000) Subject: * config/powerpc/spu-linux.mh: New file. X-Git-Tag: gdb_6_6-2006-12-18-release~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3085c35e77185b5339921721f96f22e2f42212a7;p=thirdparty%2Fbinutils-gdb.git * config/powerpc/spu-linux.mh: New file. * config/spu/spu.mt: New file. * configure.ac: Provide gdb_native configuration variable. * configure: Regenerate. * configure.host: Support powerpc64 to spu 'pseudo-native' mode. * configure.tgt: Add "spu" target_cpu and "spu*-*-*" target. * Makefile.in (spu_tdep_h): New variable. (ALLDEPFILES): Add spu-linux-nat.c and spu-tdep.c (spu-linux-nat.o, spu-tdep.o): Add dependencies. * spu-linux-nat.c: New file. * spu-tdep.c: New file. * spu-tdep.h: New file. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 377db33e280..7a547c7851e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,18 @@ +2006-11-24 Ulrich Weigand + + * config/powerpc/spu-linux.mh: New file. + * config/spu/spu.mt: New file. + * configure.ac: Provide gdb_native configuration variable. + * configure: Regenerate. + * configure.host: Support powerpc64 to spu 'pseudo-native' mode. + * configure.tgt: Add "spu" target_cpu and "spu*-*-*" target. + * Makefile.in (spu_tdep_h): New variable. + (ALLDEPFILES): Add spu-linux-nat.c and spu-tdep.c + (spu-linux-nat.o, spu-tdep.o): Add dependencies. + * spu-linux-nat.c: New file. + * spu-tdep.c: New file. + * spu-tdep.h: New file. + 2006-11-22 Daniel Jacobowitz * osabi.c (gdbarch_lookup_osabi): Do not return diff --git a/gdb/Makefile.in b/gdb/Makefile.in index d28dc0820fc..14fd58bb00d 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -799,6 +799,7 @@ source_h = source.h sparc64_tdep_h = sparc64-tdep.h $(sparc_tdep_h) sparc_nat_h = sparc-nat.h sparc_tdep_h = sparc-tdep.h +spu_tdep_h = spu-tdep.h srec_h = srec.h stabsread_h = stabsread.h stack_h = stack.h @@ -1497,6 +1498,7 @@ ALLDEPFILES = \ sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \ sparc64nbsd-nat.c sparc64nbsd-tdep.c sparc64obsd-tdep.c \ sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \ + spu-linux-nat.c spu-tdep.c \ v850-tdep.c \ vax-nat.c vax-tdep.c vaxbsd-nat.c vaxnbsd-tdep.c \ win32-nat.c \ @@ -2720,6 +2722,15 @@ sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \ $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) $(inferior_h) \ $(symtab_h) $(objfiles_h) $(osabi_h) $(regcache_h) $(target_h) \ $(value_h) $(gdb_assert_h) $(gdb_string_h) $(sparc_tdep_h) +spu-linux-nat.o: spu-linux-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h) \ + $(target_h) $(inferior_h) $(inf_ptrace_h) $(regcache_h) $(symfile_h) \ + $(gdb_wait_h) $(spu_tdep_h) +spu-tdep.o: spu-tdep.c $(defs_h) $(arch_utils_h) $(gdbtypes_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdb_string_h) $(gdb_assert_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(symtab_h) \ + $(symfile_h) $(value_h) $(inferior_h) $(dis_asm_h) $(objfiles_h) \ + $(language_h) $(regcache_h) $(reggroups_h) $(floatformat_h) \ + $(spu_tdep_h) stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \ $(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \ $(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \ diff --git a/gdb/configure b/gdb/configure index e93346f122b..5aa226fad83 100755 --- a/gdb/configure +++ b/gdb/configure @@ -3062,6 +3062,12 @@ subdirs="$subdirs doc testsuite" # configuration. gdb_host_obs=posix-hdep.o +if test "${target}" = "${host}"; then + gdb_native=yes +else + gdb_native=no +fi + . $srcdir/configure.host . $srcdir/configure.tgt @@ -22335,7 +22341,7 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Intrinsic.h. + # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22343,7 +22349,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -22370,7 +22376,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Intrinsic.h"; then + if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi @@ -22391,11 +22397,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -XtMalloc (0) +XrmInitialize () ; return 0; } @@ -22572,7 +22578,7 @@ fi frags= -if test "${target}" = "${host}"; then +if test "${gdb_native}" = "yes"; then host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh if test ! -f ${host_makefile_frag}; then { { echo "$as_me:$LINENO: error: \"*** Gdb does not support native target ${host}\"" >&5 @@ -22604,7 +22610,7 @@ targetfile=`sed -n ' s/DEPRECATED_TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p ' ${target_makefile_frag}` -if test "${target}" = "${host}"; then +if test "${gdb_native}" = "yes"; then # We pick this up from the host configuration file (.mh) because we # do not have a native configuration Makefile fragment. nativefile=`sed -n ' diff --git a/gdb/configure.ac b/gdb/configure.ac index 9b09b94ccb1..b80f7bd68ab 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -81,6 +81,12 @@ AC_CONFIG_SUBDIRS(doc testsuite) # configuration. gdb_host_obs=posix-hdep.o +if test "${target}" = "${host}"; then + gdb_native=yes +else + gdb_native=no +fi + . $srcdir/configure.host . $srcdir/configure.tgt @@ -1420,7 +1426,7 @@ fi AC_SUBST(target_subdir) frags= -if test "${target}" = "${host}"; then +if test "${gdb_native}" = "yes"; then host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh if test ! -f ${host_makefile_frag}; then AC_MSG_ERROR("*** Gdb does not support native target ${host}") @@ -1449,7 +1455,7 @@ targetfile=`sed -n ' s/DEPRECATED_TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p ' ${target_makefile_frag}` -if test "${target}" = "${host}"; then +if test "${gdb_native}" = "yes"; then # We pick this up from the host configuration file (.mh) because we # do not have a native configuration Makefile fragment. nativefile=`sed -n ' diff --git a/gdb/configure.host b/gdb/configure.host index bbfe4985f3d..3615859cc21 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -114,7 +114,13 @@ powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu) gdb_host=nbsd ;; powerpc-*-openbsd*) gdb_host=obsd ;; -powerpc64-*-linux*) gdb_host=ppc64-linux ;; +powerpc64-*-linux*) gdb_host=ppc64-linux + # Support 'pseudo-native' debugging on the Cell BE + if test "${target_cpu}" = "spu"; then + gdb_host=spu-linux + gdb_native=yes + fi + ;; rs6000-*-lynxos*) gdb_host=rs6000lynx ;; rs6000-*-aix4*) gdb_host=aix4 ;; diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 45ff7e2f319..8c4ccb551f8 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -25,6 +25,7 @@ sparc*) gdb_target_cpu=sparc ;; thumb*) gdb_target_cpu=arm ;; s390*) gdb_target_cpu=s390 ;; sh*) gdb_target_cpu=sh ;; +spu*) gdb_target_cpu=spu ;; strongarm*) gdb_target_cpu=arm ;; xscale*) gdb_target_cpu=arm ;; x86_64*) gdb_target_cpu=i386 ;; @@ -209,6 +210,8 @@ sparc-*-rtems*) gdb_target=embed ;; sparc-*-*) gdb_target=sparc ;; sparc64-*-*) gdb_target=sparc64 ;; +spu*-*-*) gdb_target=spu ;; + xstormy16-*-*) gdb_target=xstormy16 ;; v850*-*-elf) gdb_target=v850 ;;