This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 2/9] compile: Distribute scope, add scope_data
- From: Pedro Alves <palves at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org
- Cc: Phil Muldoon <pmuldoon at redhat dot com>
- Date: Wed, 29 Apr 2015 16:43:59 +0100
- Subject: Re: [PATCH v3 2/9] compile: Distribute scope, add scope_data
- Authentication-results: sourceware.org; auth=none
- References: <20150411194322 dot 29128 dot 52477 dot stgit at host1 dot jankratochvil dot net> <20150411194341 dot 29128 dot 87444 dot stgit at host1 dot jankratochvil dot net>
On 04/11/2015 08:43 PM, Jan Kratochvil wrote:
> Provide a way to access current 'scope' during struct the do_module_cleanup
"struct" ?
> stage and associate more data with it.
>
> It should be all sub-classed but AFAIK GDB does not require C++ compiler yet.
>
Right, it does not.
> gdb/ChangeLog
> 2015-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * cli/cli-script.c (execute_control_command): Update
> eval_compile_command caller.
> * compile/compile-object-load.c (compile_object_load): Add parameters
> scope and scope_data. Set them.
> * compile/compile-object-load.h (struct compile_module): Add fields
> scope and scope_data.
> (compile_object_load): Add parameters scope and scope_data.
> * compile/compile-object-run.c (struct do_module_cleanup): Add fields
> scope and scope_data.
> (compile_object_run): Propage the fields scope and scope_data.
Propagate.
> * compile/compile.c (compile_file_command, compile_code_command):
> Update eval_compile_command callers.
> (eval_compile_command): Add parameter scope_data. Pass it plus scope.
> * compile/compile.h (eval_compile_command): Add parameter scope_data.
> * defs.h (struct command_line): Add field
>
> extern struct compile_module *compile_object_load (const char *object_file,
> - const char *source_file);
> + const char *source_file,
> + enum compile_i_scope_types scope,
> + void *scope_data);
If the line overflows, then break before the (, and indent with two spaces.
See e.g., extension.h:
extern const struct extension_language_defn *get_ext_lang_defn
(enum extension_language lang);
Otherwise OK.
Thanks,
Pedro Alves