This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/4] Poison XNEW and friends for non-POD types
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>
- Date: Wed, 22 Nov 2017 11:41:03 -0500
- Subject: [PATCH 0/4] Poison XNEW and friends for non-POD types
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
As we convert types to C++, one easy mistake to do is forget to change a
XNEW(T) to new T. This patch helps ensure that we don't use XNEW (or similar)
with types that require using new. xfree is also "poisoned" the same way.
The first three patches fix the last things that were in the way of doing this
change, and patch 4 adds the actual poisoning.
Simon Marchi (4):
Create private_inferior class hierarchy
remote: C++ify thread_item and threads_listing_context
Create private_thread_info hierarchy
Poison XNEW and friends for types that should use new/delete
gdb/Makefile.in | 2 +
gdb/aix-thread.c | 49 +++---
gdb/common/common-utils.c | 7 -
gdb/common/common-utils.h | 14 +-
gdb/common/poison.h | 132 +++++++++++++++
gdb/common/rsp-low.c | 13 ++
gdb/common/rsp-low.h | 6 +
gdb/darwin-nat-info.c | 50 +++---
gdb/darwin-nat.c | 297 ++++++++++++++++++----------------
gdb/darwin-nat.h | 35 ++--
gdb/gdbthread.h | 18 ++-
gdb/inferior.c | 4 +-
gdb/inferior.h | 9 +-
gdb/linux-thread-db.c | 41 ++---
gdb/nto-procfs.c | 30 +---
gdb/nto-tdep.c | 10 +-
gdb/nto-tdep.h | 10 +-
gdb/remote.c | 329 ++++++++++++++++----------------------
gdb/thread.c | 14 +-
gdb/unittests/rsp-low-selftests.c | 59 +++++++
20 files changed, 654 insertions(+), 475 deletions(-)
create mode 100644 gdb/unittests/rsp-low-selftests.c
--
2.7.4