+2015-10-30 Marcin Kościelnicki <koriakin@0x04.net>
+
+ * aarch64-linux-tdep.c (aarch64_linux_init_abi): Remove
+ size_dirent{,64}, add size_old_dirent.
+ * amd64-linux-tdep.c (amd64_linux_init_abi): Remove size_dirent{,64},
+ add size_old_dirent.
+ (amd64_x32_linux_init_abi): Remove size_dirent{,64}, add
+ size_old_dirent.
+ * arm-linux-tdep.c (arm_linux_init_abi): Remove size_dirent{,64},
+ add size_old_dirent.
+ * i386-linux-tdep.c (i386_linux_init_abi): Remove size_dirent{,64},
+ add size_old_dirent.
+ * linux-record.c (record_linux_system_call): Fix handling of readdir
+ and getdents{,64}.
+ * linux-record.h (struct linux_record_tdep): Remove size_dirent{,64},
+ add size_old_dirent.
+ * ppc-linux-tdep.c (ppc_init_linux_record_tdep): Remove
+ size_dirent{,64}, add size_old_dirent.
+
2015-10-30 Marcin Kościelnicki <koriakin@0x04.net>
* aarch64-linux-tdep.c (aarch64_linux_init_abi): Fix size_sigaction,
aarch64_linux_record_tdep.size_old_gid_t = 2;
aarch64_linux_record_tdep.size_old_uid_t = 2;
aarch64_linux_record_tdep.size_fd_set = 128;
- aarch64_linux_record_tdep.size_dirent = 280;
- aarch64_linux_record_tdep.size_dirent64 = 280;
+ aarch64_linux_record_tdep.size_old_dirent = 280;
aarch64_linux_record_tdep.size_statfs = 120;
aarch64_linux_record_tdep.size_statfs64 = 120;
aarch64_linux_record_tdep.size_sockaddr = 16;
but sys_getresuid. */
amd64_linux_record_tdep.size_old_uid_t = 2;
amd64_linux_record_tdep.size_fd_set = 128;
- amd64_linux_record_tdep.size_dirent = 280;
- amd64_linux_record_tdep.size_dirent64 = 280;
+ /* ADM64 doesn't need this size because it doesn't have sys_readdir. */
+ amd64_linux_record_tdep.size_old_dirent = 280;
amd64_linux_record_tdep.size_statfs = 120;
amd64_linux_record_tdep.size_statfs64 = 120;
amd64_linux_record_tdep.size_sockaddr = 16;
but sys_getresuid. */
amd64_x32_linux_record_tdep.size_old_uid_t = 2;
amd64_x32_linux_record_tdep.size_fd_set = 128;
- amd64_x32_linux_record_tdep.size_dirent = 280;
- amd64_x32_linux_record_tdep.size_dirent64 = 280;
+ /* ADM64 doesn't need this size because it doesn't have sys_readdir. */
+ amd64_x32_linux_record_tdep.size_old_dirent = 268;
amd64_x32_linux_record_tdep.size_statfs = 120;
amd64_x32_linux_record_tdep.size_statfs64 = 120;
amd64_x32_linux_record_tdep.size_sockaddr = 16;
arm_linux_record_tdep.size_old_gid_t = 2;
arm_linux_record_tdep.size_old_uid_t = 2;
arm_linux_record_tdep.size_fd_set = 128;
- arm_linux_record_tdep.size_dirent = 268;
- arm_linux_record_tdep.size_dirent64 = 276;
+ arm_linux_record_tdep.size_old_dirent = 268;
arm_linux_record_tdep.size_statfs = 64;
arm_linux_record_tdep.size_statfs64 = 84;
arm_linux_record_tdep.size_sockaddr = 16;
i386_linux_record_tdep.size_old_gid_t = 2;
i386_linux_record_tdep.size_old_uid_t = 2;
i386_linux_record_tdep.size_fd_set = 128;
- i386_linux_record_tdep.size_dirent = 268;
- i386_linux_record_tdep.size_dirent64 = 276;
+ i386_linux_record_tdep.size_old_dirent = 268;
i386_linux_record_tdep.size_statfs = 64;
i386_linux_record_tdep.size_statfs64 = 84;
i386_linux_record_tdep.size_sockaddr = 16;
case gdb_old_readdir:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_dirent))
+ tdep->size_old_dirent))
return -1;
break;
break;
case gdb_sys_getdents:
+ case gdb_sys_getdents64:
{
ULONGEST count;
regcache_raw_read_unsigned (regcache, tdep->arg2,
&tmpulongest);
regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_dirent * count))
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, count))
return -1;
}
break;
case gdb_sys_madvise:
break;
- case gdb_sys_getdents64:
- {
- ULONGEST count;
-
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_dirent64 * count))
- return -1;
- }
- break;
-
case gdb_sys_fcntl64:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest == tdep->fcntl_F_GETLK64)
int size_old_gid_t;
int size_old_uid_t;
int size_fd_set;
- int size_dirent;
- int size_dirent64;
+ int size_old_dirent;
int size_statfs;
int size_statfs64;
int size_sockaddr;
record_tdep->size_old_gid_t = 4;
record_tdep->size_old_uid_t = 4;
record_tdep->size_fd_set = 128;
- record_tdep->size_dirent = 280;
- record_tdep->size_dirent64 = 280;
+ record_tdep->size_old_dirent = 280;
record_tdep->size_statfs = 120;
record_tdep->size_statfs64 = 120;
record_tdep->size_sockaddr = 16;
record_tdep->size_old_gid_t = 4;
record_tdep->size_old_uid_t = 4;
record_tdep->size_fd_set = 128;
- record_tdep->size_dirent = 268;
- record_tdep->size_dirent64 = 280;
+ record_tdep->size_old_dirent = 268;
record_tdep->size_statfs = 64;
record_tdep->size_statfs64 = 88;
record_tdep->size_sockaddr = 16;