gdb/linux-record: Fix readdir and getdents handling
authorMarcin Koƛcielnicki <koriakin@0x04.net>
Fri, 30 Oct 2015 15:51:58 +0000 (15:51 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 30 Oct 2015 15:51:58 +0000 (15:51 +0000)
commit72aded8673d6cb2d0e33696e010a778e9bbfa817
tree55921fab81b61b4c49cb70d0963bde9c2952cf55
parent7571f7f297c8d8b4fb4657f84437b1d156957e16
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.
gdb/ChangeLog
gdb/aarch64-linux-tdep.c
gdb/amd64-linux-tdep.c
gdb/arm-linux-tdep.c
gdb/i386-linux-tdep.c
gdb/linux-record.c
gdb/linux-record.h
gdb/ppc-linux-tdep.c
This page took 0.040616 seconds and 4 git commands to generate.