diff options
author | Pedro Alves <palves@redhat.com> | 2017-04-13 16:15:35 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-04-13 16:18:16 +0100 |
commit | 0550c9559522c84341edcb334af30bc9bf2df9fb (patch) | |
tree | f8b901ca49c06e2f92bd1d0c1e1c362c11f96312 /gdb/fbsd-nat.c | |
parent | e3d60dfc000a29959c78bd69b85100aab33f7ab5 (diff) | |
download | gdb-0550c9559522c84341edcb334af30bc9bf2df9fb.zip gdb-0550c9559522c84341edcb334af30bc9bf2df9fb.tar.gz gdb-0550c9559522c84341edcb334af30bc9bf2df9fb.tar.bz2 |
Make inferior a class with cdtors, and use new/delete
struct inferior became a non-POD when enum_flags was made a non-POD,
so we should be allocating/destroying inferiors with new/delete, etc.
That's what this commit does.
Note: this commit makes all boolean fields of inferior be "bool",
except the "detaching" field. That'll require more work, so I split
it to a separate patch.
gdb/ChangeLog:
2017-04-13 Pedro Alves <palves@redhat.com>
* inferior.c (free_inferior): Convert to ...
(inferior::~inferior): ... this dtor.
(inferior::inferior): New ctor, factored out from ...
(add_inferior_silent): ... here. Allocate the inferior with a new
expression.
(delete_inferior): Call delete instead of free_inferior.
* inferior.h (gdb_environ, continuation): Forward declare.
(inferior): Now a class. Add in-class initialization to all
members. Make boolean fields bool, except 'detaching'.
(inferior::inferior): New explicit ctor.
(inferior::~inferior): New.
Diffstat (limited to 'gdb/fbsd-nat.c')
0 files changed, 0 insertions, 0 deletions