From 424163ea1524c5823612a24284cb900cd70e2e2b Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 28 Nov 2006 22:10:26 +0000 Subject: * 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. --- gdb/gdbarch.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'gdb/gdbarch.h') diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 1bebaa6..30ae3d0 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -2,8 +2,8 @@ /* Dynamic architecture support for GDB, the GNU debugger. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free - Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. This file is part of GDB. @@ -50,6 +50,7 @@ struct disassemble_info; struct target_ops; struct obstack; struct bp_target_info; +struct target_desc; extern struct gdbarch *current_gdbarch; @@ -83,6 +84,9 @@ extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch); #define TARGET_OSABI (gdbarch_osabi (current_gdbarch)) #endif +extern const struct target_desc * gdbarch_target_desc (struct gdbarch *gdbarch); +/* set_gdbarch_target_desc() - not applicable - pre-initialized. */ + /* The following are initialized by the target dependent code. */ @@ -1462,6 +1466,9 @@ struct gdbarch_info /* Use default: GDB_OSABI_UNINITIALIZED (-1). */ enum gdb_osabi osabi; + + /* Use default: NULL (ZERO). */ + const struct target_desc *target_desc; }; typedef struct gdbarch *(gdbarch_init_ftype) (struct gdbarch_info info, struct gdbarch_list *arches); @@ -1486,11 +1493,11 @@ extern const char **gdbarch_printable_names (void); /* Helper function. Search the list of ARCHES for a GDBARCH that matches the information provided by INFO. */ -extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info); +extern struct gdbarch_list *gdbarch_list_lookup_by_info (struct gdbarch_list *arches, const struct gdbarch_info *info); /* Helper function. Create a preliminary ``struct gdbarch''. Perform - basic initialization using values obtained from the INFO andTDEP + basic initialization using values obtained from the INFO and TDEP parameters. set_gdbarch_*() functions are called to complete the initialization of the object. */ -- cgit v1.1