diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2023-05-09 10:39:07 +0000 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2023-10-17 15:46:05 +0000 |
commit | c96ceed9dce7617f270aa4742645706e535f74b7 (patch) | |
tree | 64704994f8e743117085f50594f93831a97f5204 /gdb/gdb_bfd.c | |
parent | 998a4f589d68503f79695f180fdf1742eeb0a39d (diff) | |
download | gdb-c96ceed9dce7617f270aa4742645706e535f74b7.zip gdb-c96ceed9dce7617f270aa4742645706e535f74b7.tar.gz gdb-c96ceed9dce7617f270aa4742645706e535f74b7.tar.bz2 |
gdb: include the end address in in-memory bfd filenames
Commit
66984afd29e gdb: include the base address in in-memory bfd filenames
added the base address to in-memory bfd filenames. Also add the end
address to allow dumping the in-memory bfd using the 'dump memory'
command.
Diffstat (limited to 'gdb/gdb_bfd.c')
-rw-r--r-- | gdb/gdb_bfd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c index 217753c..56a4c5e 100644 --- a/gdb/gdb_bfd.c +++ b/gdb/gdb_bfd.c @@ -227,8 +227,9 @@ struct target_buffer : public gdb_bfd_iovec_base target_buffer (CORE_ADDR base, ULONGEST size) : m_base (base), m_size (size), - m_filename (xstrprintf ("<in-memory@%s>", - core_addr_to_string_nz (m_base))) + m_filename (xstrprintf ("<in-memory@%s-%s>", + core_addr_to_string_nz (m_base), + core_addr_to_string_nz (m_base + m_size))) { } @@ -241,7 +242,7 @@ struct target_buffer : public gdb_bfd_iovec_base { return m_base; } /* Return a generated filename for the in-memory BFD file. The generated - name will include the M_BASE value. */ + name will include the begin and end address of the in-memory file. */ const char *filename () const { return m_filename.get (); } |