projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* cli/cli-cmds.c (disassemble_command): Add support of disassemble
[deliverable/binutils-gdb.git]
/
gdb
/
fbsd-nat.c
diff --git
a/gdb/fbsd-nat.c
b/gdb/fbsd-nat.c
index 215d2a78f61b7e1c08466b96b2073c33b0266546..d499864904eef673654652e3263cb595ec1d8cbe 100644
(file)
--- a/
gdb/fbsd-nat.c
+++ b/
gdb/fbsd-nat.c
@@
-1,6
+1,7
@@
/* Native-dependent code for FreeBSD.
/* Native-dependent code for FreeBSD.
- Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-101,11
+102,14
@@
fbsd_find_memory_regions (int (*func) (CORE_ADDR, unsigned long,
unsigned long start, end, size;
char protection[4];
int read, write, exec;
unsigned long start, end, size;
char protection[4];
int read, write, exec;
+ struct cleanup *cleanup;
mapfilename = xstrprintf ("/proc/%ld/map", (long) pid);
mapfilename = xstrprintf ("/proc/%ld/map", (long) pid);
+ cleanup = make_cleanup (xfree, mapfilename);
mapfile = fopen (mapfilename, "r");
if (mapfile == NULL)
error (_("Couldn't open %s."), mapfilename);
mapfile = fopen (mapfilename, "r");
if (mapfile == NULL)
error (_("Couldn't open %s."), mapfilename);
+ make_cleanup_fclose (mapfile);
if (info_verbose)
fprintf_filtered (gdb_stdout,
if (info_verbose)
fprintf_filtered (gdb_stdout,
@@
-123,8
+127,8
@@
fbsd_find_memory_regions (int (*func) (CORE_ADDR, unsigned long,
if (info_verbose)
{
fprintf_filtered (gdb_stdout,
if (info_verbose)
{
fprintf_filtered (gdb_stdout,
- "Save segment, %ld bytes at
0x%s (%c%c%c)\n",
- size, paddr
_nz (
start),
+ "Save segment, %ld bytes at
%s (%c%c%c)\n",
+ size, paddr
ess (target_gdbarch,
start),
read ? 'r' : '-',
write ? 'w' : '-',
exec ? 'x' : '-');
read ? 'r' : '-',
write ? 'w' : '-',
exec ? 'x' : '-');
@@
-134,7
+138,7
@@
fbsd_find_memory_regions (int (*func) (CORE_ADDR, unsigned long,
func (start, size, read, write, exec, obfd);
}
func (start, size, read, write, exec, obfd);
}
-
fclose (mapfile
);
+
do_cleanups (cleanup
);
return 0;
}
return 0;
}
@@
-204,7
+208,8
@@
fbsd_make_corefile_notes (bfd *obfd, int *note_size)
char *psargs = xstrdup (fname);
if (get_inferior_args ())
char *psargs = xstrdup (fname);
if (get_inferior_args ())
- psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL);
+ psargs = reconcat (psargs, psargs, " ", get_inferior_args (),
+ (char *) NULL);
note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
fname, psargs);
note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
fname, psargs);
This page took
0.025813 seconds
and
4
git commands to generate.