+ * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Delete.
+ * utils.c (perror_string): New arg errno_value. All callers updated.
+ (throw_perror_with_name): Call throw_error_with_suberror.
+--- README.google 2015-09-06 00:17:17.000000000 -0700
++++ README.google 2015-09-06 00:28:23.000000000 -0700
++
++2015-09-05 Doug Evans <dje@google.com>
++
++ * completer.c (location_completer): Protect file_to_match with cleanup.
++ * dwarf2read.c (dw2_map_symtabs_matching_filename): Add QUIT calls.
++ * psymtab.c (psym_map_symtabs_matching_filename): Add QUIT call.
++ * symtab.c (iterate_over_symtabs): Add QUIT calls.
int quoted = *text == '\'' || *text == '"';
int quote_char = '\0';
const char *colon = NULL;
- char *file_to_match = NULL;
const char *symbol_start = text;
const char *orig_text = text;
size_t text_len;
text++;
text_len = strlen (text);
- /* Where is the file name? */
- if (colon)
+ /* Where is the file name?
+ If the text includes a colon, they want completion only on a
+ symbol name after the colon. Otherwise, we need to complete on
+ symbols as well as on files. */
+ if (colon != NULL)
{
- char *s;
+ char *s, *file_to_match;
+ struct cleanup *cleanup;
- file_to_match = (char *) xmalloc (colon - text + 1);
+ file_to_match = xmalloc (colon - text + 1);
+ cleanup = make_cleanup (xfree, file_to_match);
strncpy (file_to_match, text, colon - text + 1);
/* Remove trailing colons and quotes from the file name. */
for (s = file_to_match + (colon - text);
s--)
if (*s == ':' || *s == quote_char)
*s = '\0';
- }
- /* If the text includes a colon, they want completion only on a
- symbol name after the colon. Otherwise, we need to complete on
- symbols as well as on files. */
- if (colon)
- {
list = make_file_symbol_completion_list (symbol_start, word,
file_to_match);
- xfree (file_to_match);
+ do_cleanups (cleanup);
}
else
{
struct dwarf2_per_cu_data *per_cu = dw2_get_cu (i);
struct quick_file_names *file_data;
+ QUIT;
+
/* We only need to look at symtabs not already expanded. */
if (per_cu->v.quick->compunit_symtab)
continue;
const char *this_name = file_data->file_names[j];
const char *this_real_name;
+ QUIT;
+
if (compare_filenames_for_search (this_name, name))
{
if (dw2_map_expand_apply (objfile, per_cu, name, real_path,
ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, pst)
{
+ QUIT;
+
/* We can skip shared psymtabs here, because any file name will be
attached to the unshared psymtab. */
if (pst->user != NULL)
ALL_OBJFILES (objfile)
{
+ QUIT;
+
if (iterate_over_some_symtabs (name, real_path, callback, data,
objfile->compunit_symtabs, NULL))
{
ALL_OBJFILES (objfile)
{
+ QUIT;
+
if (objfile->sf
&& objfile->sf->qf->map_symtabs_matching_filename (objfile,
name,