[PATCH v2 03/13] gdb/linux-record: Fix size_[ug]id values

Marcin Kościelnicki
2015-10-22T13:39:46Z

i386 and arm wrongly set them to 2, when it should be 4. size_[ug]id is used
by getgroups32 etc syscalls, while size_old_[ug]id is used for getgroups16
and friends.

gdb/ChangeLog:

* arm-linux-tdep.c (arm_linux_init_abi): Fix size_[ug]id.
* i386-linux-tdep.c (i386_linux_init_abi): Fix size_[ug]id.
---
gdb/ChangeLog | 5 +++++
gdb/arm-linux-tdep.c | 4 ++--
gdb/i386-linux-tdep.c | 4 ++--
3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 128ee16..c88a331 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2015-10-22 Marcin KoÅ›cielnicki <koriakin@0x04.net>

+ * arm-linux-tdep.c (arm_linux_init_abi): Fix size_[ug]id.
+ * i386-linux-tdep.c (i386_linux_init_abi): Fix size_[ug]id.
+
+2015-10-22 Marcin KoÅ›cielnicki <koriakin@0x04.net>
+
* aarch64-linux-tdep.c (aarch64_linux_init_abi): Remove size_siginfo.
* amd64-linux-tdep.c (amd64_linux_init_abi): Remove size_siginfo.
(amd64_x32_linux_init_abi): Remove size_siginfo.
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 4a100c8..940f01f 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -1531,8 +1531,8 @@ arm_linux_init_abi (struct gdbarch_info info,
arm_linux_record_tdep.size_stack_t = 12;
arm_linux_record_tdep.size_off_t = arm_linux_record_tdep.size_long;
arm_linux_record_tdep.size_stat64 = 96;
- arm_linux_record_tdep.size_gid_t = 2;
- arm_linux_record_tdep.size_uid_t = 2;
+ arm_linux_record_tdep.size_gid_t = 4;
+ arm_linux_record_tdep.size_uid_t = 4;
arm_linux_record_tdep.size_PAGE_SIZE = 4096;
arm_linux_record_tdep.size_flock64 = 24;
arm_linux_record_tdep.size_user_desc = 16;
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 8dce146..af9c28a 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -850,8 +850,8 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
i386_linux_record_tdep.size_stack_t = 12;
i386_linux_record_tdep.size_off_t = i386_linux_record_tdep.size_long;
i386_linux_record_tdep.size_stat64 = 96;
- i386_linux_record_tdep.size_gid_t = 2;
- i386_linux_record_tdep.size_uid_t = 2;
+ i386_linux_record_tdep.size_gid_t = 4;
+ i386_linux_record_tdep.size_uid_t = 4;
i386_linux_record_tdep.size_PAGE_SIZE = 4096;
i386_linux_record_tdep.size_flock64 = 24;
i386_linux_record_tdep.size_user_desc = 16;
--
2.6.1