aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-08-24 08:53:30 -0600
committerTom Tromey <tromey@adacore.com>2023-09-28 10:46:38 -0600
commit5153027c7ffba3cbb8c6fd78144eed2e386ac952 (patch)
treef35d1c6e692431fcbd57a3f91131a9aac63ee2b7
parentbb75a8698c262383fc7720edfa0685a14eea1400 (diff)
downloadgdb-5153027c7ffba3cbb8c6fd78144eed2e386ac952.zip
gdb-5153027c7ffba3cbb8c6fd78144eed2e386ac952.tar.gz
gdb-5153027c7ffba3cbb8c6fd78144eed2e386ac952.tar.bz2
Small constructor change to target_buffer
This changes the target_buffer constructor to initialize m_filename rather than assign to it. Reviewed-By: Lancelot Six <lancelot.six@amd.com>
-rw-r--r--gdb/gdb_bfd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index de7ecae..6b64e92 100644
--- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c
@@ -226,10 +226,10 @@ struct target_buffer
target memory. */
target_buffer (CORE_ADDR base, ULONGEST size)
: m_base (base),
- m_size (size)
+ m_size (size),
+ m_filename (xstrprintf ("<in-memory@%s>",
+ core_addr_to_string_nz (m_base)))
{
- m_filename
- = xstrprintf ("<in-memory@%s>", core_addr_to_string_nz (m_base));
}
/* Return the size of the in-memory BFD file. */