aboutsummaryrefslogtreecommitdiff
path: root/gdb/jit.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-02-01 20:16:24 +0000
committerTom Tromey <tromey@redhat.com>2012-02-01 20:16:24 +0000
commitf0bbc364ac022e53f4a338c9bf0478a1b6ebc43a (patch)
treea03e758d0f5332667d4f4df675f3feecb0b608b0 /gdb/jit.c
parent36e32b27f61b7bcb0d4bf0299936acfa0a002c92 (diff)
downloadgdb-f0bbc364ac022e53f4a338c9bf0478a1b6ebc43a.zip
gdb-f0bbc364ac022e53f4a338c9bf0478a1b6ebc43a.tar.gz
gdb-f0bbc364ac022e53f4a338c9bf0478a1b6ebc43a.tar.bz2
* jit.c (bfd_open_from_target_memory): Move higher in file.
Diffstat (limited to 'gdb/jit.c')
-rw-r--r--gdb/jit.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/gdb/jit.c b/gdb/jit.c
index 464490c..44b080f 100644
--- 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