diff options
author | Marcin KoĆcielnicki <koriakin@0x04.net> | 2015-10-30 15:51:58 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-10-30 15:51:58 +0000 |
commit | 72aded8673d6cb2d0e33696e010a778e9bbfa817 (patch) | |
tree | 55921fab81b61b4c49cb70d0963bde9c2952cf55 /gdb/amd64-linux-tdep.c | |
parent | 7571f7f297c8d8b4fb4657f84437b1d156957e16 (diff) | |
download | gdb-72aded8673d6cb2d0e33696e010a778e9bbfa817.zip gdb-72aded8673d6cb2d0e33696e010a778e9bbfa817.tar.gz gdb-72aded8673d6cb2d0e33696e010a778e9bbfa817.tar.bz2 |
gdb/linux-record: Fix readdir and getdents handling
getdents buffer size is given in bytes, not dirent entries (which have
variable size anyway). We don't need size_dirent and size_dirent64 for
this reason.
readdir, on the other hand, needs size of old_linux_dirent, which is
a somewhat different structure. Accordingly, rename size_dirent
to size_old_dirent.
gdb/ChangeLog:
* 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.
Diffstat (limited to 'gdb/amd64-linux-tdep.c')
-rw-r--r-- | gdb/amd64-linux-tdep.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index 3bca3c8..0b068c3 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -1905,8 +1905,8 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) 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; @@ -2121,8 +2121,8 @@ amd64_x32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) 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; |