diff options
author | Mihails Strasuns <mihails.strasuns@intel.com> | 2020-12-07 20:54:03 +0100 |
---|---|---|
committer | Mihails Strasuns <mihails.strasuns@intel.com> | 2020-12-10 11:18:00 +0100 |
commit | 15cc148fb817bc1eb91aa16e5d94e39ebafc11ee (patch) | |
tree | ccae04d13503626501e682f6f5cafc53d8b3b934 /gdb/gdb_bfd.h | |
parent | c2137f55ad04e451d834048d4bfec1de2daea20e (diff) | |
download | gdb-15cc148fb817bc1eb91aa16e5d94e39ebafc11ee.zip gdb-15cc148fb817bc1eb91aa16e5d94e39ebafc11ee.tar.gz gdb-15cc148fb817bc1eb91aa16e5d94e39ebafc11ee.tar.bz2 |
gdb: move bfd_open_from_target_memory to gdb_bfd
This function allows to create a BFD handle using an accessible memory
range in a target memory. It is currently contained in a JIT module but
this functionality may be of wider usefullness - for example, reading
ELF binaries contained within a core dump.
gdb/ChangeLog:
2020-12-07 Mihails Strasuns <mihails.strasuns@intel.com>
* jit.c (mem_bfd*, bfd_open_from_target_memory): Removed.
* gdb_bfd.h (gdb_bfd_open_from_target_memory): New function.
* gdb_bfd.c (mem_bfd*, gdb_bfd_open_from_target_memory): New functions.
Diffstat (limited to 'gdb/gdb_bfd.h')
-rw-r--r-- | gdb/gdb_bfd.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/gdb_bfd.h b/gdb/gdb_bfd.h index 1233097..5c1a954 100644 --- a/gdb/gdb_bfd.h +++ b/gdb/gdb_bfd.h @@ -194,6 +194,12 @@ int gdb_bfd_requires_relocations (bfd *abfd); bool gdb_bfd_get_full_section_contents (bfd *abfd, asection *section, gdb::byte_vector *contents); +/* Create and initialize a BFD handle from a target in-memory range. */ + +gdb_bfd_ref_ptr gdb_bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST size, + const char *target, + const char *filename = nullptr); + /* Range adapter for a BFD's sections. To be used as: |