gas: slightly relax .startof.()/.sizeof.() testcase
[deliverable/binutils-gdb.git] / gdb / progspace.h
index 9d98baff359b486ee68a6597cb309d64965872e1..8925f56b120837080bdf17577b0bde8dc91f3888 100644 (file)
@@ -1,6 +1,6 @@
 /* Program and address space management, for GDB, the GNU debugger.
 
-   Copyright (C) 2009-2013 Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -33,6 +33,7 @@ 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);
@@ -148,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
@@ -231,12 +236,16 @@ 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);
+/* Remove a program space from the program spaces list and release it.  It is
+   an error to call this function while PSPACE is the current program space. */
+extern void delete_program_space (struct program_space *pspace);
 
 /* Returns the number of program spaces listed.  */
 extern int number_of_program_spaces (void);
 
+/* Returns true iff there's no inferior bound to PSPACE.  */
+extern int program_space_empty_p (struct program_space *pspace);
+
 /* Copies program space SRC to DEST.  Copies the main executable file,
    and the main symbol file.  Returns DEST.  */
 extern struct program_space *clone_program_space (struct program_space *dest,
@@ -262,7 +271,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.  */
@@ -286,10 +296,6 @@ extern int address_space_num (struct address_space *aspace);
    mappings.  */
 extern void update_address_spaces (void);
 
-/* Prune away automatically added program spaces that aren't required
-   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.  */
@@ -300,4 +306,9 @@ extern void clear_program_space_solib_cache (struct program_space *);
 
 DECLARE_REGISTRY (program_space);
 
+/* Keep a registry of per-aspace data-pointers required by other GDB
+   modules.  */
+
+DECLARE_REGISTRY (address_space);
+
 #endif
This page took 0.033805 seconds and 4 git commands to generate.