X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gdb%2Fprogspace.h;h=cf2295c550b0b4cbe2a49aa485ccecb5eb95144a;hb=ed34ef5ed3b11141a622e3edfb0c47e790f1fea7;hp=5d3ed950f75d85ddace03dbc069831c9bbdefb6e;hpb=0df8b4180acb4890d058c92753dafcd4ff0a87d1;p=platform%2Fupstream%2Fbinutils.git diff --git a/gdb/progspace.h b/gdb/progspace.h index 5d3ed95..cf2295c 100644 --- a/gdb/progspace.h +++ b/gdb/progspace.h @@ -1,6 +1,6 @@ /* Program and address space management, for GDB, the GNU debugger. - Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This file is part of GDB. @@ -23,6 +23,8 @@ #include "target.h" #include "vec.h" +#include "gdb_vecs.h" +#include "registry.h" struct target_ops; struct bfd; @@ -31,6 +33,10 @@ struct inferior; struct exec; struct address_space; struct program_space_data; +struct address_space_data; + +typedef struct so_list *so_list_ptr; +DEF_VEC_P (so_list_ptr); /* A program space represents a symbolic view of an address space. Roughly speaking, it holds all the data associated with a @@ -143,6 +149,10 @@ struct program_space bfd *ebfd; /* The last-modified time, from when the exec was brought in. */ long ebfd_mtime; + /* Similar to bfd_get_filename (exec_bfd) but in original form given + by user, without symbolic links and pathname resolved. + It needs to be freed by xfree. It is not NULL iff EBFD is not NULL. */ + char *pspace_exec_filename; /* The address space attached to this program space. More than one program space may be bound to the same address space. In the @@ -185,9 +195,19 @@ struct program_space solib.c. */ struct so_list *so_list; + /* Number of calls to solib_add. */ + unsigned solib_add_generation; + + /* When an solib is added, it is also added to this vector. This + is so we can properly report solib changes to the user. */ + VEC (so_list_ptr) *added_solibs; + + /* When an solib is removed, its name is added to this vector. + This is so we can properly report solib changes to the user. */ + VEC (char_ptr) *deleted_solibs; + /* Per pspace data-pointers required by other GDB modules. */ - void **data; - unsigned num_data; + REGISTRY_FIELDS; }; /* The object file that the main symbol table was loaded from (e.g. the @@ -216,9 +236,6 @@ extern struct program_space *current_program_space; pointer to the new object. */ extern struct program_space *add_program_space (struct address_space *aspace); -/* Release PSPACE and removes it from the pspace list. */ -extern void remove_program_space (struct program_space *pspace); - /* Returns the number of program spaces listed. */ extern int number_of_program_spaces (void); @@ -247,7 +264,8 @@ extern void set_current_program_space (struct program_space *pspace); extern struct cleanup *save_current_space_and_thread (void); /* Switches full context to program space PSPACE. Switches to the - first thread found bound to PSPACE. */ + first thread found bound to PSPACE, giving preference to the + current thread, if there's one and it isn't executing. */ extern void switch_to_program_space_and_thread (struct program_space *pspace); /* Create a new address space object, and add it to the list. */ @@ -275,17 +293,19 @@ extern void update_address_spaces (void); anymore. */ extern void prune_program_spaces (void); +/* Reset saved solib data at the start of an solib event. This lets + us properly collect the data when calling solib_add, so it can then + later be printed. */ +extern void clear_program_space_solib_cache (struct program_space *); + /* Keep a registry of per-pspace data-pointers required by other GDB modules. */ -extern const struct program_space_data *register_program_space_data (void); -extern const struct program_space_data *register_program_space_data_with_cleanup - (void (*cleanup) (struct program_space *, void *)); -extern void clear_program_space_data (struct program_space *pspace); -extern void set_program_space_data (struct program_space *pspace, - const struct program_space_data *data, - void *value); -extern void *program_space_data (struct program_space *pspace, - const struct program_space_data *data); +DECLARE_REGISTRY (program_space); + +/* Keep a registry of per-aspace data-pointers required by other GDB + modules. */ + +DECLARE_REGISTRY (address_space); #endif