summaryrefslogtreecommitdiff
path: root/gdb/linespec.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-03-24 19:39:46 +0000
committerTom Tromey <tromey@redhat.com>2011-03-24 19:39:46 +0000
commit83751839f11bd491cc8ba9e1037637e435750a62 (patch)
treec6e3b6b9fb3a94542a1bcd7ceec86a5fa1a12a5e /gdb/linespec.h
parentb9aab2c77cfafa68ba46956685f74b5481ca95fd (diff)
downloadgdb-83751839f11bd491cc8ba9e1037637e435750a62.tar.gz
* symtab.c (decode_line_spec): Update.
* linespec.c (build_canonical_line_spec): Change type of 'canonical'. (decode_line_2, decode_line_1, decode_objc, decode_compound) (find_method, decode_all_digits, decode_dollar, decode_label) (symbol_found): Likewise. (init_linespec_result): New function. * breakpoint.c (struct captured_parse_breakpoint_args) <canonical_p>: New field, replaces addr_string_p. (create_breakpoints_sal): Add 'canonical' parameter, replacing 'addr_string'. (parse_breakpoint_sals): Likewise. (do_captured_parse_breakpoint): Update. (create_breakpoint): Use struct linespec_result. (until_break_command): Update. (breakpoint_re_set_one): Update. (decode_line_spec_1): Update. * linespec.h (struct linespec_result): New. (init_linespec_result): Declare.
Diffstat (limited to 'gdb/linespec.h')
-rw-r--r--gdb/linespec.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/gdb/linespec.h b/gdb/linespec.h
index 72016389a08..3366fc69506 100644
--- a/gdb/linespec.h
+++ b/gdb/linespec.h
@@ -20,9 +20,27 @@
struct symtab;
+/* An instance of this may be filled in by decode_line_1. The caller
+ must call init_linespec_result to initialize it. */
+
+struct linespec_result
+{
+ /* If non-NULL, an array of canonical names for returned
+ symtab_and_line objects. The array has as many elements as the
+ `nelts' field in the symtabs_and_line returned by decode_line_1.
+ An element in the array may be NULL. The array and each non-NULL
+ element in it are allocated with xmalloc and must be freed by the
+ caller. */
+ char **canonical;
+};
+
+/* Initialize a linespec_result. */
+
+extern void init_linespec_result (struct linespec_result *);
+
extern struct symtabs_and_lines
decode_line_1 (char **argptr, int funfirstline,
struct symtab *default_symtab, int default_line,
- char ***canonical, int *not_found_ptr);
+ struct linespec_result *canonical, int *not_found_ptr);
#endif /* defined (LINESPEC_H) */