aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-11-28 22:10:26 +0000
committerDaniel Jacobowitz <drow@false.org>2006-11-28 22:10:26 +0000
commit424163ea1524c5823612a24284cb900cd70e2e2b (patch)
tree5904b83f46fcb044c58f6fefa6f720d578d6bfce /gdb/remote.c
parent979894f2c29bdd6ce92b9588e308dbaeaf9ac819 (diff)
downloadgdb-424163ea1524c5823612a24284cb900cd70e2e2b.zip
gdb-424163ea1524c5823612a24284cb900cd70e2e2b.tar.gz
gdb-424163ea1524c5823612a24284cb900cd70e2e2b.tar.bz2
* Makefile.in (SFILES): Add new and missed files.
(target_descriptions_h): New. (COMMON_OBS): Add target-descriptions.o. (arch-utils.o, infcmd.o, remote.o, target.o): Update. (target-descriptions.o): New. * arch-utils.c (gdbarch_info_fill): Check for a target description. * target-descriptions.c, target-descriptions.h: New files. * gdbarch.sh: Add target_desc to info. Declare it in gdbarch.h. Correct typos. (gdbarch_list_lookup_by_info): Check target_desc. * gdbarch.c, gdbarch.h: Regenerated. * target.c (update_current_target): Mention to_read_description. (target_pre_inferior): Call target_clear_description. (target_read_description): New. * target.h (struct target_ops): Add to_read_description. (target_read_description): New prototype. * infcmd.c (post_create_inferior): Call target_find_description. * remote.c (remote_open_1): Likewise. (extended_remote_create_inferior): Add a comment. (extended_remote_async_create_inferior): Likewise.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 302fa3e..e758412 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -45,6 +45,7 @@
#include "solib.h"
#include "cli/cli-decode.h"
#include "cli/cli-setshow.h"
+#include "target-descriptions.h"
#include <ctype.h>
#include <sys/time.h>
@@ -2501,6 +2502,10 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target,
which later probes to skip. */
remote_query_supported ();
+ /* Next, if the target can specify a description, read it. We do
+ this before anything involving memory or registers. */
+ target_find_description ();
+
/* Without this, some commands which require an active target (such
as kill) won't work. This variable serves (at least) double duty
as both the pid of the target process (if it has such), and as a
@@ -5023,6 +5028,14 @@ extended_remote_create_inferior (char *exec_file, char *args,
/* Now restart the remote server. */
extended_remote_restart ();
+ /* NOTE: We don't need to recheck for a target description here; but
+ if we gain the ability to switch the remote executable we may
+ need to, if for instance we are running a process which requested
+ different emulated hardware from the operating system. A
+ concrete example of this is ARM GNU/Linux, where some binaries
+ will have a legacy FPA coprocessor emulated and others may have
+ access to a hardware VFP unit. */
+
/* Now put the breakpoints back in. This way we're safe if the
restart function works via a unix fork on the remote side. */
insert_breakpoints ();
@@ -5048,6 +5061,14 @@ extended_remote_async_create_inferior (char *exec_file, char *args,
/* Now restart the remote server. */
extended_remote_restart ();
+ /* NOTE: We don't need to recheck for a target description here; but
+ if we gain the ability to switch the remote executable we may
+ need to, if for instance we are running a process which requested
+ different emulated hardware from the operating system. A
+ concrete example of this is ARM GNU/Linux, where some binaries
+ will have a legacy FPA coprocessor emulated and others may have
+ access to a hardware VFP unit. */
+
/* Now put the breakpoints back in. This way we're safe if the
restart function works via a unix fork on the remote side. */
insert_breakpoints ();