X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fremote-nindy.c;h=f9cac2bad2681ccb6bf17c20fe4f5fb9550c5bce;hb=c20c1bdf992a90db69c4abb73594b2ff58154ef6;hp=b9b120c23e134523356580a2d7a0fcbf7a9a2000;hpb=199b2450f62ad6ffbe56ec34fc447716b811579d;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/remote-nindy.c b/gdb/remote-nindy.c index b9b120c23e..f9cac2bad2 100644 --- a/gdb/remote-nindy.c +++ b/gdb/remote-nindy.c @@ -197,7 +197,10 @@ nindy_open (name, from_tty) /* Allow user to interrupt the following -- we could hang if there's no NINDY at the other end of the remote tty. */ immediate_quit++; - sprintf(baudrate, "%d", sr_get_baud_rate()); + /* If baud_rate is -1, then ninConnect will not recognize the baud rate + and will deal with the situation in a (more or less) reasonable + fashion. */ + sprintf(baudrate, "%d", baud_rate); ninConnect(name, baudrate, nindy_initial_brk, !from_tty, nindy_old_protocol); immediate_quit--; @@ -227,8 +230,9 @@ nindy_detach (name, from_tty) static void nindy_files_info () { - printf_unfiltered("\tAttached to %s at %d bps%s%s.\n", savename, - sr_get_baud_rate(), + /* FIXME: this lies about the baud rate if we autobauded. */ + printf_unfiltered("\tAttached to %s at %d bits per second%s%s.\n", savename, + baud_rate, nindy_old_protocol? " in old protocol": "", nindy_initial_brk? " with initial break": ""); } @@ -256,10 +260,11 @@ non_dle( buf, n ) void nindy_resume (pid, step, siggnal) - int pid, step, siggnal; + int pid, step; + enum target_signal siggnal; { - if (siggnal != 0 && siggnal != stop_signal) - error ("Can't send signals to remote NINDY targets."); + if (siggnal != TARGET_SIGNAL_0 && siggnal != stop_signal) + warning ("Can't send signals to remote NINDY targets."); dcache_flush(nindy_dcache); if ( regs_changed ){ @@ -301,7 +306,7 @@ You may need to reset the 80960 and/or reload your program.\n"); static int nindy_wait( pid, status ) int pid; - WAITTYPE *status; + struct target_waitstatus *status; { fd_set fds; char buf[500]; /* FIXME, what is "500" here? */ @@ -312,7 +317,8 @@ nindy_wait( pid, status ) struct cleanup *old_cleanups; long ip_value, fp_value, sp_value; /* Reg values from stop */ - WSETEXIT( (*status), 0 ); + status->kind = TARGET_WAITKIND_EXITED; + status->value.integer = 0; /* OPERATE IN PASSTHROUGH MODE UNTIL NINDY SENDS A DLE CHARACTER */ @@ -391,30 +397,13 @@ nindy_wait( pid, status ) if (stop_exit) { - /* User program exited */ - WSETEXIT ((*status), stop_code); + status->kind = TARGET_WAITKIND_EXITED; + status->value.integer = stop_code; } else { - /* Fault or trace */ - switch (stop_code) - { - case STOP_GDB_BPT: - case TRACE_STEP: - /* Breakpoint or single stepping. */ - stop_code = SIGTRAP; - break; - default: - /* The target is not running Unix, and its faults/traces do - not map nicely into Unix signals. Make sure they do not - get confused with Unix signals by numbering them with - values higher than the highest legal Unix signal. code - in i960_print_fault(), called via PRINT_RANDOM_SIGNAL, - will interpret the value. */ - stop_code += NSIG; - break; - } - WSETSTOP ((*status), stop_code); + status->kind = TARGET_WAITKIND_STOPPED; + status->value.sig = i960_fault_to_signal (stop_code); } return inferior_pid; } @@ -624,7 +613,8 @@ nindy_create_inferior (execfile, args, env) target_terminal_inferior (); /* insert_step_breakpoint (); FIXME, do we need this? */ - proceed ((CORE_ADDR)entry_pt, -1, 0); /* Let 'er rip... */ + /* Let 'er rip... */ + proceed ((CORE_ADDR)entry_pt, TARGET_SIGNAL_DEFAULT, 0); } static void