aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/jit-reader.exp
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-02-02 10:54:03 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-02-04 11:07:37 -0500
commit4a620b7e30fe58c3f53ad7a2044728e850b921d2 (patch)
tree307ff7e55a30c639584aa1699d557e433d8b7aa3 /gdb/testsuite/gdb.base/jit-reader.exp
parent480157863bac93e56f97f93d5d90818a47debbf6 (diff)
downloadgdb-4a620b7e30fe58c3f53ad7a2044728e850b921d2.zip
gdb-4a620b7e30fe58c3f53ad7a2044728e850b921d2.tar.gz
gdb-4a620b7e30fe58c3f53ad7a2044728e850b921d2.tar.bz2
gdb: include jit_code_entry::symfile_addr value in names of objfiles created by jit reader API
This commit includes the JIT object's symfile address in the names of objfiles created by JIT reader API (e.g., << JIT compiled code at 0x7ffd8a0c77a0 >>). This allows one to at least differentiate one from another. The address is the one that the debugged program has put in jit_code_entry::symfile_addr, and that the JIT reader's read function receives. As we can see in gdb.base/jit-reader-host.c and gdb.base/jit-reader.c, that may not be the actual value of where the JIT-ed code is. But it is a value chosen by the author of the JIT engine and the JIT reader, so including this value in the objfile name may help them correlate the JIT objfiles created by with their logs / data structures. To access this field, we need to pass down a reference to the jit_code_entry. So make jit_dbg_reader_data a structure (instead of an alias for a CORE_ADDR) that includes the address of the code entry in the inferior's address space (the previous meaning of jit_dbg_reader_data) plus a reference to the jit_code_entry as read into GDB's address space. And while at it, pass down the gdbarch, so that we don't have to call target_gdbarch. Co-Authored-By: Jan Vrany <jan.vrany@labware.com> Change-Id: Ib26c4d1bd8de503d651aff89ad2e500cb312afa5
Diffstat (limited to 'gdb/testsuite/gdb.base/jit-reader.exp')
-rw-r--r--gdb/testsuite/gdb.base/jit-reader.exp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.base/jit-reader.exp
index bcc8564..d94360c 100644
--- a/gdb/testsuite/gdb.base/jit-reader.exp
+++ b/gdb/testsuite/gdb.base/jit-reader.exp
@@ -230,11 +230,11 @@ proc jit_reader_test {} {
if { ![skip_python_tests] } {
gdb_test "python print(gdb.objfiles())" \
- "$any<gdb.Objfile filename=<< JIT compiled code >>>$any" \
+ "$any<gdb.Objfile filename=<< JIT compiled code at $hex >>>$any" \
"python gdb.Objfile.__repr__ ()"
gdb_test "python print(list(map(lambda objf : objf.filename, gdb.objfiles())))" \
- "$any'<< JIT compiled code >>'$any" \
+ "$any'<< JIT compiled code at $hex >>'$any" \
"python gdb.Objfile.filename"
}
}