aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-02-27 22:11:06 +0000
committerMichael Snyder <msnyder@vmware.com>2011-02-27 22:11:06 +0000
commit9c1e305a597428c9a9fafa6e0a11d864c77ce80a (patch)
tree491723d482b2d140b0a744cdfc582509a434b790 /gdb
parent69d371133c9dfbdcf30e91a2aa44e7f191dff09c (diff)
downloadgdb-9c1e305a597428c9a9fafa6e0a11d864c77ce80a.zip
gdb-9c1e305a597428c9a9fafa6e0a11d864c77ce80a.tar.gz
gdb-9c1e305a597428c9a9fafa6e0a11d864c77ce80a.tar.bz2
2011-02-27 Michael Snyder <msnyder@vmware.com>
* symtab.c (rbreak_command): Move variable 'file_name' to outer scope.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/symtab.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a2d9a05..a87cfc8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2011-02-27 Michael Snyder <msnyder@vmware.com>
+ * symtab.c (rbreak_command): Move variable 'file_name' to
+ outer scope.
+
* d-valprint.c (dynamic_array_type): Avoid shadowing a function
param with a local variable of the same name.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 3105327..60bc585 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -3403,7 +3403,7 @@ rbreak_command (char *regexp, int from_tty)
struct cleanup *old_chain;
char *string = NULL;
int len = 0;
- char **files = NULL;
+ char **files = NULL, *file_name;
int nfiles = 0;
if (regexp)
@@ -3413,7 +3413,6 @@ rbreak_command (char *regexp, int from_tty)
if (colon && *(colon + 1) != ':')
{
int colon_index;
- char * file_name;
colon_index = colon - regexp;
file_name = alloca (colon_index + 1);