aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-11-28 23:26:58 +0000
committerStan Shebs <shebs@codesourcery.com>1994-11-28 23:26:58 +0000
commitdfb14bc8f4d611a1538bf637318b5f68458fc835 (patch)
treee4a949a5310f6feb011627434c7ca52e3b6ea0bb /gdb/top.c
parent326fe1a335a144f2170b42423dd669f4c1fb05ca (diff)
downloadgdb-dfb14bc8f4d611a1538bf637318b5f68458fc835.zip
gdb-dfb14bc8f4d611a1538bf637318b5f68458fc835.tar.gz
gdb-dfb14bc8f4d611a1538bf637318b5f68458fc835.tar.bz2
* top.c (command_line_input): If annotation suffix is NULL,
replace it with an empty string. (read_next_line): Pass "command" as annotation suffix to command_line_input.
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/top.c b/gdb/top.c
index d4a9bb8..e28b9bb 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1565,6 +1565,10 @@ command_line_input (prrompt, repeat, annotation_suffix)
char *nline;
char got_eof = 0;
+ /* The annotation suffix must be non-NULL. */
+ if (annotation_suffix == NULL)
+ annotation_suffix = "";
+
if (annotation_level > 1 && instream == stdin)
{
local_prompt = alloca ((prrompt == NULL ? 0 : strlen (prrompt))
@@ -1841,7 +1845,7 @@ read_next_line (command)
else
prompt_ptr = NULL;
- p = command_line_input (prompt_ptr, instream == stdin, NULL);
+ p = command_line_input (prompt_ptr, instream == stdin, "command");
/* Not sure what to do here. */
if (p == NULL)