From 7bb5e831919bf6dc8db3aabfaa2345fbc07eb195 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Sat, 18 Nov 1995 00:25:35 +0000 Subject: [PATCH] * configure.in: Change "idt" config to a generic "embed" config 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. --- gdb/config/mips/.Sanitize | 16 ++--- gdb/config/mips/embed.mt | 3 + gdb/config/mips/embed64.mt | 3 + gdb/config/mips/embedl.mt | 3 + gdb/config/mips/embedl64.mt | 3 + gdb/config/mips/idt.mt | 3 - gdb/config/mips/idt64.mt | 3 - gdb/config/mips/idtl.mt | 3 - gdb/config/mips/idtl64.mt | 3 - gdb/config/mips/{tm-idt.h => tm-embed.h} | 0 gdb/config/mips/{tm-idt64.h => tm-embed64.h} | 0 gdb/config/mips/{tm-idtl.h => tm-embedl.h} | 0 .../mips/{tm-idtl64.h => tm-embedl64.h} | 0 gdb/configure | 61 +++++++++---------- gdb/configure.in | 19 +++--- gdb/remote-array.c | 32 +++++----- 16 files changed, 76 insertions(+), 76 deletions(-) create mode 100644 gdb/config/mips/embed.mt create mode 100644 gdb/config/mips/embed64.mt create mode 100644 gdb/config/mips/embedl.mt create mode 100644 gdb/config/mips/embedl64.mt delete mode 100644 gdb/config/mips/idt.mt delete mode 100644 gdb/config/mips/idt64.mt delete mode 100644 gdb/config/mips/idtl.mt delete mode 100644 gdb/config/mips/idtl64.mt rename gdb/config/mips/{tm-idt.h => tm-embed.h} (100%) rename gdb/config/mips/{tm-idt64.h => tm-embed64.h} (100%) rename gdb/config/mips/{tm-idtl.h => tm-embedl.h} (100%) rename gdb/config/mips/{tm-idtl64.h => tm-embedl64.h} (100%) diff --git a/gdb/config/mips/.Sanitize b/gdb/config/mips/.Sanitize index c4c5bd253e..07216cbb79 100644 --- a/gdb/config/mips/.Sanitize +++ b/gdb/config/mips/.Sanitize @@ -27,10 +27,10 @@ bigmips.mt 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 @@ -55,10 +55,10 @@ nm-sysv4.h 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 diff --git a/gdb/config/mips/embed.mt b/gdb/config/mips/embed.mt new file mode 100644 index 0000000000..7f57a4864c --- /dev/null +++ b/gdb/config/mips/embed.mt @@ -0,0 +1,3 @@ +# Target: Big-endian mips board, typically an IDT. +TDEPFILES= mips-tdep.o remote-mips.o remote-array.o +TM_FILE= tm-embed.h diff --git a/gdb/config/mips/embed64.mt b/gdb/config/mips/embed64.mt new file mode 100644 index 0000000000..273d33bdaa --- /dev/null +++ b/gdb/config/mips/embed64.mt @@ -0,0 +1,3 @@ +# Target: Big-endian mips board, typically an IDT. +TDEPFILES= mips-tdep.o remote-mips.o remote-array.o +TM_FILE= tm-embed64.h diff --git a/gdb/config/mips/embedl.mt b/gdb/config/mips/embedl.mt new file mode 100644 index 0000000000..867b1fe5de --- /dev/null +++ b/gdb/config/mips/embedl.mt @@ -0,0 +1,3 @@ +# Target: Big-endian mips board, typically an IDT. +TDEPFILES= mips-tdep.o remote-mips.o remote-array.o +TM_FILE= tm-embedl.h diff --git a/gdb/config/mips/embedl64.mt b/gdb/config/mips/embedl64.mt new file mode 100644 index 0000000000..89e3f9378a --- /dev/null +++ b/gdb/config/mips/embedl64.mt @@ -0,0 +1,3 @@ +# Target: Big-endian mips board, typically an IDT. +TDEPFILES= mips-tdep.o remote-mips.o remote-array.o +TM_FILE= tm-embedl64.h diff --git a/gdb/config/mips/idt.mt b/gdb/config/mips/idt.mt deleted file mode 100644 index 0f116454a1..0000000000 --- a/gdb/config/mips/idt.mt +++ /dev/null @@ -1,3 +0,0 @@ -# Target: Big-endian IDT board. -TDEPFILES= mips-tdep.o remote-mips.o -TM_FILE= tm-idt.h diff --git a/gdb/config/mips/idt64.mt b/gdb/config/mips/idt64.mt deleted file mode 100644 index b177f07fe5..0000000000 --- a/gdb/config/mips/idt64.mt +++ /dev/null @@ -1,3 +0,0 @@ -# Target: Big-endian IDT board. -TDEPFILES= mips-tdep.o remote-mips.o -TM_FILE= tm-idt64.h diff --git a/gdb/config/mips/idtl.mt b/gdb/config/mips/idtl.mt deleted file mode 100644 index 7dc06379ab..0000000000 --- a/gdb/config/mips/idtl.mt +++ /dev/null @@ -1,3 +0,0 @@ -# Target: Big-endian IDT board. -TDEPFILES= mips-tdep.o remote-mips.o -TM_FILE= tm-idtl.h diff --git a/gdb/config/mips/idtl64.mt b/gdb/config/mips/idtl64.mt deleted file mode 100644 index 8391e5d5dc..0000000000 --- a/gdb/config/mips/idtl64.mt +++ /dev/null @@ -1,3 +0,0 @@ -# Target: Big-endian IDT board. -TDEPFILES= mips-tdep.o remote-mips.o -TM_FILE= tm-idtl64.h diff --git a/gdb/config/mips/tm-idt.h b/gdb/config/mips/tm-embed.h similarity index 100% rename from gdb/config/mips/tm-idt.h rename to gdb/config/mips/tm-embed.h diff --git a/gdb/config/mips/tm-idt64.h b/gdb/config/mips/tm-embed64.h similarity index 100% rename from gdb/config/mips/tm-idt64.h rename to gdb/config/mips/tm-embed64.h diff --git a/gdb/config/mips/tm-idtl.h b/gdb/config/mips/tm-embedl.h similarity index 100% rename from gdb/config/mips/tm-idtl.h rename to gdb/config/mips/tm-embedl.h diff --git a/gdb/config/mips/tm-idtl64.h b/gdb/config/mips/tm-embedl64.h similarity index 100% rename from gdb/config/mips/tm-idtl64.h rename to gdb/config/mips/tm-embedl64.h diff --git a/gdb/configure b/gdb/configure index bab0e24e20..b9ae38f324 100755 --- a/gdb/configure +++ b/gdb/configure @@ -409,7 +409,6 @@ fi -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 @@ -498,7 +497,7 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error @@ -512,7 +511,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error @@ -539,7 +538,7 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < EOF @@ -891,7 +890,7 @@ else ac_cv_c_cross=yes else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < #include @@ -934,7 +933,7 @@ rm -f conftest* 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 @@ -952,7 +951,7 @@ fi 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 @@ -973,7 +972,7 @@ if test "$cross_compiling" = yes; then ac_cv_header_stdc=no else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1010,7 +1009,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -1043,7 +1042,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1101,7 +1100,7 @@ else ac_cv_func_mmap=no else cat > conftest.$ac_ext < conftest.$ac_ext < EOF @@ -1383,7 +1382,7 @@ rm -f conftest* ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6 else cat > conftest.$ac_ext < EOF @@ -1814,7 +1813,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -2234,19 +2233,19 @@ mips64*-big-*) gdb_target=bigmips64 ;; 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 ;; diff --git a/gdb/configure.in b/gdb/configure.in index ac4531d590..abebf5e417 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -2,7 +2,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.3)dnl AC_INIT(main.c) -CC=${CC-cc} AC_PROG_CC AC_AIX AC_MINIX @@ -432,19 +431,19 @@ mips64*-big-*) gdb_target=bigmips64 ;; 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 ;; diff --git a/gdb/remote-array.c b/gdb/remote-array.c index 8be758ed8f..6939a30d5c 100644 --- a/gdb/remote-array.c +++ b/gdb/remote-array.c @@ -41,6 +41,8 @@ #include "monitor.h" #include "remote-utils.h" +extern int baud_rate; + static const char hexchars[]="0123456789abcdef"; static char *hex2mem(); @@ -397,7 +399,7 @@ static void expect_prompt(discard) int discard; { - expect (expect_prompt, discard); + expect (">> ", discard); } /* @@ -557,6 +559,7 @@ array_create_inferior (execfile, args, env) * 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 @@ -567,8 +570,6 @@ array_open(args, name, from_tty) { 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); @@ -610,14 +611,14 @@ array_open(args, name, from_tty) */ 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) @@ -718,7 +719,7 @@ array_wait (pid, status) 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; @@ -842,7 +843,7 @@ static void array_files_info () { printf ("\tAttached to %s at %d baud.\n", - dev_name, baud_rate); + dev_name, baudrate); } /* @@ -1024,8 +1025,8 @@ array_insert_breakpoint (addr, shadow) 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; } } @@ -1050,8 +1051,8 @@ array_remove_breakpoint (addr, shadow) 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; } } @@ -1195,12 +1196,12 @@ array_send_packet (packet) 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 '$': @@ -1279,7 +1280,7 @@ array_get_packet (packet) 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; } @@ -1418,5 +1419,6 @@ void _initialize_array () { add_target (&array_ops); + baud_rate = 4800; /* this is the only supported baud rate */ }