summaryrefslogtreecommitdiff
path: root/gdb/jit.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2020-07-22 15:56:07 +0200
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-07-22 15:56:07 +0200
commit77208eb7e24a2bad8771f3958d9cd2e06144c654 (patch)
tree0bbf3164f475c3cd20ede6f9f15abfea98e62749 /gdb/jit.h
parent8c1c720faa4fb1ddc0c89dd60979361a8e11268a (diff)
downloadbinutils-gdb-77208eb7e24a2bad8771f3958d9cd2e06144c654.tar.gz
gdb/jit: move cached_code_address and jit_breakpoint to jiter_objfile_data
This is in preparation for allowing more than one JITer objfile per program space. Once we do that, each JITer objfile will have its own JIT breakpoint (on the __jit_debug_register_code function it provides). The cached_code_address field is just the runtime / relocated address of that symbol. Since they are going to become JITer-objfile-specific and not program-space-specific, move these fields from jit_program_space_data to jiter_objfile_data. gdb/ChangeLog: 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca> * jit.h (struct jiter_objfile_data) <cached_code_address, jit_breakpoint>: Move to here from ... * jit.c (jit_program_space_data): ... here. (jiter_objfile_data::~jiter_objfile_data): Update. (jit_breakpoint_deleted): Update. (jit_breakpoint_re_set_internal): Update.
Diffstat (limited to 'gdb/jit.h')
-rw-r--r--gdb/jit.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/jit.h b/gdb/jit.h
index fcef78d4991..b78c35d5184 100644
--- a/gdb/jit.h
+++ b/gdb/jit.h
@@ -86,6 +86,14 @@ struct jiter_objfile_data
/* 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