aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-03-09 18:25:00 +0000
committerPedro Alves <palves@redhat.com>2016-03-09 18:25:00 +0000
commit2669cade3dcebf5d572bcd535cf21934cbc1633c (patch)
tree4b4de5e2d89d3cf97ca0da1a53d4154ce9d7fa7b /gdb/top.h
parent187212b3c1aa55d9a5b544a6af3af0b5ce457403 (diff)
downloadgdb-2669cade3dcebf5d572bcd535cf21934cbc1633c.zip
gdb-2669cade3dcebf5d572bcd535cf21934cbc1633c.tar.gz
gdb-2669cade3dcebf5d572bcd535cf21934cbc1633c.tar.bz2
Simplify saved_command_line handling
There doesn't seem to be much point in trying to reuse this buffer. Prefer simplicity instead. (In case you're wondering whether this fixes an off-by-one: linelength is misnamed; it's really a size including terminating null char.) gdb/ChangeLog: 2016-03-09 Pedro Alves <palves@redhat.com> * event-top.c (command_line_handler): Use xfree + xstrdup instead of xrealloc + strcpy. * main.c (captured_main): Use xstrdup instead of xmalloc plus manual clear. * top.c (saved_command_line): Rewrite comment. (saved_command_line_size): Delete. (command_line_input): Use xfree + xstrdup instead of xrealloc + strcpy. * top.h (saved_command_line_size): Delete declaration.
Diffstat (limited to 'gdb/top.h')
-rw-r--r--gdb/top.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/gdb/top.h b/gdb/top.h
index c450c6e..f3b080b 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -22,7 +22,6 @@
/* From top.c. */
extern char *saved_command_line;
-extern int saved_command_line_size;
extern FILE *instream;
extern int in_user_command;
extern int confirm;