This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 5/6] Remove objfile argument from add_dyn_prop
- 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: Tue, 16 Jan 2018 10:32:38 -0500
- Subject: Re: [RFA 5/6] Remove objfile argument from add_dyn_prop
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <20180106002621.21099-1-tom@tromey.com> <20180106002621.21099-6-tom@tromey.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 2018-01-05 07:26 PM, Tom Tromey wrote:
> The objfile argument to add_dyn_prop is redundant, so this patch
> removes it.
>
> 2018-01-05 Tom Tromey <tom@tromey.com>
>
> * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
> * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
> (create_array_type_with_stride): Update.
> * dwarf2read.c (set_die_type): Update.
Hi Tom,
> @@ -2305,13 +2304,13 @@ get_dyn_prop (enum dynamic_prop_node_kind prop_kind, const struct type *type)
>
> void
> add_dyn_prop (enum dynamic_prop_node_kind prop_kind, struct dynamic_prop prop,
> - struct type *type, struct objfile *objfile)
> + struct type *type)
> {
> struct dynamic_prop_list *temp;
>
> gdb_assert (TYPE_OBJFILE_OWNED (type));
>
> - temp = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop_list);
> + temp = XOBNEW (&TYPE_OBJFILE (type)->objfile_obstack, struct dynamic_prop_list);
This line is now too long.
Otherwise, LGTM.
Simon