From: Sanjoy Das <sanjoy@playingwithpointers.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org, Stan Shebs <stanshebs@earthlink.net>
Subject: Re: Regression for gdb.base/jit.exp and gdb.base/jit-so.exp [Re: JIT Interface Patches Landed]
Date: Sat, 26 Nov 2011 13:13:00 -0000 [thread overview]
Message-ID: <4ED0E6F9.8090101@playingwithpointers.com> (raw)
In-Reply-To: <20111126002251.GA5257@host1.jankratochvil.net>
[-- Attachment #1: Type: text/plain, Size: 173 bytes --]
Hi,
Sorry for the delayed response. I've attached the fix. With this
patch GDB passes both jit.exp and jit-so.exp.
Thanks!
--
Sanjoy Das
http://playingwithpointers.com
[-- Attachment #2: bugfix.diff --]
[-- Type: text/x-diff, Size: 1874 bytes --]
diff --git a/gdb/jit.c b/gdb/jit.c
index 7bd6b36..6bfe1b6 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -713,7 +713,8 @@ jit_object_close_impl (struct gdb_symbol_callbacks *cb,
/* Try to read CODE_ENTRY using the loaded jit reader (if any). */
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 +736,7 @@ jit_reader_try_read_symtab (struct jit_code_entry *code_entry)
&priv_data
};
- priv_data = code_entry->symfile_addr;
+ priv_data = entry_addr;
if (!loaded_jit_reader)
return 0;
@@ -769,6 +770,7 @@ jit_reader_try_read_symtab (struct jit_code_entry *code_entry)
static void
jit_bfd_try_read_symtab (struct jit_code_entry *code_entry,
+ CORE_ADDR entry_addr,
struct gdbarch *gdbarch)
{
bfd *nbfd;
@@ -832,7 +834,7 @@ JITed symbol file is not an object file, ignoring it.\n"));
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 +857,10 @@ jit_register_code (struct gdbarch *gdbarch,
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
next prev parent reply other threads:[~2011-11-26 13:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-20 10:09 JIT Interface Patches Landed Sanjoy Das
2011-11-21 4:06 ` Stan Shebs
2011-11-26 0:23 ` Regression for gdb.base/jit.exp and gdb.base/jit-so.exp [Re: JIT Interface Patches Landed] Jan Kratochvil
2011-11-26 13:13 ` Sanjoy Das [this message]
2011-11-27 10:53 ` Jan Kratochvil
2011-11-27 14:27 ` Sanjoy Das
2011-11-27 14:30 ` Jan Kratochvil
2011-11-27 14:38 ` Sanjoy Das
2011-11-27 14:41 ` Sanjoy Das
2011-11-27 18:29 ` Joel Brobecker
2011-11-27 18:56 ` Sanjoy Das
2011-11-27 19:00 ` Jan Kratochvil
2011-11-29 8:33 ` Sanjoy Das
2011-11-29 16:37 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ED0E6F9.8090101@playingwithpointers.com \
--to=sanjoy@playingwithpointers.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=stanshebs@earthlink.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox