[RFA 3/5] Explicit linespecs - implementation

Keith Seitz keiths@redhat.com
Fri Jul 27 03:48:00 GMT 2012


Hi,

Ok, so here's what everyone has been waiting for. This patch adds the 
implementation of explicit linespecs, including CLI and MI support.

Reminder: You must apply the previous patch (breakpoint-api) before 
applying this patch.

Questions/comments/concerns?
Keith

ChangeLog
2012-07-26  Keith Seitz  <keiths@redhat.com>

	* breakpoint.h (struct breakpoint): Add EXPLICIT.
	* breakpoint.c (update_breakpoints_after_exec):
	Don't delete the breakpoint if B->EXPLICIT is non-NULL.
	(print_breakpoint_location): For pending explicit breakpoints,
	use explicit_linespec_to_string to print out an appropriate
	address string.
	(explicit_linespec_unsupported): New function.
	(init_breakpoint_sal): If ELS in non-NULL, copy it into
	the struct breakpoint.
	(parse_breakpoint_sals): If ELS is non-NULL, call
	decode_explicit_linespec instead of decode_line_full.
	(create_breakpoint_1): Deal with explicit linespecs.
	(break_command_1): Check for an explicit linespec.
	(say_where): For pending explicit breakpoints, use
	explicit_linepsec_to_string to print out an address string.
	(base_breakpoint_dtor): Free any explicit_linespec associated
	with the breakpoint.
	(bkpt_re_set): Don't delete the breakpoint if B->EXPLICIT
	is non-NULL.
	(strace_marker_decode_linespec): Error if explicit_linespec
	is non-NULL.
	(decode_linespec_default): Call decode_explicit_linespec if
	explicit_linespec is non-NULL.
	* linespec.h (struct linespec_result): Add EXPLICIT.
	(new_explicit_linespec, free_explicit_linespec,
	copy_explicit_linespec, explicit_linespec_to_string,
	string_to_explicit_linespec,
	decode_explicit_linespec): Declare.
	* linespec.c (canonicalize_linespec): Build an explicit linespec
	representation, too.
	(destroy_linespec_result): Free the explicit_linespec.
	(new_explicit_linespec, free_explicit_linespec,
	explicit_lex_one, string_to_explicit_linespec,
	copy_explicit_linespec, explicit_linespec_to_string):
	New functions.
	* mi/mi-cmd-break.c: Include linespec.h.
	(mi_cmd_break_insert): Add options for explicit
	linespecs and pass them to create_breakpoint.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: els-explicit-linespec.patch
Type: text/x-patch
Size: 31854 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120727/4e8e17b8/attachment.bin>


More information about the Gdb-patches mailing list