Message ID | gerrit.1574686491000.Ie66064f3aaa1c74facfc025c8d87f3a057869779@gnutoolchain-gerrit.osci.io |
---|---|
State | New, archived |
Headers |
Received: (qmail 110726 invoked by alias); 25 Nov 2019 12:54:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 110716 invoked by uid 89); 25 Nov 2019 12:54:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=8747, H*F:D*io, HContent-Transfer-Encoding:8bit X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Nov 2019 12:54:55 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id D967520387; Mon, 25 Nov 2019 07:54:52 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id B43A220362 for <gdb-patches@sourceware.org>; Mon, 25 Nov 2019 07:54:51 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 9181520AF6 for <gdb-patches@sourceware.org>; Mon, 25 Nov 2019 07:54:51 -0500 (EST) X-Gerrit-PatchSet: 1 Date: Mon, 25 Nov 2019 07:54:51 -0500 From: "Mihails Strasuns (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io> To: gdb-patches@sourceware.org Message-ID: <gerrit.1574686491000.Ie66064f3aaa1c74facfc025c8d87f3a057869779@gnutoolchain-gerrit.osci.io> Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: [review] jit: minor improvement to debug logging X-Gerrit-Change-Id: Ie66064f3aaa1c74facfc025c8d87f3a057869779 X-Gerrit-Change-Number: 703 X-Gerrit-ChangeURL: <https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/703> X-Gerrit-Commit: 257b54210af38c96fc72a155f0ca884c939d312d References: <gerrit.1574686491000.Ie66064f3aaa1c74facfc025c8d87f3a057869779@gnutoolchain-gerrit.osci.io> Reply-To: mihails.strasuns@intel.com, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Content-Type: text/plain; charset=UTF-8 |
Commit Message
Simon Marchi (Code Review)
Nov. 25, 2019, 12:54 p.m. UTC
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/703
......................................................................
jit: minor improvement to debug logging
gdb/ChangeLog:
2019-11-14 Mihails Strasuns <mihails.strasuns@intel.com>
* jit.c (jit_bfd_try_read_symtab): fix printed function name in the
debug output.
* jit.c (jit_unregister_code): add debug print to match
`jit_register_code`.
Signed-off-by: Mihails Strasuns <mihails.strasuns@intel.com>
Change-Id: Ie66064f3aaa1c74facfc025c8d87f3a057869779
---
M gdb/jit.c
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Simon Marchi has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/703 ...................................................................... Patch Set 1: (1 comment) Hi Mihails, Thanks for doing this, I just noted a small comment. | --- gdb/jit.c | +++ gdb/jit.c | @@ -953,17 +953,19 @@ jit_register_code (struct gdbarch *gdbarch, | } | | /* This function unregisters JITed code and frees the corresponding | objfile. */ | | static void | jit_unregister_code (struct objfile *objfile) | { | + if (jit_debug) | + fprintf_unfiltered (gdb_stdlog, "jit_unregister_code (%p)\n", objfile); PS1, Line 962: For a reason I can't remember, we don't use %p (because it's not reliable on some platform?). Use "%s" with host_address_to_string instead. | delete objfile; | } | | /* Look up the objfile with this code entry address. */ | | static struct objfile * | jit_find_objf_with_entry_addr (CORE_ADDR entry_addr) | { | for (objfile *objf : current_program_space->objfiles ())
Mihails Strasuns has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/703 ...................................................................... Patch Set 2: (1 comment) Switched to `host_address_to_string` | --- gdb/jit.c | +++ gdb/jit.c | @@ -953,17 +953,19 @@ jit_register_code (struct gdbarch *gdbarch, | } | | /* This function unregisters JITed code and frees the corresponding | objfile. */ | | static void | jit_unregister_code (struct objfile *objfile) | { | + if (jit_debug) | + fprintf_unfiltered (gdb_stdlog, "jit_unregister_code (%p)\n", objfile); PS1, Line 962: Done | delete objfile; | } | | /* Look up the objfile with this code entry address. */ | | static struct objfile * | jit_find_objf_with_entry_addr (CORE_ADDR entry_addr) | { | for (objfile *objf : current_program_space->objfiles ())
Tom Tromey has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/703 ...................................................................... Patch Set 2: Code-Review+2 Thank you. This is ok.
Luis Machado has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/703 ...................................................................... Patch Set 2: Small nit. Use capital letters when starting the ChangeLog sentences.
diff --git a/gdb/jit.c b/gdb/jit.c index 85a01ef..5014dfd 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -874,7 +874,7 @@ if (jit_debug) fprintf_unfiltered (gdb_stdlog, - "jit_register_code, symfile_addr = %s, " + "jit_bfd_try_read_symtab, symfile_addr = %s, " "symfile_size = %s\n", paddress (gdbarch, code_entry->symfile_addr), pulongest (code_entry->symfile_size)); @@ -958,6 +958,8 @@ static void jit_unregister_code (struct objfile *objfile) { + if (jit_debug) + fprintf_unfiltered (gdb_stdlog, "jit_unregister_code (%p)\n", objfile); delete objfile; }