aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2020-07-22 15:56:08 +0200
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-07-22 15:56:08 +0200
commita7b4ff4f0a0e503414b6b9a4184365fdb1f00fbe (patch)
tree8d7c740bc940b30ba277f6b609baf9daa97f0f20 /gdb/objfiles.h
parent2340e834dfb3110a33e2867297469d5ff33013a4 (diff)
downloadgdb-a7b4ff4f0a0e503414b6b9a4184365fdb1f00fbe.zip
gdb-a7b4ff4f0a0e503414b6b9a4184365fdb1f00fbe.tar.gz
gdb-a7b4ff4f0a0e503414b6b9a4184365fdb1f00fbe.tar.bz2
gdb/jit: skip jit symbol lookup if already detected the symbols don't exist
To detect whether an objfile is a JITer, we lookup JIT interface symbols in the objfile. If an objfile does not have these symbols, we conclude that it is not a JITer. An objfile that does not have the symbols will never have them. Therefore, once we do a lookup and find out that the objfile does not have JIT symbols, just set a flag so that we can skip symbol lookup for that objfile the next time we reset JIT breakpoints. gdb/ChangeLog: 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca> Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * objfiles.h (struct objfile) <skip_jit_symbol_lookup>: New field. * jit.c (jit_breakpoint_re_set_internal): Use the `skip_jit_symbol_lookup` field.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r--gdb/objfiles.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 3fbc6da..549977a 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -706,6 +706,12 @@ public:
/* JIT-related data for this objfile, if the objfile is JITed;
that is, it was produced by a JITer. */
std::unique_ptr<jited_objfile_data> jited_data = nullptr;
+
+ /* A flag that is set to true if the JIT interface symbols are not
+ found in this objfile, so that we can skip the symbol lookup the
+ next time. If an objfile does not have the symbols, it will
+ never have them. */
+ bool skip_jit_symbol_lookup = false;
};
/* A deleter for objfile. */