[PATCH v2 12/13] gdb/linux-record: Fix size_termios for x32, amd64, aarch64

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

60 bytes is the size of glibc's struct termios, the one used by kernel is
36 bytes long.

gdb/ChangeLog:

* aarch64-linux-tdep.c (aarch64_linux_init_abi): Fix size_termios.
* amd64-linux-tdep.c (amd64_linux_init_abi): Fix size_termios.
(amd64_x32_linux_init_abi): Fix size_termios.
---
gdb/ChangeLog | 6 ++++++
gdb/aarch64-linux-tdep.c | 2 +-
gdb/amd64-linux-tdep.c | 4 ++--
3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 166f2e9..90364ce 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2015-10-22 Marcin KoÅ›cielnicki <koriakin@0x04.net>

+ * aarch64-linux-tdep.c (aarch64_linux_init_abi): Fix size_termios.
+ * amd64-linux-tdep.c (amd64_linux_init_abi): Fix size_termios.
+ (amd64_x32_linux_init_abi): Fix size_termios.
+
+2015-10-22 Marcin KoÅ›cielnicki <koriakin@0x04.net>
+
* ppc-linux-tdep.c (ppc_init_linux_record_tdep): Fix TASK_COMM_LEN.

2015-10-22 Marcin KoÅ›cielnicki <koriakin@0x04.net>
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index a1dcd5b..aa35196 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -1053,7 +1053,7 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
aarch64_linux_record_tdep.size_epoll_event = 12;
aarch64_linux_record_tdep.size_itimerspec = 32;
aarch64_linux_record_tdep.size_mq_attr = 64;
- aarch64_linux_record_tdep.size_termios = 60;
+ aarch64_linux_record_tdep.size_termios = 36;
aarch64_linux_record_tdep.size_termios2 = 44;
aarch64_linux_record_tdep.size_pid_t = 4;
aarch64_linux_record_tdep.size_winsize = 8;
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index 829d9b7..b0950f2 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -1950,7 +1950,7 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
amd64_linux_record_tdep.size_epoll_event = 12;
amd64_linux_record_tdep.size_itimerspec = 32;
amd64_linux_record_tdep.size_mq_attr = 64;
- amd64_linux_record_tdep.size_termios = 60;
+ amd64_linux_record_tdep.size_termios = 36;
amd64_linux_record_tdep.size_termios2 = 44;
amd64_linux_record_tdep.size_pid_t = 4;
amd64_linux_record_tdep.size_winsize = 8;
@@ -2167,7 +2167,7 @@ amd64_x32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
amd64_x32_linux_record_tdep.size_epoll_event = 12;
amd64_x32_linux_record_tdep.size_itimerspec = 32;
amd64_x32_linux_record_tdep.size_mq_attr = 64;
- amd64_x32_linux_record_tdep.size_termios = 60;
+ amd64_x32_linux_record_tdep.size_termios = 36;
amd64_x32_linux_record_tdep.size_termios2 = 44;
amd64_x32_linux_record_tdep.size_pid_t = 4;
amd64_x32_linux_record_tdep.size_winsize = 8;
--
2.6.1