+2005-05-23 Michael Snyder <msnyder@redhat.com>
+ From Nora Pan <qpan@mvista.com>
+ * linux-nat.c (read_mapping): Don't stumble over entries in
+ mapping that have name but zero inode.
+
2005-05-23 Andrew Cagney <cagney@gnu.org>
* target.h (child_xfer_memory): Use gdb_byte for byte buffer
int ret = fscanf (mapfile, "%llx-%llx %s %llx %s %llx",
addr, endaddr, permissions, offset, device, inode);
- if (ret > 0 && ret != EOF && *inode != 0)
+ filename[0] = '\0';
+ if (ret > 0 && ret != EOF)
{
/* Eat everything up to EOL for the filename. This will prevent
weird filenames (such as one with embedded whitespace) from
only. */
ret += fscanf (mapfile, "%[^\n]\n", filename);
}
- else
- {
- filename[0] = '\0'; /* no filename */
- fscanf (mapfile, "\n");
- }
+
return (ret != 0 && ret != EOF);
}