summaryrefslogtreecommitdiff
path: root/gdb/cli/cli-dump.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-08-09 15:37:35 +0000
committerPedro Alves <palves@redhat.com>2013-08-09 15:37:35 +0000
commitdb229724662fbf62607db43232fcaa3745579a52 (patch)
tree1bcdc805ee1b27ae1408b544e043a603418935ff /gdb/cli/cli-dump.c
parent3f12a589a083c783113c099aef51ff304af34f0f (diff)
downloadbinutils-gdb-db229724662fbf62607db43232fcaa3745579a52.tar.gz
Make functions in cli-dump.c static and remove cli-dump.h.
I noticed the functions declared in cli-dump.h aren't used anywhere outside cli-dump.c. The original patch that introduced cli-dump.c didn't include this header: http://sourceware.org/ml/gdb-patches/2002-03/msg00518.html But for some reason that I couldn't find from reading the archives around that patch's discussion, cli-dump.h was introduced in the final checkin, at: http://sourceware.org/ml/gdb-patches/2002-03/msg00596.html There seems to be no point in keeping this around nowadays. gdb/ 2013-08-09 Pedro Alves <palves@redhat.com> * cli/cli-dump.c: Don't include cli/cli-dump.h. (scan_expression_with_cleanup, scan_filename_with_cleanup) (fopen_with_cleanup, add_dump_command): Make static. * cli/cli-dump.h: Delete file. * Makefile.in (HFILES_NO_SRCDIR): Remove reference to cli/cli-dump.h.
Diffstat (limited to 'gdb/cli/cli-dump.c')
-rw-r--r--gdb/cli/cli-dump.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 208916cab15..9e202b6eaf6 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -25,7 +25,6 @@
#include "cli/cli-cmds.h"
#include "value.h"
#include "completer.h"
-#include "cli/cli-dump.h"
#include "gdb_assert.h"
#include <ctype.h>
#include "target.h"
@@ -38,7 +37,7 @@
#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
-char *
+static char *
scan_expression_with_cleanup (char **cmd, const char *def)
{
if ((*cmd) == NULL || (**cmd) == '\0')
@@ -62,7 +61,7 @@ scan_expression_with_cleanup (char **cmd, const char *def)
}
-char *
+static char *
scan_filename_with_cleanup (char **cmd, const char *defname)
{
char *filename;
@@ -97,7 +96,7 @@ scan_filename_with_cleanup (char **cmd, const char *defname)
return fullname;
}
-FILE *
+static FILE *
fopen_with_cleanup (const char *filename, const char *mode)
{
FILE *file = gdb_fopen_cloexec (filename, mode);
@@ -389,7 +388,7 @@ call_dump_func (struct cmd_list_element *c, char *args, int from_tty)
d->func (args, d->mode);
}
-void
+static void
add_dump_command (char *name, void (*func) (char *args, char *mode),
char *descr)