[RFA] Constify mi_interpreter_exec and remove dup

Keith Seitz keiths@redhat.com
Tue Mar 12 17:56:00 GMT 2013


Hi,

This is the follow-on patch that I promised Tom which constifies 
mi_interpreter_exec and removes a memory allocation copying the input 
string (so that parse_exp_1 doesn't mutate it).

Keith

ChangeLog
2013-03-12  Keith Seitz  <keiths@redhat.com>

	* mi/mi-cmds.h (mi_execute_command): Make "cmd" const.
	* mi/mi-interp.c (mi_interpreter_exec): Make "command" const.
	Remove temporary copy of input string.
	(mi_execute_command_wrapper): Make "cmd" const.
	* mi/mi-main.c (mi_execute_command): Make "string_ptr" const.
	(mi_parse_argv): Make "args" const.
	Use const strings.
	(mi_parse): Make "cmd" const.
	Use const strings.
	* mi/mi-parse.h (mi_parse): Make "cmd" const.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-alloc-and-constify.patch
Type: text/x-patch
Size: 7272 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20130312/de863932/attachment.bin>


More information about the Gdb-patches mailing list