aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-10-18 16:56:13 +0000
committerDaniel Jacobowitz <drow@false.org>2006-10-18 16:56:13 +0000
commit8621d6a94413b84d5d3353b717607194d7584943 (patch)
tree3f3e64904b3db0afa9355cc3e57e752b715b1526 /gdb
parent2f83a18e2abe9144bfbb72bc75a68ba64445a9e1 (diff)
downloadgdb-8621d6a94413b84d5d3353b717607194d7584943.zip
gdb-8621d6a94413b84d5d3353b717607194d7584943.tar.gz
gdb-8621d6a94413b84d5d3353b717607194d7584943.tar.bz2
* inferior.h (start_remote): Update prototype.
* infrun.c (start_remote): Take FROM_TTY. Call post_create_inferior. * monitor.c (monitor_open): Update call to start_remote. * remote-sds.c (sds_start_remote, sds_open): Likewise. * remote.c (remote_start_remote): Likewise. (remote_start_remote_dummy): Removed. (remote_open): Update call to remote_start_remote. Do not call post_create_inferior here.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/inferior.h2
-rw-r--r--gdb/infrun.c13
-rw-r--r--gdb/monitor.c2
-rw-r--r--gdb/remote-sds.c7
-rw-r--r--gdb/remote.c22
6 files changed, 35 insertions, 23 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4fe939d..da9c8cd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,17 @@
2006-10-18 Daniel Jacobowitz <dan@codesourcery.com>
+ * inferior.h (start_remote): Update prototype.
+ * infrun.c (start_remote): Take FROM_TTY. Call
+ post_create_inferior.
+ * monitor.c (monitor_open): Update call to start_remote.
+ * remote-sds.c (sds_start_remote, sds_open): Likewise.
+ * remote.c (remote_start_remote): Likewise.
+ (remote_start_remote_dummy): Removed.
+ (remote_open): Update call to remote_start_remote. Do not call
+ post_create_inferior here.
+
+2006-10-18 Daniel Jacobowitz <dan@codesourcery.com>
+
* solib-svr4.c (debug_loader_offset_p, debug_loader_offset)
(debug_loader_name, svr4_default_sos): New.
(svr4_current_sos): Call svr4_default_sos.
diff --git a/gdb/inferior.h b/gdb/inferior.h
index b3a5f55..6160656 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -269,7 +269,7 @@ extern int gdb_has_a_terminal (void);
/* From infrun.c */
-extern void start_remote (void);
+extern void start_remote (int from_tty);
extern void normal_stop (void);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 61afab2..b9652f6 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2,8 +2,9 @@
process.
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
- Software Foundation, Inc.
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -832,7 +833,7 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
/* Start remote-debugging of a machine over a serial link. */
void
-start_remote (void)
+start_remote (int from_tty)
{
init_thread_list ();
init_wait_for_inferior ();
@@ -854,6 +855,12 @@ start_remote (void)
is currently running and GDB state should be set to the same as
for an async run. */
wait_for_inferior ();
+
+ /* Now that the inferior has stopped, do any bookkeeping like
+ loading shared libraries. We want to do this before normal_stop,
+ so that the displayed frame is up to date. */
+ post_create_inferior (&current_target, from_tty);
+
normal_stop ();
}
diff --git a/gdb/monitor.c b/gdb/monitor.c
index be807bc..80e0cdd 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -812,7 +812,7 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty)
monitor_printf (current_monitor->line_term);
- start_remote ();
+ start_remote (from_tty);
}
/* Close out all files and local state before this target loses
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index 8394ae5..b788792 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -148,8 +148,9 @@ sds_close (int quitting)
/* Stub for catch_errors. */
static int
-sds_start_remote (void *dummy)
+sds_start_remote (void *from_tty_p)
{
+ int from_tty = * (int *) from_tty;
int c;
unsigned char buf[200];
@@ -173,7 +174,7 @@ sds_start_remote (void *dummy)
immediate_quit--;
- start_remote (); /* Initialize gdb process mechanisms */
+ start_remote (from_tty); /* Initialize gdb process mechanisms */
return 1;
}
@@ -224,7 +225,7 @@ device is attached to the remote system (e.g. /dev/ttya).");
/* Start the remote connection; if error (0), discard this target.
In particular, if the user quits, be sure to discard it (we'd be
in an inconsistent state otherwise). */
- if (!catch_errors (sds_start_remote, NULL,
+ if (!catch_errors (sds_start_remote, &from_tty,
"Couldn't establish connection to remote target\n",
RETURN_MASK_ALL))
pop_target ();
diff --git a/gdb/remote.c b/gdb/remote.c
index cf872b1..98fe59d 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1987,20 +1987,13 @@ get_offsets (void)
objfile_relocate (symfile_objfile, offs);
}
-/* Stub for catch_errors. */
-
-static int
-remote_start_remote_dummy (struct ui_out *uiout, void *dummy)
-{
- start_remote (); /* Initialize gdb process mechanisms. */
- /* NOTE: Return something >=0. A -ve value is reserved for
- catch_exceptions. */
- return 1;
-}
+/* Stub for catch_exception. */
static void
-remote_start_remote (struct ui_out *uiout, void *dummy)
+remote_start_remote (struct ui_out *uiout, void *from_tty_p)
{
+ int from_tty = * (int *) from_tty_p;
+
immediate_quit++; /* Allow user to interrupt it. */
/* Ack any packet which the remote side has already sent. */
@@ -2016,7 +2009,7 @@ remote_start_remote (struct ui_out *uiout, void *dummy)
putpkt ("?"); /* Initiate a query from remote machine. */
immediate_quit--;
- remote_start_remote_dummy (uiout, dummy);
+ start_remote (from_tty); /* Initialize gdb process mechanisms. */
}
/* Open a connection to a remote debugger.
@@ -2458,7 +2451,8 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target,
function. See cli-dump.c. */
{
struct gdb_exception ex
- = catch_exception (uiout, remote_start_remote, NULL, RETURN_MASK_ALL);
+ = catch_exception (uiout, remote_start_remote, &from_tty,
+ RETURN_MASK_ALL);
if (ex.reason < 0)
{
pop_target ();
@@ -2478,8 +2472,6 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target,
getpkt (&rs->buf, &rs->buf_size, 0);
}
- post_create_inferior (&current_target, from_tty);
-
if (exec_bfd) /* No use without an exec file. */
remote_check_symbols (symfile_objfile);
}