aboutsummaryrefslogtreecommitdiff
path: root/gdb/jit.h
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-07-22 15:56:06 +0200
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-07-22 15:56:06 +0200
commitfe053b9e85378b4df1397684266b2cddcce8123b (patch)
tree6ab15f8d5b42943f01b2d8602b5a65718ffc7eed /gdb/jit.h
parent39fdda0744607575103b30ffbec3cdb99f8d2501 (diff)
downloadgdb-fe053b9e85378b4df1397684266b2cddcce8123b.zip
gdb-fe053b9e85378b4df1397684266b2cddcce8123b.tar.gz
gdb-fe053b9e85378b4df1397684266b2cddcce8123b.tar.bz2
gdb/jit: pass the jiter objfile as an argument to jit_event_handler
This is a refactoring that adds a new parameter to the `jit_event_handler` function: the JITer objfile. The goal is to distinguish which JITer triggered the JIT event, in case there are multiple JITers -- a capability that is added in a subsequent patch. gdb/ChangeLog: 2020-07-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * jit.h: Forward-declare `struct objfile`. (jit_event_handler): Add a second parameter, the JITer objfile. * jit.c (jit_read_descriptor): Change the signature to take the JITer objfile as an argument instead of the jit_program_space_data. (jit_inferior_init): Update the call to jit_read_descriptor. (jit_event_handler): Use the new JITer objfile argument when calling jit_read_descriptor. * breakpoint.c (handle_jit_event): Update the call to jit_event_handler to pass the JITer objfile.
Diffstat (limited to 'gdb/jit.h')
-rw-r--r--gdb/jit.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/jit.h b/gdb/jit.h
index cc13503..71e78a5 100644
--- a/gdb/jit.h
+++ b/gdb/jit.h
@@ -20,6 +20,8 @@
#ifndef JIT_H
#define JIT_H
+struct objfile;
+
/* When the JIT breakpoint fires, the inferior wants us to take one of
these actions. These values are used by the inferior, so the
values of these enums cannot be changed. */
@@ -76,8 +78,9 @@ extern void jit_inferior_created_hook (void);
extern void jit_breakpoint_re_set (void);
/* This function is called by handle_inferior_event when it decides
- that the JIT event breakpoint has fired. */
+ that the JIT event breakpoint has fired. JITER is the objfile
+ whose JIT event breakpoint has been hit. */
-extern void jit_event_handler (struct gdbarch *gdbarch);
+extern void jit_event_handler (gdbarch *gdbarch, objfile *jiter);
#endif /* JIT_H */