From 18d07d1ea78f1bc225ac6d1203eed6fca8c52b53 Mon Sep 17 00:00:00 2001 From: Jan Vrany Date: Mon, 7 Feb 2022 11:39:22 +0000 Subject: gdb: extend the information printed by 'maint info jit' This commit updates the output of 'maint info jit' to print not just the jit_code_entry address, but also the symfile address, and the symfile size. The new information could be obtained by looking into target memory at the contents of the jit_code_entry, but, by storing this information within gdb at the time the jit object is loaded, it is now possible to check if the jit_code_entry has been modified in target memory behind gdb's back. Additionally, the symfile address is the same address that is now used in the objfile names after commit 4a620b7e. One test that relies on the output of 'maint info jit' was updated to allow for the new output format. --- gdb/jit.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gdb/jit.h') diff --git a/gdb/jit.h b/gdb/jit.h index 09dbce2..274ce45 100644 --- a/gdb/jit.h +++ b/gdb/jit.h @@ -95,12 +95,21 @@ struct jiter_objfile_data struct jited_objfile_data { - jited_objfile_data (CORE_ADDR addr) - : addr (addr) + jited_objfile_data (CORE_ADDR addr, CORE_ADDR symfile_addr, + ULONGEST symfile_size) + : addr (addr), + symfile_addr (symfile_addr), + symfile_size (symfile_size) {} /* Address of struct jit_code_entry for this objfile. */ CORE_ADDR addr; + + /* Value of jit_code_entry->symfile_addr for this objfile. */ + CORE_ADDR symfile_addr; + + /* Value of jit_code_entry->symfile_size for this objfile. */ + ULONGEST symfile_size; }; /* Re-establish the jit breakpoint(s). */ -- cgit v1.1