aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch-utils.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/arch-utils.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/arch-utils.c')
-rw-r--r--gdb/arch-utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index c1801c9..9e3fb94 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -1,6 +1,6 @@
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GDB.
@@ -32,6 +32,7 @@
#include "sim-regno.h"
#include "gdbcore.h"
#include "osabi.h"
+#include "target-descriptions.h"
#include "version.h"
@@ -688,10 +689,15 @@ gdbarch_info_fill (struct gdbarch_info *info)
if (info->abfd == NULL)
info->abfd = exec_bfd;
+ /* Check for the current target description. */
+ if (info->target_desc == NULL)
+ info->target_desc = target_current_description ();
+
/* "(gdb) set architecture ...". */
if (info->bfd_arch_info == NULL
&& target_architecture_user)
info->bfd_arch_info = target_architecture_user;
+ /* From the file. */
if (info->bfd_arch_info == NULL
&& info->abfd != NULL
&& bfd_get_arch (info->abfd) != bfd_arch_unknown