aboutsummaryrefslogtreecommitdiff
path: root/gdb/event-top.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-06-13 10:55:27 +0000
committerPedro Alves <palves@redhat.com>2011-06-13 10:55:27 +0000
commitdc7eb48e0a75ef7430880a5892035b638bb422c7 (patch)
tree1981359c722003149509b703de2fcf58f943dece /gdb/event-top.c
parent94342ec38bc47cba884a975e37c74f20b598ca25 (diff)
downloadgdb-dc7eb48e0a75ef7430880a5892035b638bb422c7.zip
gdb-dc7eb48e0a75ef7430880a5892035b638bb422c7.tar.gz
gdb-dc7eb48e0a75ef7430880a5892035b638bb422c7.tar.bz2
2011-06-13 Pedro Alves <pedro@codesourcery.com>
gdb/ * top.h (line): Rename to ... (saved_command_line): ... this. (linesize): Rename to ... (saved_command_line_size): ... this. * top.c (line): Rename to ... (saved_command_line): ... this. (linesize): Rename to ... (saved_command_line_size): ... this. (dont_repeat, command_line_input, dont_repeat_command): Adjust. * event-top.c (command_line_handler): Adjust. * main.c (captured_main): Adjust.
Diffstat (limited to 'gdb/event-top.c')
-rw-r--r--gdb/event-top.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c
index a8a3e0f..72cbfdc 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -520,8 +520,6 @@ command_line_handler (char *rl)
static unsigned linelength = 0;
char *p;
char *p1;
- extern char *line;
- extern int linesize;
char *nline;
char got_eof = 0;
@@ -661,7 +659,7 @@ command_line_handler (char *rl)
previous command, return the value in the global buffer. */
if (repeat && p == linebuffer && *p != '\\')
{
- command_handler (line);
+ command_handler (saved_command_line);
display_gdb_prompt (0);
return;
}
@@ -669,7 +667,7 @@ command_line_handler (char *rl)
for (p1 = linebuffer; *p1 == ' ' || *p1 == '\t'; p1++);
if (repeat && !*p1)
{
- command_handler (line);
+ command_handler (saved_command_line);
display_gdb_prompt (0);
return;
}
@@ -693,15 +691,15 @@ command_line_handler (char *rl)
/* Save into global buffer if appropriate. */
if (repeat)
{
- if (linelength > linesize)
+ if (linelength > saved_command_line_size)
{
- line = xrealloc (line, linelength);
- linesize = linelength;
+ saved_command_line = xrealloc (saved_command_line, linelength);
+ saved_command_line_size = linelength;
}
- strcpy (line, linebuffer);
+ strcpy (saved_command_line, linebuffer);
if (!more_to_come)
{
- command_handler (line);
+ command_handler (saved_command_line);
display_gdb_prompt (0);
}
return;