aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 28084e7..1d6b648 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -3248,8 +3248,31 @@ rbreak_command (char *regexp, int from_tty)
struct cleanup *old_chain;
char *string = NULL;
int len = 0;
+ char **files = NULL;
+ int nfiles = 0;
- search_symbols (regexp, FUNCTIONS_DOMAIN, 0, (char **) NULL, &ss);
+ if (regexp)
+ {
+ char *colon = strchr (regexp, ':');
+ if (colon && *(colon + 1) != ':')
+ {
+ int colon_index;
+ char * file_name;
+
+ colon_index = colon - regexp;
+ file_name = alloca (colon_index + 1);
+ memcpy (file_name, regexp, colon_index);
+ file_name[colon_index--] = 0;
+ while (isspace (file_name[colon_index]))
+ file_name[colon_index--] = 0;
+ files = &file_name;
+ nfiles = 1;
+ regexp = colon + 1;
+ while (isspace (*regexp)) regexp++;
+ }
+ }
+
+ search_symbols (regexp, FUNCTIONS_DOMAIN, nfiles, files, &ss);
old_chain = make_cleanup_free_search_symbols (ss);
make_cleanup (free_current_contents, &string);