* jit.c (bfd_open_from_target_memory): Move higher in file.
authorTom Tromey <tromey@redhat.com>
Wed, 1 Feb 2012 20:16:24 +0000 (20:16 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 1 Feb 2012 20:16:24 +0000 (20:16 +0000)
gdb/ChangeLog
gdb/jit.c

index b53d1b70778a88870f6788ab14c8e9eba80c3b84..a8b29b69da2802836d4503c24063c7177b870f2a 100644 (file)
@@ -1,3 +1,7 @@
+2012-02-01  Tom Tromey  <tromey@redhat.com>
+
+       * jit.c (bfd_open_from_target_memory): Move higher in file.
+
 2012-02-01  Tristan Gingold  <gingold@adacore.com>
 
        * libunwind-frame.c (libunwind_load): Display message if dlopen
index 464490c2a7161b9d09656de55a5850b2ede9b16a..44b080f01b2f37523442c5c2762a9dab22d524de 100644 (file)
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -127,6 +127,24 @@ mem_bfd_iovec_stat (struct bfd *abfd, void *stream, struct stat *sb)
   return 0;
 }
 
+/* Open a BFD from the target's memory.  */
+
+static struct bfd *
+bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST size, char *target)
+{
+  const char *filename = xstrdup ("<in-memory>");
+  struct target_buffer *buffer = xmalloc (sizeof (struct target_buffer));
+
+  buffer->base = addr;
+  buffer->size = size;
+  return bfd_openr_iovec (filename, target,
+                          mem_bfd_iovec_open,
+                          buffer,
+                          mem_bfd_iovec_pread,
+                          mem_bfd_iovec_close,
+                          mem_bfd_iovec_stat);
+}
+
 /* One reader that has been loaded successfully, and can potentially be used to
    parse debug info.  */
 
@@ -213,24 +231,6 @@ jit_reader_unload_command (char *args, int from_tty)
   loaded_jit_reader = NULL;
 }
 
-/* Open a BFD from the target's memory.  */
-
-static struct bfd *
-bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST size, char *target)
-{
-  const char *filename = xstrdup ("<in-memory>");
-  struct target_buffer *buffer = xmalloc (sizeof (struct target_buffer));
-
-  buffer->base = addr;
-  buffer->size = size;
-  return bfd_openr_iovec (filename, target,
-                          mem_bfd_iovec_open,
-                          buffer,
-                          mem_bfd_iovec_pread,
-                          mem_bfd_iovec_close,
-                          mem_bfd_iovec_stat);
-}
-
 /* Per-inferior structure recording the addresses in the inferior.  */
 
 struct jit_inferior_data