gdb: use gdb::optional instead of passing a pointer to gdb::array_view
[deliverable/binutils-gdb.git] / gdb / jit.h
index fcef78d49916bcdcc910e5b2115629737b1cbff5..99aabb2c28d11d5bdce36e51408b2ebfe6b6a23a 100644 (file)
--- a/gdb/jit.h
+++ b/gdb/jit.h
@@ -1,6 +1,6 @@
 /* JIT declarations for GDB, the GNU Debugger.
 
-   Copyright (C) 2009-2020 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,6 +20,7 @@
 #ifndef JIT_H
 #define JIT_H
 
+struct inferior;
 struct objfile;
 struct minimal_symbol;
 
@@ -72,20 +73,21 @@ struct jit_descriptor
 
 struct jiter_objfile_data
 {
-  jiter_objfile_data (struct objfile *objfile)
-    : objfile (objfile)
-  {}
-
   ~jiter_objfile_data ();
 
-  /* Back-link to the objfile. */
-  struct objfile *objfile;
-
   /* Symbol for __jit_debug_register_code.  */
   minimal_symbol *register_code = nullptr;
 
   /* Symbol for __jit_debug_descriptor.  */
   minimal_symbol *descriptor = nullptr;
+
+  /* This is the relocated address of the __jit_debug_register_code function
+     provided by this objfile.  This is used to detect relocations changes
+     requiring the breakpoint to be re-created.  */
+  CORE_ADDR cached_code_address = 0;
+
+  /* This is the JIT event breakpoint, or nullptr if it has been deleted.  */
+  breakpoint *jit_breakpoint = nullptr;
 };
 
 /* An objfile that is the product of JIT compilation and was registered
@@ -101,13 +103,6 @@ struct jited_objfile_data
   CORE_ADDR addr;
 };
 
-/* Looks for the descriptor and registration symbols and breakpoints
-   the registration function.  If it finds both, it registers all the
-   already JITed code.  If it has already found the symbols, then it
-   doesn't try again.  */
-
-extern void jit_inferior_created_hook (void);
-
 /* Re-establish the jit breakpoint(s).  */
 
 extern void jit_breakpoint_re_set (void);
This page took 0.027716 seconds and 4 git commands to generate.