Patchwork [pushed] jit: minor improvement to debug logging

login
register
mail settings
Submitter Simon Marchi (Code Review)
Date Nov. 28, 2019, 9:07 a.m.
Message ID <20191128090707.7FDAB28173@gnutoolchain-gerrit.osci.io>
Download mbox | patch
Permalink /patch/36345/
State New
Headers show

Comments

Simon Marchi (Code Review) - Nov. 28, 2019, 9:07 a.m.
Sourceware to Gerrit sync has submitted this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/703
......................................................................

jit: minor improvement to debug logging

gdb/ChangeLog:
2019-11-28  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`.

Change-Id: Ie66064f3aaa1c74facfc025c8d87f3a057869779
---
M gdb/ChangeLog
M gdb/jit.c
2 files changed, 11 insertions(+), 1 deletion(-)

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6bd149b..49f17ec 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@ 
+2019-11-28  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`.
+
 2019-11-27  Christian Biesinger  <cbiesinger@google.com>
 
 	* NEWS: Mention the new multithreaded symbol loading.
diff --git a/gdb/jit.c b/gdb/jit.c
index 85a01ef..480b459 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,9 @@ 
 static void
 jit_unregister_code (struct objfile *objfile)
 {
+  if (jit_debug)
+    fprintf_unfiltered (gdb_stdlog, "jit_unregister_code (%s)\n",
+			host_address_to_string (objfile));
   delete objfile;
 }