Revert "gdb: support zero inode in generate-core-file command"

This reverts commit 1e21c846c2.

This change was causing unexpected mappings to be included in the core
files generated by GDB, which was triggering warnings when GDB opened
a core file, like this:

  warning: Can't open file [stack] during file-backed mapping note processing

  warning: Can't open file [vvar] during file-backed mapping note processing

For now I'm reverting the above commit and will come to the list again
when I have a solution that addresses the original issue without also
including the unexpected mappings.
This commit is contained in:
Andrew Burgess
2025-05-06 16:55:44 +01:00
parent 420d030e88
commit 998165ba99

View File

@@ -1712,7 +1712,7 @@ linux_make_mappings_callback (ULONGEST vaddr, ULONGEST size,
= (struct linux_make_mappings_data *) data; = (struct linux_make_mappings_data *) data;
gdb_byte buf[sizeof (ULONGEST)]; gdb_byte buf[sizeof (ULONGEST)];
if (*filename == '\0') if (*filename == '\0' || inode == 0)
return 0; return 0;
++map_data->file_count; ++map_data->file_count;