This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Change objfile to use new/delete
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Tom Tromey <tom at tromey dot com>, <gdb-patches at sourceware dot org>
- Date: Thu, 12 Oct 2017 17:41:47 -0400
- Subject: Re: [RFA] Change objfile to use new/delete
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <20171012181913.4585-1-tom@tromey.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 2017-10-12 02:19 PM, Tom Tromey wrote:
> This changes objfiles to use new and delete rather than xmalloc and
> free. Simon noticed that it uses a non-POD and so shouldn't be
> allocated with XCNEW; and I wanted to be able to use another non-POD as
> a member; this patch is the result.
>
> Regression tested by the buildbot.
This LGTM, just one formatting nit.
> @@ -277,11 +277,16 @@ struct objfile_per_bfd_storage
>
> struct objfile
> {
> + objfile (bfd *, const char *name, objfile_flags);
Let's try to be consistent in one prototype, either include the parameter
names or not.
Thanks,
Simon