for all mips*-*-ecoff or elf configurations.
* configure: Regenerate using autoconf 2.4.
* config/mips/{idt*.mt,tm-idt*.h}: Rename to "idt" part of the
name to "embed". Build remote-array.o along with IDT protocols.
* remote-array.c: Nuke setting the serial port to 4800 baud.
bigmips64.mt
decstation.mh
decstation.mt
-idt.mt
-idt64.mt
-idtl.mt
-idtl64.mt
+embed.mt
+embed64.mt
+embedl.mt
+embedl64.mt
irix3.mh
irix3.mt
irix4.mh
riscos.mh
tm-bigmips.h
tm-bigmips64.h
-tm-idt.h
-tm-idt64.h
-tm-idtl.h
-tm-idtl64.h
+tm-embed.h
+tm-embed64.h
+tm-embedl.h
+tm-embedl64.h
tm-irix3.h
tm-irix5.h
tm-mips.h
--- /dev/null
+# Target: Big-endian mips board, typically an IDT.
+TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
+TM_FILE= tm-embed.h
--- /dev/null
+# Target: Big-endian mips board, typically an IDT.
+TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
+TM_FILE= tm-embed64.h
--- /dev/null
+# Target: Big-endian mips board, typically an IDT.
+TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
+TM_FILE= tm-embedl.h
--- /dev/null
+# Target: Big-endian mips board, typically an IDT.
+TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
+TM_FILE= tm-embedl64.h
+++ /dev/null
-# Target: Big-endian IDT board.
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-idt.h
+++ /dev/null
-# Target: Big-endian IDT board.
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-idt64.h
+++ /dev/null
-# Target: Big-endian IDT board.
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-idtl.h
+++ /dev/null
-# Target: Big-endian IDT board.
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-idtl64.h
--- /dev/null
+/* Copyright (C) 1993 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. */
+
+#define TARGET_BYTE_ORDER_SELECTABLE
+
+#include "mips/tm-bigmips.h"
+
+#undef DEFAULT_MIPS_TYPE
+#define DEFAULT_MIPS_TYPE "r3051"
+
+/* start-sanitize-gm */
+#ifdef GENERAL_MAGIC
+
+#include "tm-magic.h" /* Include generic stuff */
+
+/* For some reason GM can't hack this... */
+
+#undef GET_LONGJMP_TARGET
+
+/* Watchpoint support */
+
+#define TARGET_HAS_HARDWARE_WATCHPOINTS
+
+#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
+ (1 == 1) /* We allow all types of hardware watchpoints */
+
+/* Use these macros for watchpoint insertion/deletion. */
+/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
+
+#define target_insert_watchpoint(addr, len, type) \
+ remote_mips_set_watchpoint (addr, len, type)
+
+#define target_remove_watchpoint(addr, len, type) \
+ remote_mips_remove_watchpoint (addr, len, type)
+
+/* We need to remove watchpoints when stepping, else we hit them again! */
+
+#define HAVE_NONSTEPPABLE_WATCHPOINT
+
+#define STOPPED_BY_WATCHPOINT(w) remote_mips_stopped_by_watchpoint ()
+
+#define FLUSH_CACHED_MEMORY() flush_cached_memory()
+
+#endif /* GENERAL_MAGIC */
+/* end-sanitize-gm */
--- /dev/null
+/* Copyright (C) 1993 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. */
+
+#define TARGET_BYTE_ORDER_SELECTABLE
+
+#include "mips/tm-bigmips64.h"
--- /dev/null
+/* Copyright (C) 1993 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. */
+
+#define TARGET_BYTE_ORDER_SELECTABLE
+
+#include "mips/tm-mips.h"
--- /dev/null
+/* Copyright (C) 1993 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. */
+
+#define TARGET_BYTE_ORDER_SELECTABLE
+
+#include "mips/tm-mips64.h"
+++ /dev/null
-/* Copyright (C) 1993 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. */
-
-#define TARGET_BYTE_ORDER_SELECTABLE
-
-#include "mips/tm-bigmips.h"
-
-#undef DEFAULT_MIPS_TYPE
-#define DEFAULT_MIPS_TYPE "r3051"
-
-/* start-sanitize-gm */
-#ifdef GENERAL_MAGIC
-
-#include "tm-magic.h" /* Include generic stuff */
-
-/* For some reason GM can't hack this... */
-
-#undef GET_LONGJMP_TARGET
-
-/* Watchpoint support */
-
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
-
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
- (1 == 1) /* We allow all types of hardware watchpoints */
-
-/* Use these macros for watchpoint insertion/deletion. */
-/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
-
-#define target_insert_watchpoint(addr, len, type) \
- remote_mips_set_watchpoint (addr, len, type)
-
-#define target_remove_watchpoint(addr, len, type) \
- remote_mips_remove_watchpoint (addr, len, type)
-
-/* We need to remove watchpoints when stepping, else we hit them again! */
-
-#define HAVE_NONSTEPPABLE_WATCHPOINT
-
-#define STOPPED_BY_WATCHPOINT(w) remote_mips_stopped_by_watchpoint ()
-
-#define FLUSH_CACHED_MEMORY() flush_cached_memory()
-
-#endif /* GENERAL_MAGIC */
-/* end-sanitize-gm */
+++ /dev/null
-/* Copyright (C) 1993 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. */
-
-#define TARGET_BYTE_ORDER_SELECTABLE
-
-#include "mips/tm-bigmips64.h"
+++ /dev/null
-/* Copyright (C) 1993 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. */
-
-#define TARGET_BYTE_ORDER_SELECTABLE
-
-#include "mips/tm-mips.h"
+++ /dev/null
-/* Copyright (C) 1993 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. */
-
-#define TARGET_BYTE_ORDER_SELECTABLE
-
-#include "mips/tm-mips64.h"
-CC=${CC-cc}
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 502 "configure"
+#line 501 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 516 "configure"
+#line 515 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
echo $ac_n "checking for AIX""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 543 "configure"
+#line 542 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 570 "configure"
+#line 569 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
-#line 895 "configure"
+#line 894 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 916 "configure"
+#line 915 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 938 "configure"
+#line 937 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 956 "configure"
+#line 955 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_cv_header_stdc=no
else
cat > conftest.$ac_ext <<EOF
-#line 977 "configure"
+#line 976 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1014 "configure"
+#line 1013 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1047 "configure"
+#line 1046 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
ac_cv_func_mmap=no
else
cat > conftest.$ac_ext <<EOF
-#line 1105 "configure"
+#line 1104 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test. */
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
cat > conftest.$ac_ext <<EOF
-#line 1324 "configure"
+#line 1323 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1387 "configure"
+#line 1386 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lICE $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1505 "configure"
+#line 1504 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1548 "configure"
+#line 1547 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1582 "configure"
+#line 1581 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1621 "configure"
+#line 1620 "configure"
#include "confdefs.h"
int main() { return 0; }
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1659 "configure"
+#line 1658 "configure"
#include "confdefs.h"
int main() { return 0; }
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1716 "configure"
+#line 1715 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1818 "configure"
+#line 1817 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
mips*-big-*) gdb_target=bigmips ;;
mips*-dec-mach3*) gdb_target=mach3 ;;
mips*-dec-*) gdb_target=decstation ;;
-mips64*el-*-ecoff*) gdb_target=idtl64 ;;
-mips64*-idt-ecoff*) gdb_target=idt64 ;;
+mips64*el-*-ecoff*) gdb_target=embedl64 ;;
+mips64*-*-ecoff*) gdb_target=embed64 ;;
mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
-mips64*el-*-elf*) gdb_target=idtl64 ;;
-mips64*-*-elf*) gdb_target=idt64 ;;
-mips*el-*-ecoff*) gdb_target=idtl ;;
-mips*-*-ecoff*) gdb_target=idt ;;
+mips64*el-*-elf*) gdb_target=embedl64 ;;
+mips64*-*-elf*) gdb_target=embed64 ;;
+mips*el-*-ecoff*) gdb_target=embedl ;;
+mips*-*-ecoff*) gdb_target=embed ;;
# start-sanitize-gm
-mips*-*-magic*) gdb_target=idt ;;
+mips*-*-magic*) gdb_target=embed ;;
# end-sanitize-gm
-mips*el-*-elf*) gdb_target=idtl ;;
-mips*-*-elf*) gdb_target=idt ;;
+mips*el-*-elf*) gdb_target=embedl ;;
+mips*-*-elf*) gdb_target=embed ;;
mips*-little-*) gdb_target=littlemips ;;
mips*-sgi-irix5*) gdb_target=irix5 ;;
mips*-sgi-*) gdb_target=irix3 ;;
AC_PREREQ(2.3)dnl
AC_INIT(main.c)
-CC=${CC-cc}
AC_PROG_CC
AC_AIX
AC_MINIX
mips*-big-*) gdb_target=bigmips ;;
mips*-dec-mach3*) gdb_target=mach3 ;;
mips*-dec-*) gdb_target=decstation ;;
-mips64*el-*-ecoff*) gdb_target=idtl64 ;;
-mips64*-idt-ecoff*) gdb_target=idt64 ;;
+mips64*el-*-ecoff*) gdb_target=embedl64 ;;
+mips64*-*-ecoff*) gdb_target=embed64 ;;
mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
-mips64*el-*-elf*) gdb_target=idtl64 ;;
-mips64*-*-elf*) gdb_target=idt64 ;;
-mips*el-*-ecoff*) gdb_target=idtl ;;
-mips*-*-ecoff*) gdb_target=idt ;;
+mips64*el-*-elf*) gdb_target=embedl64 ;;
+mips64*-*-elf*) gdb_target=embed64 ;;
+mips*el-*-ecoff*) gdb_target=embedl ;;
+mips*-*-ecoff*) gdb_target=embed ;;
# start-sanitize-gm
-mips*-*-magic*) gdb_target=idt ;;
+mips*-*-magic*) gdb_target=embed ;;
# end-sanitize-gm
-mips*el-*-elf*) gdb_target=idtl ;;
-mips*-*-elf*) gdb_target=idt ;;
+mips*el-*-elf*) gdb_target=embedl ;;
+mips*-*-elf*) gdb_target=embed ;;
mips*-little-*) gdb_target=littlemips ;;
mips*-sgi-irix5*) gdb_target=irix5 ;;
mips*-sgi-*) gdb_target=irix3 ;;
#include "monitor.h"
#include "remote-utils.h"
+extern int baud_rate;
+
static const char hexchars[]="0123456789abcdef";
static char *hex2mem();
expect_prompt(discard)
int discard;
{
- expect (expect_prompt, discard);
+ expect (">> ", discard);
}
/*
* array_open -- open a connection to a remote debugger.
* NAME is the filename used for communication.
*/
+static int baudrate = 9600;
static char dev_name[100];
static void
{
char packet[PBUFSIZ];
- baud_rate = 4800; /* this is the only supported baud rate */
-
if (args == NULL)
error ("Use `target %s DEVICE-NAME' to use a serial port, or \n\
`target %s HOST-NAME:PORT-NUMBER' to use a network connection.", name, name);
*/
debuglogs (3, "Trying to ACK the target's debug stub");
/* unless your are on the new hardware, the old board won't initialize
- because the '+' doesn't flush output like it does on the new ROMS.
+ because the '@' doesn't flush output like it does on the new ROMS.
*/
- printf_monitor ("+"); /* ask for the last signal */
+ printf_monitor ("@"); /* ask for the last signal */
expect_prompt(1); /* See if we get a expect_prompt */
make_gdb_packet (packet, "?"); /* ask for a bogus packet */
if (array_send_packet (packet) == 0)
error ("Couldn't transmit packet\n");
- printf_monitor ("+\n"); /* force it to flush stdout */
+ printf_monitor ("@\n"); /* force it to flush stdout */
expect_prompt(1); /* See if we get a expect_prompt */
if (from_tty)
timeout = 0; /* Don't time out -- user program is running. */
- expect_prompt(0); /* Wait for expect_prompt, outputting extraneous text */
+ expect_prompt(0); /* Wait for expect_prompt, outputting extraneous text */
debuglogs (4, "array_wait(), got the expect_prompt.");
status->kind = TARGET_WAITKIND_STOPPED;
array_files_info ()
{
printf ("\tAttached to %s at %d baud.\n",
- dev_name, baud_rate);
+ dev_name, baudrate);
}
/*
if (sr_get_debug() > 4)
printf ("Breakpoint at %x\n", addr);
array_read_inferior_memory(addr, shadow, memory_breakpoint_size);
- printf_monitor("brk 0x%x\n", addr);
- expect_prompt(1);
+ printf_monitor("b 0x%x\n", addr);
+ expect_prompt(1);
return 0;
}
}
if (breakaddr[i] == addr) {
breakaddr[i] = 0;
/* some monitors remove breakpoints based on the address */
- printf_monitor("unbrk %x\n", i);
- expect_prompt(1);
+ printf_monitor("bd %x\n", i);
+ expect_prompt(1);
return 0;
}
}
return 1;
case SERIAL_TIMEOUT:
debuglogs (3, "Timed out reading serial port\n");
- printf_monitor("+"); /* resync with the monitor */
+ printf_monitor("@"); /* resync with the monitor */
expect_prompt(1); /* See if we get a expect_prompt */
break; /* Retransmit buffer */
case '-':
debuglogs (3, "Got NAK\n");
- printf_monitor("+"); /* resync with the monitor */
+ printf_monitor("@"); /* resync with the monitor */
expect_prompt(1); /* See if we get a expect_prompt */
break;
case '$':
debuglogs (3, "\nGDB packet checksum zero, must be a bogus packet\n");
if (csum == pktcsum) {
debuglogs (3, "\nGDB packet checksum correct, packet data is \"%s\",\n", packet);
- printf_monitor ("+");
+ printf_monitor ("@");
expect_prompt (1);
return 1;
}
_initialize_array ()
{
add_target (&array_ops);
+ baud_rate = 4800; /* this is the only supported baud rate */
}