Merge branch 'master' into merge-job
[deliverable/binutils-gdb.git] / gdb / buildsym.h
index 193832fc37a556bc6ab165a3c5a8238ed653129e..a69e551f8be7cac5dc7fee3b24bb78631d97eed4 100644 (file)
@@ -258,7 +258,7 @@ struct buildsym_compunit
 
   void record_debugformat (const char *format)
   {
-    m_debugformat = format;
+    m_debugformat = make_unique_xstrdup (format);
   }
 
   void record_producer (const char *producer)
@@ -325,9 +325,8 @@ private:
      the same lifetime as objfile.  */
   const char *m_producer = nullptr;
 
-  /* Space for this is not malloc'd, and is assumed to have at least
-     the same lifetime as objfile.  */
-  const char *m_debugformat = nullptr;
+  /* Space for this is malloc'd.  */
+  gdb::unique_xmalloc_ptr<char> m_debugformat;
 
   /* The compunit we are building.  */
   struct compunit_symtab *m_compunit_symtab = nullptr;
This page took 0.02451 seconds and 4 git commands to generate.