This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 2/9] compile: Distribute scope, add scope_data


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]