gdb/
Fix variable name shadowing. * linux-tdep.c (linux_find_memory_regions_full): Rename outer variable filename to mapsfilename and update its uses.
This commit is contained in:
parent
9025569e3a
commit
d1794952ba
|
@ -1,3 +1,9 @@
|
||||||
|
2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
Fix variable name shadowing.
|
||||||
|
* linux-tdep.c (linux_find_memory_regions_full): Rename outer variable
|
||||||
|
filename to mapsfilename and update its uses.
|
||||||
|
|
||||||
2013-04-05 Eli Zaretskii <eliz@gnu.org>
|
2013-04-05 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
* Makefile.in (TAGS): Avoid warning from etags when $GDB_NM_FILE is
|
* Makefile.in (TAGS): Avoid warning from etags when $GDB_NM_FILE is
|
||||||
|
|
|
@ -675,22 +675,22 @@ linux_find_memory_regions_full (struct gdbarch *gdbarch,
|
||||||
linux_find_memory_region_ftype *func,
|
linux_find_memory_region_ftype *func,
|
||||||
void *obfd)
|
void *obfd)
|
||||||
{
|
{
|
||||||
char filename[100];
|
char mapsfilename[100];
|
||||||
gdb_byte *data;
|
gdb_byte *data;
|
||||||
|
|
||||||
/* We need to know the real target PID to access /proc. */
|
/* We need to know the real target PID to access /proc. */
|
||||||
if (current_inferior ()->fake_pid_p)
|
if (current_inferior ()->fake_pid_p)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
xsnprintf (filename, sizeof filename,
|
xsnprintf (mapsfilename, sizeof mapsfilename,
|
||||||
"/proc/%d/smaps", current_inferior ()->pid);
|
"/proc/%d/smaps", current_inferior ()->pid);
|
||||||
data = target_fileio_read_stralloc (filename);
|
data = target_fileio_read_stralloc (mapsfilename);
|
||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
{
|
{
|
||||||
/* Older Linux kernels did not support /proc/PID/smaps. */
|
/* Older Linux kernels did not support /proc/PID/smaps. */
|
||||||
xsnprintf (filename, sizeof filename,
|
xsnprintf (mapsfilename, sizeof mapsfilename,
|
||||||
"/proc/%d/maps", current_inferior ()->pid);
|
"/proc/%d/maps", current_inferior ()->pid);
|
||||||
data = target_fileio_read_stralloc (filename);
|
data = target_fileio_read_stralloc (mapsfilename);
|
||||||
}
|
}
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
|
@ -724,7 +724,7 @@ linux_find_memory_regions_full (struct gdbarch *gdbarch,
|
||||||
|
|
||||||
if (sscanf (line, "%64s%lu kB\n", keyword, &number) != 2)
|
if (sscanf (line, "%64s%lu kB\n", keyword, &number) != 2)
|
||||||
{
|
{
|
||||||
warning (_("Error parsing {s,}maps file '%s'"), filename);
|
warning (_("Error parsing {s,}maps file '%s'"), mapsfilename);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (strcmp (keyword, "Anonymous:") == 0)
|
if (strcmp (keyword, "Anonymous:") == 0)
|
||||||
|
|
Loading…
Reference in New Issue