Remove commented-out code in jv-lang.c
[binutils-gdb.git] / gdb / jit.c
index ffc6735903fee00cba3d0f493cc5d6f2d6b223f3..42ef8efb5cad4ecb01f0c3eb06fb178ec2891688 100644 (file)
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -1,7 +1,6 @@
 /* Handle JIT code generation in the inferior for GDB, the GNU Debugger.
 
-   Copyright (C) 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -253,7 +252,7 @@ JITed symbol file is not an object file, ignoring it.\n"));
         /* We assume that these virtual addresses are absolute, and do not
            treat them as offsets.  */
         sai->other[i].addr = bfd_get_section_vma (nbfd, sec);
-        sai->other[i].name = (char *) bfd_get_section_name (nbfd, sec);
+        sai->other[i].name = xstrdup (bfd_get_section_name (nbfd, sec));
         sai->other[i].sectindex = sec->index;
         ++i;
       }
@@ -314,7 +313,6 @@ jit_inferior_init (struct gdbarch *gdbarch)
   struct jit_descriptor descriptor;
   struct jit_code_entry cur_entry;
   CORE_ADDR cur_entry_addr;
-  struct cleanup *old_cleanups;
 
   /* When we register code, GDB resets its breakpoints in case symbols have
      changed.  That in turn calls this handler, which makes us look for new
@@ -398,7 +396,7 @@ jit_inferior_created_observer (struct target_ops *objfile, int from_tty)
    for example when it crashes.  */
 
 static void
-jit_inferior_exit_hook (int pid)
+jit_inferior_exit_hook (struct inferior *inf)
 {
   struct objfile *objf;
   struct objfile *temp;
@@ -436,8 +434,8 @@ jit_event_handler (struct gdbarch *gdbarch)
     case JIT_UNREGISTER:
       objf = jit_find_objf_with_entry_addr (entry_addr);
       if (objf == NULL)
-        printf_unfiltered ("Unable to find JITed code entry at address: %p\n",
-                           (void *) entry_addr);
+       printf_unfiltered (_("Unable to find JITed code entry at address: %s\n"),
+                          paddress (gdbarch, entry_addr));
       else
         jit_unregister_code (objf);