GDB (xrefs)
/tmp/gdb-7.10/gdb/jit.h
Go to the documentation of this file.
1 /* JIT declarations for GDB, the GNU Debugger.
2 
3  Copyright (C) 2009-2015 Free Software Foundation, Inc.
4 
5  This file is part of GDB.
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 #ifndef JIT_H
21 #define JIT_H
22 
23 /* When the JIT breakpoint fires, the inferior wants us to take one of
24  these actions. These values are used by the inferior, so the
25  values of these enums cannot be changed. */
26 
27 typedef enum
28 {
33 
34 /* This struct describes a single symbol file in a linked list of
35  symbol files describing generated code. As the inferior generates
36  code, it adds these entries to the list, and when we attach to the
37  inferior, we read them all. For the first element prev_entry
38  should be NULL, and for the last element next_entry should be
39  NULL. */
40 
42 {
47 };
48 
49 /* This is the global descriptor that the inferior uses to communicate
50  information to the debugger. To alert the debugger to take an
51  action, the inferior sets the action_flag to the appropriate enum
52  value, updates relevant_entry to point to the relevant code entry,
53  and calls the function at the well-known symbol with our
54  breakpoint. We then read this descriptor from another global
55  well-known symbol. */
56 
58 {
59  uint32_t version;
60  /* This should be jit_actions_t, but we want to be specific about the
61  bit-width. */
62  uint32_t action_flag;
65 };
66 
67 /* Looks for the descriptor and registration symbols and breakpoints
68  the registration function. If it finds both, it registers all the
69  already JITed code. If it has already found the symbols, then it
70  doesn't try again. */
71 
72 extern void jit_inferior_created_hook (void);
73 
74 /* Re-establish the jit breakpoint(s). */
75 
76 extern void jit_breakpoint_re_set (void);
77 
78 /* This function is called by handle_inferior_event when it decides
79  that the JIT event breakpoint has fired. */
80 
81 extern void jit_event_handler (struct gdbarch *gdbarch);
82 
83 #endif /* JIT_H */
bfd_vma CORE_ADDR
Definition: common-types.h:41
void jit_inferior_created_hook(void)
Definition: jit.c:1362
CORE_ADDR relevant_entry
Definition: jit.h:63
Definition: jit.h:41
jit_actions_t
Definition: jit.h:27
CORE_ADDR symfile_addr
Definition: jit.h:45
ULONGEST symfile_size
Definition: jit.h:46
uint32_t version
Definition: jit.h:59
CORE_ADDR prev_entry
Definition: jit.h:44
void jit_event_handler(struct gdbarch *gdbarch)
Definition: jit.c:1398
uint32_t action_flag
Definition: jit.h:62
unsigned long long ULONGEST
Definition: common-types.h:53
CORE_ADDR next_entry
Definition: jit.h:43
CORE_ADDR first_entry
Definition: jit.h:64
void jit_breakpoint_re_set(void)
Definition: jit.c:1371