aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-dump.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-17 19:28:12 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-17 19:28:12 +0000
commitcdb27c12f30352674694895e06f615fd28ebdbec (patch)
treee06dae1fdd988cb5d4c558996118833dda427f0e /gdb/cli/cli-dump.c
parenta109c7c1042127edfe32cbc50f315c3dc40f8607 (diff)
downloadgdb-cdb27c12f30352674694895e06f615fd28ebdbec.zip
gdb-cdb27c12f30352674694895e06f615fd28ebdbec.tar.gz
gdb-cdb27c12f30352674694895e06f615fd28ebdbec.tar.bz2
2010-05-17 Michael Snyder <msnyder@vmware.com>
* cli/cli-cmds.c: White space. * cli/cli-decode.c: White space. * cli/cli-dump.c: White space. * cli/cli-interp.c: White space. * cli/cli-logging.c: White space. * cli/cli-script.c: White space. * cli/cli-setshow.c: White space.
Diffstat (limited to 'gdb/cli/cli-dump.c')
-rw-r--r--gdb/cli/cli-dump.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index fabca56..34d805c 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -52,6 +52,7 @@ scan_expression_with_cleanup (char **cmd, const char *def)
if ((*cmd) == NULL || (**cmd) == '\0')
{
char *exp = xstrdup (def);
+
make_cleanup (xfree, exp);
return exp;
}
@@ -108,6 +109,7 @@ FILE *
fopen_with_cleanup (const char *filename, const char *mode)
{
FILE *file = fopen (filename, mode);
+
if (file == NULL)
perror_with_name (filename);
make_cleanup_fclose (file);
@@ -389,6 +391,7 @@ static void
call_dump_func (struct cmd_list_element *c, char *args, int from_tty)
{
struct dump_context *d = get_cmd_context (c);
+
d->func (args, d->mode);
}
@@ -664,6 +667,7 @@ void
_initialize_cli_dump (void)
{
struct cmd_list_element *c;
+
add_prefix_cmd ("dump", class_vars, dump_command, _("\
Dump target code/data to a local file."),
&dump_cmdlist, "dump ",