From: Tom Tromey Date: Thu, 24 Aug 2023 14:53:30 +0000 (-0600) Subject: Small constructor change to target_buffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5153027c7ffba3cbb8c6fd78144eed2e386ac952;p=binutils-gdb.git 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 --- 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 ("", + core_addr_to_string_nz (m_base))) { - m_filename - = xstrprintf ("", core_addr_to_string_nz (m_base)); } /* Return the size of the in-memory BFD file. */