[binutils-gdb] Small constructor change to target_buffer

Tom Tromey tromey@sourceware.org
Thu Sep 28 16:58:48 GMT 2023


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5153027c7ffba3cbb8c6fd78144eed2e386ac952

commit 5153027c7ffba3cbb8c6fd78144eed2e386ac952
Author: Tom Tromey <tromey@adacore.com>
Date:   Thu Aug 24 08:53:30 2023 -0600

    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>

Diff:
---
 gdb/gdb_bfd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index de7ecaea630..6b64e92b48e 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.  */


More information about the Gdb-cvs mailing list