* remote.c, remote-mon.c, remote-utils.c, remote-utils.h,
target.h, remote-es.c, remote-nindy.c: Don't set baud rate if baud_rate is -1. Remove sr_get_baud_rate and sr_set_baud_rate; just use the global variable itself. When printing baud rate, don't print a baud rate if baud_rate is -1.
This commit is contained in:
parent
d643978558
commit
c20c1bdf99
7 changed files with 72 additions and 26 deletions
|
@ -1,5 +1,11 @@
|
||||||
Fri Feb 25 09:41:11 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
|
Fri Feb 25 09:41:11 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
|
||||||
|
|
||||||
|
* remote.c, remote-mon.c, remote-utils.c, remote-utils.h,
|
||||||
|
target.h, remote-es.c, remote-nindy.c: Don't set baud rate if
|
||||||
|
baud_rate is -1. Remove sr_get_baud_rate and sr_set_baud_rate;
|
||||||
|
just use the global variable itself. When printing baud rate,
|
||||||
|
don't print a baud rate if baud_rate is -1.
|
||||||
|
|
||||||
* coffread.c (read_coff_symtab): Pass mst_file_* to
|
* coffread.c (read_coff_symtab): Pass mst_file_* to
|
||||||
record_minimal_symbol for C_STAT symbols. Put C_EXT and C_STAT
|
record_minimal_symbol for C_STAT symbols. Put C_EXT and C_STAT
|
||||||
symbols in the minimal symbols regardless of SDB_TYPE.
|
symbols in the minimal symbols regardless of SDB_TYPE.
|
||||||
|
|
|
@ -371,10 +371,13 @@ es1800_open (name, from_tty)
|
||||||
perror_with_name ("fcntl serial");
|
perror_with_name ("fcntl serial");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SERIAL_SETBAUDRATE (es1800_desc, baud_rate))
|
if (baud_rate != -1)
|
||||||
{
|
{
|
||||||
SERIAL_CLOSE (es1800_desc);
|
if (SERIAL_SETBAUDRATE (es1800_desc, baud_rate))
|
||||||
perror_with_name (name);
|
{
|
||||||
|
SERIAL_CLOSE (es1800_desc);
|
||||||
|
perror_with_name (name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SERIAL_RAW (es1800_desc);
|
SERIAL_RAW (es1800_desc);
|
||||||
|
|
|
@ -341,11 +341,13 @@ general_open(args, name, from_tty)
|
||||||
if (monitor_desc == NULL)
|
if (monitor_desc == NULL)
|
||||||
perror_with_name(dev_name);
|
perror_with_name(dev_name);
|
||||||
|
|
||||||
/* The baud rate was specified when GDB was started. */
|
if (baud_rate != -1)
|
||||||
if (SERIAL_SETBAUDRATE (monitor_desc, sr_get_baud_rate()))
|
|
||||||
{
|
{
|
||||||
SERIAL_CLOSE (monitor_desc);
|
if (SERIAL_SETBAUDRATE (monitor_desc, baud_rate))
|
||||||
perror_with_name (name);
|
{
|
||||||
|
SERIAL_CLOSE (monitor_desc);
|
||||||
|
perror_with_name (name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SERIAL_RAW(monitor_desc);
|
SERIAL_RAW(monitor_desc);
|
||||||
|
|
|
@ -197,7 +197,10 @@ nindy_open (name, from_tty)
|
||||||
/* Allow user to interrupt the following -- we could hang if there's
|
/* Allow user to interrupt the following -- we could hang if there's
|
||||||
no NINDY at the other end of the remote tty. */
|
no NINDY at the other end of the remote tty. */
|
||||||
immediate_quit++;
|
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,
|
ninConnect(name, baudrate,
|
||||||
nindy_initial_brk, !from_tty, nindy_old_protocol);
|
nindy_initial_brk, !from_tty, nindy_old_protocol);
|
||||||
immediate_quit--;
|
immediate_quit--;
|
||||||
|
@ -227,8 +230,9 @@ nindy_detach (name, from_tty)
|
||||||
static void
|
static void
|
||||||
nindy_files_info ()
|
nindy_files_info ()
|
||||||
{
|
{
|
||||||
printf_unfiltered("\tAttached to %s at %d bps%s%s.\n", savename,
|
/* FIXME: this lies about the baud rate if we autobauded. */
|
||||||
sr_get_baud_rate(),
|
printf_unfiltered("\tAttached to %s at %d bits per second%s%s.\n", savename,
|
||||||
|
baud_rate,
|
||||||
nindy_old_protocol? " in old protocol": "",
|
nindy_old_protocol? " in old protocol": "",
|
||||||
nindy_initial_brk? " with initial break": "");
|
nindy_initial_brk? " with initial break": "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ sr_scan_args(proto, args)
|
||||||
|
|
||||||
/* check for missing or empty baud rate. */
|
/* check for missing or empty baud rate. */
|
||||||
CHECKDONE(p, q);
|
CHECKDONE(p, q);
|
||||||
sr_set_baud_rate(n);
|
baud_rate = n;
|
||||||
|
|
||||||
/* look for debug value. */
|
/* look for debug value. */
|
||||||
n = strtol(p, &q, 10);
|
n = strtol(p, &q, 10);
|
||||||
|
@ -177,10 +177,13 @@ gr_open(args, from_tty, gr)
|
||||||
if (!sr_get_desc())
|
if (!sr_get_desc())
|
||||||
perror_with_name((char *) sr_get_device());
|
perror_with_name((char *) sr_get_device());
|
||||||
|
|
||||||
if (SERIAL_SETBAUDRATE(sr_get_desc(), sr_get_baud_rate()) != 0)
|
if (baud_rate != -1)
|
||||||
{
|
{
|
||||||
SERIAL_CLOSE(sr_get_desc());
|
if (SERIAL_SETBAUDRATE(sr_get_desc(), baud_rate) != 0)
|
||||||
perror_with_name(sr_get_device());
|
{
|
||||||
|
SERIAL_CLOSE(sr_get_desc());
|
||||||
|
perror_with_name(sr_get_device());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SERIAL_RAW (sr_get_desc());
|
SERIAL_RAW (sr_get_desc());
|
||||||
|
@ -198,8 +201,13 @@ gr_open(args, from_tty, gr)
|
||||||
gr_settings->clear_all_breakpoints = remove_breakpoints;
|
gr_settings->clear_all_breakpoints = remove_breakpoints;
|
||||||
|
|
||||||
if (from_tty)
|
if (from_tty)
|
||||||
printf_filtered ("Remote debugging using `%s' at baud rate of %d\n",
|
{
|
||||||
sr_get_device(), sr_get_baud_rate());
|
printf_filtered ("Remote debugging using `%s'", sr_get_device ());
|
||||||
|
if (baud_rate != -1)
|
||||||
|
printf_filtered (" at baud rate of %d",
|
||||||
|
baud_rate);
|
||||||
|
print_filtered ("\n");
|
||||||
|
}
|
||||||
|
|
||||||
push_target(gr->ops);
|
push_target(gr->ops);
|
||||||
gr_checkin();
|
gr_checkin();
|
||||||
|
@ -439,8 +447,10 @@ gr_files_info (ops)
|
||||||
#ifdef __GO32__
|
#ifdef __GO32__
|
||||||
printf_filtered ("\tAttached to DOS asynctsr\n");
|
printf_filtered ("\tAttached to DOS asynctsr\n");
|
||||||
#else
|
#else
|
||||||
printf_filtered ("\tAttached to %s at %d baud\n",
|
printf_filtered ("\tAttached to %s", sr_get_device());
|
||||||
sr_get_device(), sr_get_baud_rate());
|
if (baud_rate != -1)
|
||||||
|
printf_filtered ("at %d baud", baud_rate);
|
||||||
|
printf_filtered ("\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (exec_bfd)
|
if (exec_bfd)
|
||||||
|
|
|
@ -44,10 +44,6 @@ extern struct _sr_settings sr_settings;
|
||||||
#define sr_get_debug() (remote_debug)
|
#define sr_get_debug() (remote_debug)
|
||||||
#define sr_set_debug(newval) (remote_debug = (newval))
|
#define sr_set_debug(newval) (remote_debug = (newval))
|
||||||
|
|
||||||
/* get and set baud rate. */
|
|
||||||
#define sr_get_baud_rate() (baud_rate)
|
|
||||||
#define sr_set_baud_rate(newval) (baud_rate = (newval))
|
|
||||||
|
|
||||||
/* get and set timeout. */
|
/* get and set timeout. */
|
||||||
#define sr_get_timeout() (sr_settings.timeout)
|
#define sr_get_timeout() (sr_settings.timeout)
|
||||||
#define sr_set_timeout(newval) (sr_settings.timeout = (newval))
|
#define sr_set_timeout(newval) (sr_settings.timeout = (newval))
|
||||||
|
|
33
gdb/target.h
33
gdb/target.h
|
@ -213,6 +213,27 @@ struct target_ops
|
||||||
int len, int write,
|
int len, int write,
|
||||||
struct target_ops * target));
|
struct target_ops * target));
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* Enable this after 4.12. */
|
||||||
|
|
||||||
|
/* Search target memory. Start at STARTADDR and take LEN bytes of
|
||||||
|
target memory, and them with MASK, and compare to DATA. If they
|
||||||
|
match, set *ADDR_FOUND to the address we found it at, store the data
|
||||||
|
we found at LEN bytes starting at DATA_FOUND, and return. If
|
||||||
|
not, add INCREMENT to the search address and keep trying until
|
||||||
|
the search address is outside of the range [LORANGE,HIRANGE).
|
||||||
|
|
||||||
|
If we don't find anything, set *ADDR_FOUND to (CORE_ADDR)0 and return. */
|
||||||
|
void (*to_search) PARAMS ((int len, char *data, char *mask,
|
||||||
|
CORE_ADDR startaddr, int increment,
|
||||||
|
CORE_ADDR lorange, CORE_ADDR hirange,
|
||||||
|
CORE_ADDR *addr_found, char *data_found));
|
||||||
|
|
||||||
|
#define target_search(len, data, mask, startaddr, increment, lorange, hirange, addr_found, data_found) \
|
||||||
|
(*current_target->to_search) (len, data, mask, startaddr, increment, \
|
||||||
|
lorange, hirange, addr_found, data_found)
|
||||||
|
#endif /* 0 */
|
||||||
|
|
||||||
void (*to_files_info) PARAMS ((struct target_ops *));
|
void (*to_files_info) PARAMS ((struct target_ops *));
|
||||||
int (*to_insert_breakpoint) PARAMS ((CORE_ADDR, char *));
|
int (*to_insert_breakpoint) PARAMS ((CORE_ADDR, char *));
|
||||||
int (*to_remove_breakpoint) PARAMS ((CORE_ADDR, char *));
|
int (*to_remove_breakpoint) PARAMS ((CORE_ADDR, char *));
|
||||||
|
@ -306,9 +327,13 @@ target_detach PARAMS ((char *, int));
|
||||||
#define target_resume(pid, step, siggnal) \
|
#define target_resume(pid, step, siggnal) \
|
||||||
(*current_target->to_resume) (pid, step, siggnal)
|
(*current_target->to_resume) (pid, step, siggnal)
|
||||||
|
|
||||||
/* Wait for process pid to do something. Pid = -1 to wait for any pid to do
|
/* Wait for process pid to do something. Pid = -1 to wait for any pid
|
||||||
something. Return pid of child, or -1 in case of error; store status
|
to do something. Return pid of child, or -1 in case of error;
|
||||||
through argument pointer STATUS. */
|
store status through argument pointer STATUS. Note that it is
|
||||||
|
*not* OK to return_to_top_level out of target_wait without popping
|
||||||
|
the debugging target from the stack; GDB isn't prepared to get back
|
||||||
|
to the prompt with a debugging target but without the frame cache,
|
||||||
|
stop_pc, etc., set up. */
|
||||||
|
|
||||||
#define target_wait(pid, status) \
|
#define target_wait(pid, status) \
|
||||||
(*current_target->to_wait) (pid, status)
|
(*current_target->to_wait) (pid, status)
|
||||||
|
@ -594,7 +619,7 @@ find_core_target PARAMS ((void));
|
||||||
information (higher values, more information). */
|
information (higher values, more information). */
|
||||||
extern int remote_debug;
|
extern int remote_debug;
|
||||||
|
|
||||||
/* Speed in bits per second. */
|
/* Speed in bits per second, or -1 which means don't mess with the speed. */
|
||||||
extern int baud_rate;
|
extern int baud_rate;
|
||||||
|
|
||||||
/* Functions for helping to write a native target. */
|
/* Functions for helping to write a native target. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue