Small constructor change to target_buffer
authorTom Tromey <tromey@adacore.com>
Thu, 24 Aug 2023 14:53:30 +0000 (08:53 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 28 Sep 2023 16:46:38 +0000 (10:46 -0600)
This changes the target_buffer constructor to initialize m_filename
rather than assign to it.

Reviewed-By: Lancelot Six <lancelot.six@amd.com>
gdb/gdb_bfd.c

index de7ecaea6300d6c71cd98a135167fe55dbded967..6b64e92b48ef9fa8f062c4a9f629799cc82e1b57 100644 (file)
@@ -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.  */