[PATCH] Add the "-info-os" command to MI

Tom Tromey tromey@redhat.com
Tue Nov 29 19:01:00 GMT 2011


>>>>> ">" == Kwok Cheung Yeung <kcy@codesourcery.com> writes:

>> I've now created a new mi_cmd_info_os function to service -info-os,
>> which delegates to info_osdata_command in osdata.c. This is the same
>> backend that 'info os' in the CLI uses, but at least now we don't go
>> through the CLI code.
>> info_osdata_command now needs to be non-static.

Thanks for doing this.

>> gdb/
>> 	* Makefile.in (SUBDIR_MI_OBS): Add mi-cmd-info.o.
>> 	(SUBDIR_MI_SRCS): Add mi-cmd-info.c.
>> 	(mi-cmd-info.o): New rule.
>> 	* osdata.h: Add declaration for info_osdata_command.
>> 	* osdata.c (info_osdata_command): Change to non-static.
>> 	* mi/mi-cmds.c (mi_cmds): Add -info-os MI command.
>> 	* mi/mi-cmd-info.c: New.

Two nits...

>> +  { "info-os", { NULL, 0 }, mi_cmd_info_os},

mi_cmd_info_os doesn't seem to be declared anywhere.
I think this ought to cause a compilation error.

>> +      info_osdata_command (argv [0], 0);

No space before the '['.

Tom



More information about the Gdb-patches mailing list