This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: RFA: Split linespec from symtab


Andrew Cagney wrote:
> 
> > Here is the ChangeLog:
> >
> >         * symtab.c (decode_line_1, total_number_of_methods, find_methods,
> >         build_command_line_spec, find_toplevel_char, decode_line_2):
> >         Move to linespec.c.
> >         * linespec.c: New file. Routines that handle linespecs, formerly
> >         in symtab.c.
> >         * symtab.h: Export find_line_symtab and find_function_start_sal,
> >         * Makefile.in: Add linespec.c.
> >
> 
> Fernando,
> 
> Do you intend moving the declarations for the functions exported by
> linespec.c to a new linespec.h file?
> 

It is just decode_line_1.  As I mentioned, I plan to do it on a second step,
as it requires some debate.

The main reason is that the routines that use that function (which should
be renamed to parse_linespec in my opinion) are CLI commands, which will
have to be moved out of libgdb and into CLI specific files.

We need (a) header file(s) for CLI internal stuff and another for exporting 
functions that can be used by more than one interpreter or by script
languages and the GUI.  Both command.h and gdbcmd.h are for the command.c
internal machinery and gdbcmd.h is for things to be exported to CLI 
command implementation bits.

Maybe gdbcmd.h should be the name of this exported functions file,
and its current contents should go into a cli-cmds.h file.

How does that sound?


> As for how to format the ChangeLog, have a look at other earlier but
> similar moves (is that a stray comma?).  The Makefile.in entry should
> mention the makefile variable(s) being updated.  I suspect that you
> added linespec.o somewhere.
> 

Sorry for the comma.  It was a typo.  Thanks for mentioning the Makefile.in
format.  I will fix it so it mentions the two macros affected and the target
added.


> I'll update MAINTAINERS to reflect the creation of the new file.
> 

Thanks.

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

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