summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
123e395)
bring in line with symtab_from_filename, decode_variable.
(decode_compound): Likewise. Also propagate not_found_ptr to
find_method.
(decode_line_1): Propagate not_found_ptr to decode_compound.
(cplusplus_error): Now throws NOT_FOUND_ERROR.
+2009-06-25 Karen Osmond <karen.osmond@gmail.com>
+
+ * linespec.c (find_method): Add new not_found_ptr parameter to
+ bring in line with symtab_from_filename, decode_variable.
+ (decode_compound): Likewise. Also propagate not_found_ptr to
+ find_method.
+ (decode_line_1): Propagate not_found_ptr to decode_compound.
+ (cplusplus_error): Now throws NOT_FOUND_ERROR.
+
2009-06-25 Karen Osmond <karen.osmond@gmail.com>
* MAINTAINERS (Write After Approval): Add self.
2009-06-25 Karen Osmond <karen.osmond@gmail.com>
* MAINTAINERS (Write After Approval): Add self.
int funfirstline,
char ***canonical,
char *saved_arg,
int funfirstline,
char ***canonical,
char *saved_arg,
+ char *p,
+ int *not_found_ptr);
static struct symbol *lookup_prefix_sym (char **argptr, char *p);
static struct symbol *lookup_prefix_sym (char **argptr, char *p);
char *saved_arg,
char *copy,
struct type *t,
char *saved_arg,
char *copy,
struct type *t,
- struct symbol *sym_class);
+ struct symbol *sym_class,
+ int *not_found_ptr);
static NORETURN void cplusplus_error (const char *name,
const char *fmt, ...)
static NORETURN void cplusplus_error (const char *name,
const char *fmt, ...)
cplusplus_error (const char *name, const char *fmt, ...)
{
struct ui_file *tmp_stream;
cplusplus_error (const char *name, const char *fmt, ...)
{
struct ui_file *tmp_stream;
+ long len;
+ char *message;
tmp_stream = mem_fileopen ();
make_cleanup_ui_file_delete (tmp_stream);
tmp_stream = mem_fileopen ();
make_cleanup_ui_file_delete (tmp_stream);
("Hint: try '%s<TAB> or '%s<ESC-?>\n"
"(Note leading single quote.)"),
name, name);
("Hint: try '%s<TAB> or '%s<ESC-?>\n"
"(Note leading single quote.)"),
name, name);
- error_stream (tmp_stream);
+
+ message = ui_file_xstrdup (tmp_stream, &len);
+ make_cleanup (xfree, message);
+ throw_error (NOT_FOUND_ERROR, "%s", message);
}
/* Return the number of methods described for TYPE, including the
}
/* Return the number of methods described for TYPE, including the
if (p[0] == '.' || p[1] == ':')
return decode_compound (argptr, funfirstline, canonical,
if (p[0] == '.' || p[1] == ':')
return decode_compound (argptr, funfirstline, canonical,
+ saved_arg, p, not_found_ptr);
/* No, the first part is a filename; set file_symtab to be that file's
symtab. Also, move argptr past the filename. */
/* No, the first part is a filename; set file_symtab to be that file's
symtab. Also, move argptr past the filename. */
static struct symtabs_and_lines
decode_compound (char **argptr, int funfirstline, char ***canonical,
static struct symtabs_and_lines
decode_compound (char **argptr, int funfirstline, char ***canonical,
- char *saved_arg, char *p)
+ char *saved_arg, char *p, int *not_found_ptr)
{
struct symtabs_and_lines values;
char *p2;
{
struct symtabs_and_lines values;
char *p2;
we'll lookup the whole string in the symbol tables. */
return find_method (funfirstline, canonical, saved_arg,
we'll lookup the whole string in the symbol tables. */
return find_method (funfirstline, canonical, saved_arg,
+ copy, t, sym_class, not_found_ptr);
} /* End if symbol found */
} /* End if symbol found */
/* Couldn't find any interpretation as classes/namespaces, so give
up. The quotes are important if copy is empty. */
/* Couldn't find any interpretation as classes/namespaces, so give
up. The quotes are important if copy is empty. */
+ if (not_found_ptr)
+ *not_found_ptr = 1;
cplusplus_error (saved_arg,
"Can't find member of namespace, class, struct, or union named \"%s\"\n",
copy);
cplusplus_error (saved_arg,
"Can't find member of namespace, class, struct, or union named \"%s\"\n",
copy);
static struct symtabs_and_lines
find_method (int funfirstline, char ***canonical, char *saved_arg,
static struct symtabs_and_lines
find_method (int funfirstline, char ***canonical, char *saved_arg,
- char *copy, struct type *t, struct symbol *sym_class)
+ char *copy, struct type *t, struct symbol *sym_class, int *not_found_ptr)
{
struct symtabs_and_lines values;
struct symbol *sym = NULL;
{
struct symtabs_and_lines values;
struct symbol *sym = NULL;
+ if (not_found_ptr)
+ *not_found_ptr = 1;
if (tmp[0] == '~')
cplusplus_error (saved_arg,
"the class `%s' does not have destructor defined\n",
if (tmp[0] == '~')
cplusplus_error (saved_arg,
"the class `%s' does not have destructor defined\n",