From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28273 invoked by alias); 26 Nov 2011 13:13:50 -0000 Received: (qmail 28263 invoked by uid 22791); 26 Nov 2011 13:13:49 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL,TW_BJ X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Nov 2011 13:13:36 +0000 Received: by iaek3 with SMTP id k3so7781065iae.0 for ; Sat, 26 Nov 2011 05:13:35 -0800 (PST) Received: by 10.42.161.132 with SMTP id t4mr17254533icx.16.1322313215533; Sat, 26 Nov 2011 05:13:35 -0800 (PST) Received: from [127.0.0.1] ([203.110.240.205]) by mx.google.com with ESMTPS id ft1sm65668870igc.3.2011.11.26.05.13.31 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 Nov 2011 05:13:34 -0800 (PST) Message-ID: <4ED0E6F9.8090101@playingwithpointers.com> Date: Sat, 26 Nov 2011 13:13:00 -0000 From: Sanjoy Das User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16 MIME-Version: 1.0 To: Jan Kratochvil CC: gdb-patches@sourceware.org, Stan Shebs Subject: Re: Regression for gdb.base/jit.exp and gdb.base/jit-so.exp [Re: JIT Interface Patches Landed] References: <4EC8D2D4.1080402@playingwithpointers.com> <4EC9CE39.40604@earthlink.net> <20111126002251.GA5257@host1.jankratochvil.net> In-Reply-To: <20111126002251.GA5257@host1.jankratochvil.net> Content-Type: multipart/mixed; boundary="------------050806020303080608010602" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00711.txt.bz2 This is a multi-part message in MIME format. --------------050806020303080608010602 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 173 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 --------------050806020303080608010602 Content-Type: text/x-diff; name="bugfix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bugfix.diff" Content-length: 1874 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 --------------050806020303080608010602--