aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-01-17 16:20:56 +0000
committerTom Tromey <tromey@redhat.com>2011-01-17 16:20:56 +0000
commitf55af66d6ed6e6ad47757c5fff7ab5df1284ce33 (patch)
treef3f12e9ed6c5d1d34810d16f576f5335cb1e5d6f
parenta5a44b5381716fc5733f4bd93da9e90b5d11617c (diff)
downloadgdb-f55af66d6ed6e6ad47757c5fff7ab5df1284ce33.zip
gdb-f55af66d6ed6e6ad47757c5fff7ab5df1284ce33.tar.gz
gdb-f55af66d6ed6e6ad47757c5fff7ab5df1284ce33.tar.bz2
* cli/cli-cmds.c (apropos_command): Fix formatting. Don't call
re_compile_fastmap.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/cli/cli-cmds.c20
2 files changed, 11 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7db03c9..5a814c4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-17 Tom Tromey <tromey@redhat.com>
+
+ * cli/cli-cmds.c (apropos_command): Fix formatting. Don't call
+ re_compile_fastmap.
+
2011-01-17 Pierre Muller <muller@ics.u-strasbg.fr>
* p-exp.y (intvar): New static variable, used to set CURRENT_TYPE
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index ae02031..e1d8174 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1253,28 +1253,20 @@ show_user (char *args, int from_tty)
void
apropos_command (char *searchstr, int from_tty)
{
- extern struct cmd_list_element *cmdlist; /* This is the main command
- list. */
regex_t pattern;
- char *pattern_fastmap;
char errorbuffer[512];
- pattern_fastmap = xcalloc (256, sizeof (char));
if (searchstr == NULL)
- error (_("REGEXP string is empty"));
+ error (_("REGEXP string is empty"));
- if (regcomp(&pattern,searchstr,REG_ICASE) == 0)
- {
- pattern.fastmap=pattern_fastmap;
- re_compile_fastmap(&pattern);
- apropos_cmd (gdb_stdout,cmdlist,&pattern,"");
- }
+ if (regcomp (&pattern, searchstr, REG_ICASE) == 0)
+ apropos_cmd (gdb_stdout, cmdlist, &pattern, "");
else
{
- regerror(regcomp(&pattern,searchstr,REG_ICASE),NULL,errorbuffer,512);
- error (_("Error in regular expression:%s"),errorbuffer);
+ regerror (regcomp (&pattern, searchstr, REG_ICASE), NULL,
+ errorbuffer, 512);
+ error (_("Error in regular expression: %s"), errorbuffer);
}
- xfree (pattern_fastmap);
}
/* Print a list of files and line numbers which a user may choose from