diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-04-05 19:14:43 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-04-05 19:14:43 +0000 |
commit | 01a16f9b83c29db2c63106bbefeb505cbac17bd4 (patch) | |
tree | afbb91118161c9c893618c4109685023ac3815b1 /gdb/linux-tdep.c | |
parent | a52b670457afc94e7355e632f3b3d6a583f25bc1 (diff) | |
download | gdb-01a16f9b83c29db2c63106bbefeb505cbac17bd4.tar.gz |
gdb/
Fix variable name shadowing.
* linux-tdep.c (linux_find_memory_regions_full): Rename outer variable
filename to mapsfilename and update its uses.
Diffstat (limited to 'gdb/linux-tdep.c')
-rw-r--r-- | gdb/linux-tdep.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index a132fc6b881..cc63e9b8e5f 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -675,22 +675,22 @@ linux_find_memory_regions_full (struct gdbarch *gdbarch, linux_find_memory_region_ftype *func, void *obfd) { - char filename[100]; + char mapsfilename[100]; gdb_byte *data; /* We need to know the real target PID to access /proc. */ if (current_inferior ()->fake_pid_p) return 1; - xsnprintf (filename, sizeof filename, + xsnprintf (mapsfilename, sizeof mapsfilename, "/proc/%d/smaps", current_inferior ()->pid); - data = target_fileio_read_stralloc (filename); + data = target_fileio_read_stralloc (mapsfilename); if (data == NULL) { /* Older Linux kernels did not support /proc/PID/smaps. */ - xsnprintf (filename, sizeof filename, + xsnprintf (mapsfilename, sizeof mapsfilename, "/proc/%d/maps", current_inferior ()->pid); - data = target_fileio_read_stralloc (filename); + data = target_fileio_read_stralloc (mapsfilename); } if (data) { @@ -724,7 +724,7 @@ linux_find_memory_regions_full (struct gdbarch *gdbarch, 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; } if (strcmp (keyword, "Anonymous:") == 0) |