aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-02-11 17:31:10 -0700
committerTom Tromey <tom@tromey.com>2020-02-11 17:57:46 -0700
commitf92ff6b55219a7c4c54a62412e194bbda713cf46 (patch)
tree75f1ddff6f0afd3b60a093a659156c88ddbc20f2 /gdb
parent3fd6912bb1066ae047de2ade1201a823f366fc8e (diff)
downloadgdb-f92ff6b55219a7c4c54a62412e194bbda713cf46.zip
gdb-f92ff6b55219a7c4c54a62412e194bbda713cf46.tar.gz
gdb-f92ff6b55219a7c4c54a62412e194bbda713cf46.tar.bz2
Don't allow copying of auto_obstack
Add DISABLE_COPY_AND_ASSIGN to struct auto_obstack, to prevent copying it. Copying an auto_obstack would be a bug. 2020-02-11 Tom Tromey <tom@tromey.com> * gdb_obstack.h (struct auto_obstack): Use DISABLE_COPY_AND_ASSIGN. Change-Id: Ic9e5ab20acfcfa61c241fed4d99bbb1caefba3cd
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdb_obstack.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 72a6292..4a4fa05 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2020-02-11 Tom Tromey <tom@tromey.com>
+ * gdb_obstack.h (struct auto_obstack): Use
+ DISABLE_COPY_AND_ASSIGN.
+
+2020-02-11 Tom Tromey <tom@tromey.com>
+
* dwarf2/frame.h (struct objfile): Don't forward declare.
2020-02-11 Christian Biesinger <cbiesinger@google.com>
diff --git a/gdb/gdb_obstack.h b/gdb/gdb_obstack.h
index fb9295f..9b1d907 100644
--- a/gdb/gdb_obstack.h
+++ b/gdb/gdb_obstack.h
@@ -125,6 +125,8 @@ struct auto_obstack : obstack
~auto_obstack ()
{ obstack_free (this, NULL); }
+ DISABLE_COPY_AND_ASSIGN (auto_obstack);
+
/* Free all memory in the obstack but leave it valid for further
allocation. */
void clear ()