This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Regression for gdb.base/jit.exp and gdb.base/jit-so.exp [Re: JIT Interface Patches Landed]
> Could you post to gdb-patches when the checked in version has not been posted
> here yet?
Attached.
I skipped the patch because it is already there at gdb-patches. :)
Thanks!
--
Sanjoy Das
http://playingwithpointers.com
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.13552
retrieving revision 1.13553
diff -u -r1.13552 -r1.13553
--- src/gdb/ChangeLog 2011/11/25 17:05:36 1.13552
+++ src/gdb/ChangeLog 2011/11/27 14:26:05 1.13553
@@ -1,3 +1,10 @@
+2011-11-27 Sanjoy Das <sdas@igalia.com>
+
+ Fix regression in jit.exp.
+ * jit.c (jit_reader_try_read_symtab, jit_bfd_try_read_symtab)
+ (jit_register_code): Set the jit_objfile_data field to the correct
+ value.
+
2011-11-25 Ã? Uros Bizjak Ã? <ubizjak@gmail.com>
* alpha-tdep.c (br_opcode): New.
===================================================================
RCS file: /cvs/src/src/gdb/jit.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- src/gdb/jit.c 2011/11/20 09:18:48 1.21
+++ src/gdb/jit.c 2011/11/27 14:26:09 1.22
@@ -710,10 +710,13 @@
xfree (obj);
}
-/* Try to read CODE_ENTRY using the loaded jit reader (if any). */
+/* Try to read CODE_ENTRY using the loaded jit reader (if any).
+ ENTRY_ADDR is the address of the object file (in the target's
+ address space) being read. */
static int
-jit_reader_try_read_symtab (struct jit_code_entry *code_entry)
+jit_reader_try_read_symtab (struct jit_code_entry *code_entry,
+ CORE_ADDR entry_addr)
{
void *gdb_mem;
int status;
@@ -735,7 +738,7 @@
&priv_data
};
- priv_data = code_entry->symfile_addr;
+ priv_data = entry_addr;
if (!loaded_jit_reader)
return 0;
@@ -765,10 +768,12 @@
return status;
}
-/* Try to read CODE_ENTRY using BFD. */
+/* Try to read CODE_ENTRY using BFD. ENTRY_ADDR is the address of the
+ object file (in the target's address space) being read. */
static void
jit_bfd_try_read_symtab (struct jit_code_entry *code_entry,
+ CORE_ADDR entry_addr,
struct gdbarch *gdbarch)
{
bfd *nbfd;
@@ -832,7 +837,7 @@
objfile = symbol_file_add_from_bfd (nbfd, 0, sai, OBJF_SHARED, NULL);
do_cleanups (old_cleanups);
- add_objfile_entry (objfile, code_entry->symfile_addr);
+ add_objfile_entry (objfile, entry_addr);
}
/* This function registers code associated with a JIT code entry. It uses the
@@ -855,10 +860,10 @@
paddress (gdbarch, code_entry->symfile_addr),
pulongest (code_entry->symfile_size));
- success = jit_reader_try_read_symtab (code_entry);
+ success = jit_reader_try_read_symtab (code_entry, entry_addr);
if (!success)
- jit_bfd_try_read_symtab (code_entry, gdbarch);
+ jit_bfd_try_read_symtab (code_entry, entry_addr, gdbarch);
}
/* This function unregisters JITed code and frees the corresponding