aboutsummaryrefslogtreecommitdiff
path: root/gdb/completer.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2015-08-13 09:48:12 -0700
committerKeith Seitz <keiths@redhat.com>2015-08-13 09:48:12 -0700
commit67994074671a31e3d2fb78f6036f38095211ac49 (patch)
tree8ecdf5ca542151595bcdee36c8dcf63619cc0318 /gdb/completer.c
parent8efa2874ab298f3923f4127340da119435f87c39 (diff)
Mass rename `explicit' -> `explicit_loc'.
BuildBot reminded me that "explicit" is a reserved keyword in C++. This patch simply renames all the (illegal) uses of "explicit". This should fix the build errors with --enable-build-with-cxx bots. gdb/ChangeLog * break-catch-throw.c (re_set_exception_catchpoint) Rename reserved C++ keyword "explicit" to "explicit_loc". * breakpoint.c (create_overlay_event_breakpoint) (create_longjmp_master_breakpoint) (create_std_terminate_master_breakpoint) (create_exception_master_breakpoint, update_static_tracepoint): Rename reserved C++ keyword "explicit" to "explicit_loc". * completer.c (collect_explicit_location_matches) (explicit_location_completer): Rename reserved C++ keyword "explicit" to "explicit_loc". * linespec.c (struct linespec) <explicit>: Rename to "explicit_loc". (canonicalize_linespec, create_sals_line_offset) (convert_linespec_to_sals, convert_explicit_location_to_sals) (event_location_to_sals, decode_objc): Rename reserved C++ keyword "explicit" to "explicit_loc". * location.c (struct event_location) <explicit>: Rename to "explicit_loc". (initialize_explicit_location, new_explicit_location) (explicit_location_to_string_internal, explicit_location_to_linespec): Rename reserved C++ keyword "explicit" to "explicit_loc". * location.h (explicit_location_to_string) (explicit_location_to_linespec, initialize_explicit_location) (new_explicit_location): Rename reserved C++ keyword "explicit" to "explicit_loc". * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Rename reserved C++ keyword "explicit" to "explicit_loc".
Diffstat (limited to 'gdb/completer.c')
-rw-r--r--gdb/completer.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/gdb/completer.c b/gdb/completer.c
index 7fc27b1778..821f882562 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -358,14 +358,15 @@ collect_explicit_location_matches (struct event_location *location,
const char *word)
{
VEC (char_ptr) *matches = NULL;
- const struct explicit_location *explicit = get_explicit_location (location);
+ const struct explicit_location *explicit_loc
+ = get_explicit_location (location);
switch (what)
{
case MATCH_SOURCE:
{
- const char *text = (explicit->source_filename == NULL
- ? "" : explicit->source_filename);
+ const char *text = (explicit_loc->source_filename == NULL
+ ? "" : explicit_loc->source_filename);
matches = make_source_files_completion_list (text, word);
}
@@ -373,14 +374,14 @@ collect_explicit_location_matches (struct event_location *location,
case MATCH_FUNCTION:
{
- const char *text = (explicit->function_name == NULL
- ? "" : explicit->function_name);
+ const char *text = (explicit_loc->function_name == NULL
+ ? "" : explicit_loc->function_name);
- if (explicit->source_filename != NULL)
+ if (explicit_loc->source_filename != NULL)
{
- matches
- = make_file_symbol_completion_list (text, word,
- explicit->source_filename);
+ const char *filename = explicit_loc->source_filename;
+
+ matches = make_file_symbol_completion_list (text, word, filename);
}
else
matches = make_symbol_completion_list (text, word);
@@ -451,7 +452,8 @@ explicit_location_completer (struct cmd_list_element *ignore,
size_t len, offset;
const char *new_word, *end;
enum explicit_location_match_type what;
- struct explicit_location *explicit = get_explicit_location (location);
+ struct explicit_location *explicit_loc
+ = get_explicit_location (location);
/* Backup P to the previous word, which should be the option
the user is attempting to complete. */
@@ -463,17 +465,17 @@ explicit_location_completer (struct cmd_list_element *ignore,
if (strncmp (p, "-source", len) == 0)
{
what = MATCH_SOURCE;
- new_word = explicit->source_filename + offset;
+ new_word = explicit_loc->source_filename + offset;
}
else if (strncmp (p, "-function", len) == 0)
{
what = MATCH_FUNCTION;
- new_word = explicit->function_name + offset;
+ new_word = explicit_loc->function_name + offset;
}
else if (strncmp (p, "-label", len) == 0)
{
what = MATCH_LABEL;
- new_word = explicit->label_name + offset;
+ new_word = explicit_loc->label_name + offset;
}
else
{