* [PATCH 0/3] Some cleanups in linux-record.c
@ 2016-03-16 18:55 Andreas Arnez
2016-03-16 18:56 ` [PATCH 2/3] linux-record.c: Fix whitespace issues Andreas Arnez
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Andreas Arnez @ 2016-03-16 18:55 UTC (permalink / raw)
To: gdb-patches; +Cc: Yao Qi, Metzger, Markus T
This is a follow-up to this patch:
https://sourceware.org/ml/gdb-patches/2016-03/msg00239.html
As pointed out by Markus Metzger, the added lines in that patch used
tabified indentation, whereas much of the existing code in the file used
spaces for indentation instead. He suggested to "either fix it for the
entire function in a separate patch or preserve the broken indentation."
This series implements the first option. While fixing the whitespace
issues I also found a bug and added a fix to this series as well.
Patch #1 fixes an inadvertent fall-through to the next case statement.
Patch #2 fixes all whitespace issues in linux-record.c. Patch #3 is a new
version of the original patch above, with the following improvements:
* Consequently keep invocations of record_mem_at_reg to a single line if
staying within the ("soft") limit of 74 chars.
* Remove braces in the handling for `readlink', since the block is not
needed anymore.
* Use record_mem_at_reg at two further places that were overlooked before.
Andreas Arnez (3):
linux-record: Fix bad fall-through for pipe/pipe2
linux-record.c: Fix whitespace issues
linux-record: Simplify with record_mem_at_reg()
gdb/linux-record.c | 2226 +++++++++++++++++++++++-----------------------------
1 file changed, 989 insertions(+), 1237 deletions(-)
--
2.5.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2
2016-03-16 18:55 [PATCH 0/3] Some cleanups in linux-record.c Andreas Arnez
2016-03-16 18:56 ` [PATCH 2/3] linux-record.c: Fix whitespace issues Andreas Arnez
@ 2016-03-16 18:56 ` Andreas Arnez
2016-03-16 20:23 ` Marcin Kościelnicki
2016-03-17 8:42 ` Yao Qi
2016-03-16 18:57 ` [PATCH 3/3] linux-record: Simplify with record_mem_at_reg() Andreas Arnez
2 siblings, 2 replies; 12+ messages in thread
From: Andreas Arnez @ 2016-03-16 18:56 UTC (permalink / raw)
To: gdb-patches; +Cc: Yao Qi, Metzger, Markus T, Marcin Kościelnicki
This patch added handling for some syscalls to linux-record.c:
https://sourceware.org/ml/gdb-patches/2015-10/msg00452.html
But for both `pipe' and `pipe2' the patch lacks a statement after an
`if', such that the following `break' is interpreted as the `if'-body
instead.
This adds the missing (return-) statements for the conditionals.
gdb/ChangeLog:
* linux-record.c (record_linux_system_call): Add missing return
statements to handling of pipe and pipe2 syscalls.
---
gdb/linux-record.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/linux-record.c b/gdb/linux-record.c
index a40845a..2e86936 100644
--- a/gdb/linux-record.c
+++ b/gdb/linux-record.c
@@ -354,6 +354,7 @@ record_linux_system_call (enum gdb_syscall syscall,
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int * 2))
+ return -1;
break;
case gdb_sys_times:
@@ -2312,6 +2313,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int * 2))
+ return -1;
break;
case gdb_sys_inotify_init1:
--
2.5.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/3] linux-record.c: Fix whitespace issues
2016-03-16 18:55 [PATCH 0/3] Some cleanups in linux-record.c Andreas Arnez
@ 2016-03-16 18:56 ` Andreas Arnez
2016-03-17 8:44 ` Yao Qi
2016-03-16 18:56 ` [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2 Andreas Arnez
2016-03-16 18:57 ` [PATCH 3/3] linux-record: Simplify with record_mem_at_reg() Andreas Arnez
2 siblings, 1 reply; 12+ messages in thread
From: Andreas Arnez @ 2016-03-16 18:56 UTC (permalink / raw)
To: gdb-patches; +Cc: Yao Qi, Metzger, Markus T
This patch changes whitespace only, fixing whitespace issues in
linux-record.c.
gdb/ChangeLog:
* linux-record.c: Fix whitespace issues: tabify; remove trailing
spaces.
---
gdb/linux-record.c | 1898 ++++++++++++++++++++++++++--------------------------
1 file changed, 949 insertions(+), 949 deletions(-)
diff --git a/gdb/linux-record.c b/gdb/linux-record.c
index 2e86936..d171497 100644
--- a/gdb/linux-record.c
+++ b/gdb/linux-record.c
@@ -87,8 +87,8 @@
static int
record_linux_sockaddr (struct regcache *regcache,
- struct linux_record_tdep *tdep, ULONGEST addr,
- ULONGEST len)
+ struct linux_record_tdep *tdep, ULONGEST addr,
+ ULONGEST len)
{
gdb_byte *a;
int addrlen;
@@ -107,11 +107,11 @@ record_linux_sockaddr (struct regcache *regcache,
if (target_read_memory ((CORE_ADDR) len, a, tdep->size_int))
{
if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s len = %d.\n",
- phex_nz (len, tdep->size_pointer),
- tdep->size_int);
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s len = %d.\n",
+ phex_nz (len, tdep->size_pointer),
+ tdep->size_int);
return -1;
}
addrlen = (int) extract_unsigned_integer (a, tdep->size_int, byte_order);
@@ -126,7 +126,7 @@ record_linux_sockaddr (struct regcache *regcache,
static int
record_linux_msghdr (struct regcache *regcache,
- struct linux_record_tdep *tdep, ULONGEST addr)
+ struct linux_record_tdep *tdep, ULONGEST addr)
{
gdb_byte *a;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
@@ -144,12 +144,12 @@ record_linux_msghdr (struct regcache *regcache,
if (target_read_memory ((CORE_ADDR) addr, a, tdep->size_msghdr))
{
if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s "
- "len = %d.\n",
- phex_nz (addr, tdep->size_pointer),
- tdep->size_msghdr);
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s "
+ "len = %d.\n",
+ phex_nz (addr, tdep->size_pointer),
+ tdep->size_msghdr);
return -1;
}
@@ -173,33 +173,33 @@ record_linux_msghdr (struct regcache *regcache,
{
ULONGEST i;
ULONGEST len = extract_unsigned_integer (a, tdep->size_size_t,
- byte_order);
+ byte_order);
gdb_byte *iov = (gdb_byte *) alloca (tdep->size_iovec);
for (i = 0; i < len; i++)
- {
- if (target_read_memory ((CORE_ADDR) addr, iov, tdep->size_iovec))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error "
- "reading memory at "
- "addr = 0x%s "
- "len = %d.\n",
- phex_nz (addr,tdep->size_pointer),
- tdep->size_iovec);
- return -1;
- }
- tmpaddr = (CORE_ADDR) extract_unsigned_integer (iov,
- tdep->size_pointer,
- byte_order);
- tmpint = (int) extract_unsigned_integer (iov + tdep->size_pointer,
- tdep->size_size_t,
- byte_order);
- if (record_full_arch_list_add_mem (tmpaddr, tmpint))
- return -1;
- addr += tdep->size_iovec;
- }
+ {
+ if (target_read_memory ((CORE_ADDR) addr, iov, tdep->size_iovec))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error "
+ "reading memory at "
+ "addr = 0x%s "
+ "len = %d.\n",
+ phex_nz (addr,tdep->size_pointer),
+ tdep->size_iovec);
+ return -1;
+ }
+ tmpaddr = (CORE_ADDR) extract_unsigned_integer (iov,
+ tdep->size_pointer,
+ byte_order);
+ tmpint = (int) extract_unsigned_integer (iov + tdep->size_pointer,
+ tdep->size_size_t,
+ byte_order);
+ if (record_full_arch_list_add_mem (tmpaddr, tmpint))
+ return -1;
+ addr += tdep->size_iovec;
+ }
}
a += tdep->size_size_t;
@@ -226,9 +226,9 @@ record_linux_msghdr (struct regcache *regcache,
Return -1 if something wrong. */
int
-record_linux_system_call (enum gdb_syscall syscall,
+record_linux_system_call (enum gdb_syscall syscall,
struct regcache *regcache,
- struct linux_record_tdep *tdep)
+ struct linux_record_tdep *tdep)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -243,15 +243,15 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_exit:
{
- int q;
-
- target_terminal_ours ();
- q = yquery (_("The next instruction is syscall exit. "
- "It will make the program exit. "
- "Do you want to stop the program?"));
- target_terminal_inferior ();
- if (q)
- return 1;
+ int q;
+
+ target_terminal_ours ();
+ q = yquery (_("The next instruction is syscall exit. "
+ "It will make the program exit. "
+ "Do you want to stop the program?"));
+ target_terminal_inferior ();
+ if (q)
+ return 1;
}
break;
@@ -260,12 +260,12 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_read:
{
- ULONGEST addr, count;
+ ULONGEST addr, count;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &addr);
- regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
- if (record_full_arch_list_add_mem ((CORE_ADDR) addr, (int) count))
- return -1;
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &addr);
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) addr, (int) count))
+ return -1;
}
break;
@@ -277,9 +277,9 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_waitpid:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
break;
case gdb_sys_creat:
@@ -292,9 +292,9 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_time:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest)
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_time_t))
- return -1;
+ return -1;
break;
case gdb_sys_mknod:
@@ -309,7 +309,7 @@ record_linux_system_call (enum gdb_syscall syscall,
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size__old_kernel_stat))
- return -1;
+ return -1;
break;
case gdb_sys_lseek:
@@ -324,14 +324,14 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_ptrace:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest == RECORD_PTRACE_PEEKTEXT
- || tmpulongest == RECORD_PTRACE_PEEKDATA
- || tmpulongest == RECORD_PTRACE_PEEKUSR)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 4))
- return -1;
- }
+ || tmpulongest == RECORD_PTRACE_PEEKDATA
+ || tmpulongest == RECORD_PTRACE_PEEKUSR)
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg4,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 4))
+ return -1;
+ }
break;
case gdb_sys_alarm:
@@ -354,14 +354,14 @@ record_linux_system_call (enum gdb_syscall syscall,
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int * 2))
- return -1;
+ return -1;
break;
case gdb_sys_times:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_tms))
- return -1;
+ return -1;
break;
case gdb_sys_ni_syscall44:
@@ -380,155 +380,155 @@ record_linux_system_call (enum gdb_syscall syscall,
/* XXX Need to add a lot of support of other ioctl requests. */
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest == tdep->ioctl_FIOCLEX
- || tmpulongest == tdep->ioctl_FIONCLEX
- || tmpulongest == tdep->ioctl_FIONBIO
- || tmpulongest == tdep->ioctl_FIOASYNC
- || tmpulongest == tdep->ioctl_TCSETS
- || tmpulongest == tdep->ioctl_TCSETSW
- || tmpulongest == tdep->ioctl_TCSETSF
- || tmpulongest == tdep->ioctl_TCSETA
- || tmpulongest == tdep->ioctl_TCSETAW
- || tmpulongest == tdep->ioctl_TCSETAF
- || tmpulongest == tdep->ioctl_TCSBRK
- || tmpulongest == tdep->ioctl_TCXONC
- || tmpulongest == tdep->ioctl_TCFLSH
- || tmpulongest == tdep->ioctl_TIOCEXCL
- || tmpulongest == tdep->ioctl_TIOCNXCL
- || tmpulongest == tdep->ioctl_TIOCSCTTY
- || tmpulongest == tdep->ioctl_TIOCSPGRP
- || tmpulongest == tdep->ioctl_TIOCSTI
- || tmpulongest == tdep->ioctl_TIOCSWINSZ
- || tmpulongest == tdep->ioctl_TIOCMBIS
- || tmpulongest == tdep->ioctl_TIOCMBIC
- || tmpulongest == tdep->ioctl_TIOCMSET
- || tmpulongest == tdep->ioctl_TIOCSSOFTCAR
- || tmpulongest == tdep->ioctl_TIOCCONS
- || tmpulongest == tdep->ioctl_TIOCSSERIAL
- || tmpulongest == tdep->ioctl_TIOCPKT
- || tmpulongest == tdep->ioctl_TIOCNOTTY
- || tmpulongest == tdep->ioctl_TIOCSETD
- || tmpulongest == tdep->ioctl_TCSBRKP
- || tmpulongest == tdep->ioctl_TIOCTTYGSTRUCT
- || tmpulongest == tdep->ioctl_TIOCSBRK
- || tmpulongest == tdep->ioctl_TIOCCBRK
- || tmpulongest == tdep->ioctl_TCSETS2
- || tmpulongest == tdep->ioctl_TCSETSW2
- || tmpulongest == tdep->ioctl_TCSETSF2
- || tmpulongest == tdep->ioctl_TIOCSPTLCK
- || tmpulongest == tdep->ioctl_TIOCSERCONFIG
- || tmpulongest == tdep->ioctl_TIOCSERGWILD
- || tmpulongest == tdep->ioctl_TIOCSERSWILD
- || tmpulongest == tdep->ioctl_TIOCSLCKTRMIOS
- || tmpulongest == tdep->ioctl_TIOCSERGETMULTI
- || tmpulongest == tdep->ioctl_TIOCSERSETMULTI
- || tmpulongest == tdep->ioctl_TIOCMIWAIT
- || tmpulongest == tdep->ioctl_TIOCSHAYESESP)
- {
- /* Nothing to do. */
- }
+ || tmpulongest == tdep->ioctl_FIONCLEX
+ || tmpulongest == tdep->ioctl_FIONBIO
+ || tmpulongest == tdep->ioctl_FIOASYNC
+ || tmpulongest == tdep->ioctl_TCSETS
+ || tmpulongest == tdep->ioctl_TCSETSW
+ || tmpulongest == tdep->ioctl_TCSETSF
+ || tmpulongest == tdep->ioctl_TCSETA
+ || tmpulongest == tdep->ioctl_TCSETAW
+ || tmpulongest == tdep->ioctl_TCSETAF
+ || tmpulongest == tdep->ioctl_TCSBRK
+ || tmpulongest == tdep->ioctl_TCXONC
+ || tmpulongest == tdep->ioctl_TCFLSH
+ || tmpulongest == tdep->ioctl_TIOCEXCL
+ || tmpulongest == tdep->ioctl_TIOCNXCL
+ || tmpulongest == tdep->ioctl_TIOCSCTTY
+ || tmpulongest == tdep->ioctl_TIOCSPGRP
+ || tmpulongest == tdep->ioctl_TIOCSTI
+ || tmpulongest == tdep->ioctl_TIOCSWINSZ
+ || tmpulongest == tdep->ioctl_TIOCMBIS
+ || tmpulongest == tdep->ioctl_TIOCMBIC
+ || tmpulongest == tdep->ioctl_TIOCMSET
+ || tmpulongest == tdep->ioctl_TIOCSSOFTCAR
+ || tmpulongest == tdep->ioctl_TIOCCONS
+ || tmpulongest == tdep->ioctl_TIOCSSERIAL
+ || tmpulongest == tdep->ioctl_TIOCPKT
+ || tmpulongest == tdep->ioctl_TIOCNOTTY
+ || tmpulongest == tdep->ioctl_TIOCSETD
+ || tmpulongest == tdep->ioctl_TCSBRKP
+ || tmpulongest == tdep->ioctl_TIOCTTYGSTRUCT
+ || tmpulongest == tdep->ioctl_TIOCSBRK
+ || tmpulongest == tdep->ioctl_TIOCCBRK
+ || tmpulongest == tdep->ioctl_TCSETS2
+ || tmpulongest == tdep->ioctl_TCSETSW2
+ || tmpulongest == tdep->ioctl_TCSETSF2
+ || tmpulongest == tdep->ioctl_TIOCSPTLCK
+ || tmpulongest == tdep->ioctl_TIOCSERCONFIG
+ || tmpulongest == tdep->ioctl_TIOCSERGWILD
+ || tmpulongest == tdep->ioctl_TIOCSERSWILD
+ || tmpulongest == tdep->ioctl_TIOCSLCKTRMIOS
+ || tmpulongest == tdep->ioctl_TIOCSERGETMULTI
+ || tmpulongest == tdep->ioctl_TIOCSERSETMULTI
+ || tmpulongest == tdep->ioctl_TIOCMIWAIT
+ || tmpulongest == tdep->ioctl_TIOCSHAYESESP)
+ {
+ /* Nothing to do. */
+ }
else if (tmpulongest == tdep->ioctl_TCGETS
- || tmpulongest == tdep->ioctl_TCGETA
- || tmpulongest == tdep->ioctl_TIOCGLCKTRMIOS)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ || tmpulongest == tdep->ioctl_TCGETA
+ || tmpulongest == tdep->ioctl_TIOCGLCKTRMIOS)
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_termios))
- return -1;
- }
+ return -1;
+ }
else if (tmpulongest == tdep->ioctl_TIOCGPGRP
- || tmpulongest == tdep->ioctl_TIOCGSID)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ || tmpulongest == tdep->ioctl_TIOCGSID)
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_pid_t))
- return -1;
- }
+ return -1;
+ }
else if (tmpulongest == tdep->ioctl_TIOCOUTQ
- || tmpulongest == tdep->ioctl_TIOCMGET
- || tmpulongest == tdep->ioctl_TIOCGSOFTCAR
- || tmpulongest == tdep->ioctl_FIONREAD
- || tmpulongest == tdep->ioctl_TIOCINQ
- || tmpulongest == tdep->ioctl_TIOCGETD
- || tmpulongest == tdep->ioctl_TIOCGPTN
- || tmpulongest == tdep->ioctl_TIOCSERGETLSR)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ || tmpulongest == tdep->ioctl_TIOCMGET
+ || tmpulongest == tdep->ioctl_TIOCGSOFTCAR
+ || tmpulongest == tdep->ioctl_FIONREAD
+ || tmpulongest == tdep->ioctl_TIOCINQ
+ || tmpulongest == tdep->ioctl_TIOCGETD
+ || tmpulongest == tdep->ioctl_TIOCGPTN
+ || tmpulongest == tdep->ioctl_TIOCSERGETLSR)
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
- }
+ return -1;
+ }
else if (tmpulongest == tdep->ioctl_TIOCGWINSZ)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_winsize))
- return -1;
- }
+ return -1;
+ }
else if (tmpulongest == tdep->ioctl_TIOCLINUX)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
/* This syscall affects a char-size memory. */
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 1))
- return -1;
- }
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 1))
+ return -1;
+ }
else if (tmpulongest == tdep->ioctl_TIOCGSERIAL)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_serial_struct))
- return -1;
- }
+ return -1;
+ }
else if (tmpulongest == tdep->ioctl_TCGETS2)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_termios2))
- return -1;
- }
+ return -1;
+ }
else if (tmpulongest == tdep->ioctl_FIOQSIZE)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_loff_t))
- return -1;
- }
+ return -1;
+ }
else if (tmpulongest == tdep->ioctl_TIOCGICOUNT)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_serial_icounter_struct))
- return -1;
- }
+ return -1;
+ }
else if (tmpulongest == tdep->ioctl_TIOCGHAYESESP)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_hayes_esp_config))
- return -1;
- }
+ return -1;
+ }
else if (tmpulongest == tdep->ioctl_TIOCSERGSTRUCT)
- {
- printf_unfiltered (_("Process record and replay target doesn't "
- "support ioctl request TIOCSERGSTRUCT\n"));
- return 1;
- }
+ {
+ printf_unfiltered (_("Process record and replay target doesn't "
+ "support ioctl request TIOCSERGSTRUCT\n"));
+ return 1;
+ }
else
- {
- printf_unfiltered (_("Process record and replay target doesn't "
- "support ioctl request 0x%s.\n"),
- OUTPUT_REG (tmpulongest, tdep->arg2));
- return 1;
- }
+ {
+ printf_unfiltered (_("Process record and replay target doesn't "
+ "support ioctl request 0x%s.\n"),
+ OUTPUT_REG (tmpulongest, tdep->arg2));
+ return 1;
+ }
break;
case gdb_sys_fcntl:
@@ -536,13 +536,13 @@ record_linux_system_call (enum gdb_syscall syscall,
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
sys_fcntl:
if (tmpulongest == tdep->fcntl_F_GETLK)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_flock))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_ni_syscall56:
@@ -554,7 +554,7 @@ record_linux_system_call (enum gdb_syscall syscall,
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_oldold_utsname))
- return -1;
+ return -1;
break;
case gdb_sys_umask:
@@ -565,7 +565,7 @@ record_linux_system_call (enum gdb_syscall syscall,
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_ustat))
- return -1;
+ return -1;
break;
case gdb_sys_dup2:
@@ -578,7 +578,7 @@ record_linux_system_call (enum gdb_syscall syscall,
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_sigaction))
- return -1;
+ return -1;
break;
case gdb_sys_sgetmask:
@@ -592,7 +592,7 @@ record_linux_system_call (enum gdb_syscall syscall,
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_sigset_t))
- return -1;
+ return -1;
break;
case gdb_sys_sethostname:
@@ -603,25 +603,25 @@ record_linux_system_call (enum gdb_syscall syscall,
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_rlimit))
- return -1;
+ return -1;
break;
case gdb_sys_getrusage:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_rusage))
- return -1;
+ return -1;
break;
case gdb_sys_gettimeofday:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_timeval))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_timezone))
- return -1;
+ return -1;
break;
case gdb_sys_settimeofday:
@@ -630,15 +630,15 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_getgroups16:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST gidsetsize;
+ {
+ ULONGEST gidsetsize;
- regcache_raw_read_unsigned (regcache, tdep->arg1,
- &gidsetsize);
- tmpint = tdep->size_old_gid_t * (int) gidsetsize;
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
- return -1;
- }
+ regcache_raw_read_unsigned (regcache, tdep->arg1,
+ &gidsetsize);
+ tmpint = tdep->size_old_gid_t * (int) gidsetsize;
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
+ return -1;
+ }
break;
case gdb_sys_setgroups16:
@@ -646,46 +646,46 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_old_select:
{
- unsigned long sz_sel_arg = tdep->size_long + tdep->size_pointer * 4;
- gdb_byte *a = (gdb_byte *) alloca (sz_sel_arg);
- CORE_ADDR inp, outp, exp, tvp;
-
- regcache_raw_read_unsigned (regcache, tdep->arg1,
- &tmpulongest);
- if (tmpulongest)
- {
- if (target_read_memory (tmpulongest, a, sz_sel_arg))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading memory "
- "at addr = 0x%s len = %lu.\n",
- OUTPUT_REG (tmpulongest, tdep->arg1),
- sz_sel_arg);
- return -1;
- }
- /* Skip n. */
- a += tdep->size_long;
- inp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
- a += tdep->size_pointer;
- outp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
- a += tdep->size_pointer;
- exp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
- a += tdep->size_pointer;
- tvp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
- if (inp)
- if (record_full_arch_list_add_mem (inp, tdep->size_fd_set))
- return -1;
- if (outp)
- if (record_full_arch_list_add_mem (outp, tdep->size_fd_set))
- return -1;
- if (exp)
- if (record_full_arch_list_add_mem (exp, tdep->size_fd_set))
- return -1;
- if (tvp)
- if (record_full_arch_list_add_mem (tvp, tdep->size_timeval))
- return -1;
- }
+ unsigned long sz_sel_arg = tdep->size_long + tdep->size_pointer * 4;
+ gdb_byte *a = (gdb_byte *) alloca (sz_sel_arg);
+ CORE_ADDR inp, outp, exp, tvp;
+
+ regcache_raw_read_unsigned (regcache, tdep->arg1,
+ &tmpulongest);
+ if (tmpulongest)
+ {
+ if (target_read_memory (tmpulongest, a, sz_sel_arg))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory "
+ "at addr = 0x%s len = %lu.\n",
+ OUTPUT_REG (tmpulongest, tdep->arg1),
+ sz_sel_arg);
+ return -1;
+ }
+ /* Skip n. */
+ a += tdep->size_long;
+ inp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
+ a += tdep->size_pointer;
+ outp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
+ a += tdep->size_pointer;
+ exp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
+ a += tdep->size_pointer;
+ tvp = extract_unsigned_integer (a, tdep->size_pointer, byte_order);
+ if (inp)
+ if (record_full_arch_list_add_mem (inp, tdep->size_fd_set))
+ return -1;
+ if (outp)
+ if (record_full_arch_list_add_mem (outp, tdep->size_fd_set))
+ return -1;
+ if (exp)
+ if (record_full_arch_list_add_mem (exp, tdep->size_fd_set))
+ return -1;
+ if (tvp)
+ if (record_full_arch_list_add_mem (tvp, tdep->size_timeval))
+ return -1;
+ }
}
break;
@@ -694,13 +694,13 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_readlink:
{
- ULONGEST len;
+ ULONGEST len;
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) len))
- return -1;
+ regcache_raw_read_unsigned (regcache, tdep->arg2,
+ &tmpulongest);
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) len))
+ return -1;
}
break;
@@ -710,15 +710,15 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_reboot:
{
- int q;
+ int q;
- target_terminal_ours ();
- q = yquery (_("The next instruction is syscall reboot. "
+ target_terminal_ours ();
+ q = yquery (_("The next instruction is syscall reboot. "
"It will restart the computer. "
"Do you want to stop the program?"));
- target_terminal_inferior ();
- if (q)
- return 1;
+ target_terminal_inferior ();
+ if (q)
+ return 1;
}
break;
@@ -726,7 +726,7 @@ record_linux_system_call (enum gdb_syscall syscall,
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_dirent))
- return -1;
+ return -1;
break;
case gdb_old_mmap:
@@ -734,26 +734,26 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_munmap:
{
- ULONGEST len;
+ ULONGEST len;
- regcache_raw_read_unsigned (regcache, tdep->arg1,
- &tmpulongest);
- regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
- if (record_full_memory_query)
- {
+ regcache_raw_read_unsigned (regcache, tdep->arg1,
+ &tmpulongest);
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
+ if (record_full_memory_query)
+ {
int q;
- target_terminal_ours ();
- q = yquery (_("\
+ target_terminal_ours ();
+ q = yquery (_("\
The next instruction is syscall munmap.\n\
It will free the memory addr = 0x%s len = %u.\n\
It will make record target cannot record some memory change.\n\
Do you want to stop the program?"),
- OUTPUT_REG (tmpulongest, tdep->arg1), (int) len);
- target_terminal_inferior ();
- if (q)
- return 1;
- }
+ OUTPUT_REG (tmpulongest, tdep->arg1), (int) len);
+ target_terminal_inferior ();
+ if (q)
+ return 1;
+ }
}
break;
@@ -771,7 +771,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_statfs))
- return -1;
+ return -1;
break;
case gdb_sys_ioperm:
@@ -791,313 +791,313 @@ Do you want to stop the program?"),
case gdb_sys_getsockname:
case gdb_sys_getpeername:
{
- ULONGEST len;
+ ULONGEST len;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
- if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
- return -1;
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
+ if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
+ return -1;
}
break;
case gdb_sys_recvfrom:
{
- ULONGEST len;
+ ULONGEST len;
- regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
- regcache_raw_read_unsigned (regcache, tdep->arg5, &len);
- if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
- return -1;
+ regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
+ regcache_raw_read_unsigned (regcache, tdep->arg5, &len);
+ if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
+ return -1;
}
break;
case gdb_sys_recv:
{
- ULONGEST size;
+ ULONGEST size;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) size))
- return -1;
+ return -1;
}
break;
case gdb_sys_recvmsg:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_linux_msghdr (regcache, tdep, tmpulongest))
- return -1;
+ return -1;
break;
case gdb_sys_socketpair:
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
break;
case gdb_sys_getsockopt:
regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST optvalp;
- gdb_byte *optlenp = (gdb_byte *) alloca (tdep->size_int);
-
- if (target_read_memory ((CORE_ADDR) tmpulongest, optlenp,
- tdep->size_int))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s "
- "len = %d.\n",
- OUTPUT_REG (tmpulongest, tdep->arg5),
- tdep->size_int);
- return -1;
- }
- regcache_raw_read_unsigned (regcache, tdep->arg4, &optvalp);
- tmpint = (int) extract_signed_integer (optlenp, tdep->size_int,
- byte_order);
- if (record_full_arch_list_add_mem ((CORE_ADDR) optvalp, tmpint))
- return -1;
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ ULONGEST optvalp;
+ gdb_byte *optlenp = (gdb_byte *) alloca (tdep->size_int);
+
+ if (target_read_memory ((CORE_ADDR) tmpulongest, optlenp,
+ tdep->size_int))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s "
+ "len = %d.\n",
+ OUTPUT_REG (tmpulongest, tdep->arg5),
+ tdep->size_int);
+ return -1;
+ }
+ regcache_raw_read_unsigned (regcache, tdep->arg4, &optvalp);
+ tmpint = (int) extract_signed_integer (optlenp, tdep->size_int,
+ byte_order);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) optvalp, tmpint))
+ return -1;
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_socketcall:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
switch (tmpulongest)
- {
- case RECORD_SYS_SOCKET:
- case RECORD_SYS_BIND:
- case RECORD_SYS_CONNECT:
- case RECORD_SYS_LISTEN:
- break;
- case RECORD_SYS_ACCEPT:
- case RECORD_SYS_GETSOCKNAME:
- case RECORD_SYS_GETPEERNAME:
- {
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- if (tmpulongest)
- {
- gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
- ULONGEST len;
-
- tmpulongest += tdep->size_ulong;
- if (target_read_memory ((CORE_ADDR) tmpulongest, a,
- tdep->size_ulong * 2))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s len = %d.\n",
- OUTPUT_REG (tmpulongest, tdep->arg2),
- tdep->size_ulong * 2);
- return -1;
- }
- tmpulongest = extract_unsigned_integer (a,
- tdep->size_ulong,
- byte_order);
- len = extract_unsigned_integer (a + tdep->size_ulong,
- tdep->size_ulong, byte_order);
- if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
- return -1;
- }
- }
- break;
-
- case RECORD_SYS_SOCKETPAIR:
- {
- gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong);
-
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- if (tmpulongest)
- {
- tmpulongest += tdep->size_ulong * 3;
- if (target_read_memory ((CORE_ADDR) tmpulongest, a,
- tdep->size_ulong))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s len = %d.\n",
- OUTPUT_REG (tmpulongest, tdep->arg2),
- tdep->size_ulong);
- return -1;
- }
- tmpaddr
- = (CORE_ADDR) extract_unsigned_integer (a, tdep->size_ulong,
- byte_order);
- if (record_full_arch_list_add_mem (tmpaddr, tdep->size_int))
- return -1;
- }
- }
- break;
- case RECORD_SYS_SEND:
- case RECORD_SYS_SENDTO:
- break;
- case RECORD_SYS_RECVFROM:
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- if (tmpulongest)
- {
- gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
- ULONGEST len;
-
- tmpulongest += tdep->size_ulong * 4;
- if (target_read_memory ((CORE_ADDR) tmpulongest, a,
- tdep->size_ulong * 2))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s len = %d.\n",
- OUTPUT_REG (tmpulongest, tdep->arg2),
- tdep->size_ulong * 2);
- return -1;
- }
- tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
- byte_order);
- len = extract_unsigned_integer (a + tdep->size_ulong,
- tdep->size_ulong, byte_order);
- if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
- return -1;
- }
- case RECORD_SYS_RECV:
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- if (tmpulongest)
- {
- gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
-
- tmpulongest += tdep->size_ulong;
- if (target_read_memory ((CORE_ADDR) tmpulongest, a,
- tdep->size_ulong))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s len = %d.\n",
- OUTPUT_REG (tmpulongest, tdep->arg2),
- tdep->size_ulong);
- return -1;
- }
- tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
- byte_order);
- if (tmpulongest)
- {
- a += tdep->size_ulong;
- tmpint = (int) extract_unsigned_integer (a, tdep->size_ulong,
- byte_order);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ case RECORD_SYS_SOCKET:
+ case RECORD_SYS_BIND:
+ case RECORD_SYS_CONNECT:
+ case RECORD_SYS_LISTEN:
+ break;
+ case RECORD_SYS_ACCEPT:
+ case RECORD_SYS_GETSOCKNAME:
+ case RECORD_SYS_GETPEERNAME:
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg2,
+ &tmpulongest);
+ if (tmpulongest)
+ {
+ gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
+ ULONGEST len;
+
+ tmpulongest += tdep->size_ulong;
+ if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+ tdep->size_ulong * 2))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s len = %d.\n",
+ OUTPUT_REG (tmpulongest, tdep->arg2),
+ tdep->size_ulong * 2);
+ return -1;
+ }
+ tmpulongest = extract_unsigned_integer (a,
+ tdep->size_ulong,
+ byte_order);
+ len = extract_unsigned_integer (a + tdep->size_ulong,
+ tdep->size_ulong, byte_order);
+ if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
+ return -1;
+ }
+ }
+ break;
+
+ case RECORD_SYS_SOCKETPAIR:
+ {
+ gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong);
+
+ regcache_raw_read_unsigned (regcache, tdep->arg2,
+ &tmpulongest);
+ if (tmpulongest)
+ {
+ tmpulongest += tdep->size_ulong * 3;
+ if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+ tdep->size_ulong))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s len = %d.\n",
+ OUTPUT_REG (tmpulongest, tdep->arg2),
+ tdep->size_ulong);
+ return -1;
+ }
+ tmpaddr
+ = (CORE_ADDR) extract_unsigned_integer (a, tdep->size_ulong,
+ byte_order);
+ if (record_full_arch_list_add_mem (tmpaddr, tdep->size_int))
+ return -1;
+ }
+ }
+ break;
+ case RECORD_SYS_SEND:
+ case RECORD_SYS_SENDTO:
+ break;
+ case RECORD_SYS_RECVFROM:
+ regcache_raw_read_unsigned (regcache, tdep->arg2,
+ &tmpulongest);
+ if (tmpulongest)
+ {
+ gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
+ ULONGEST len;
+
+ tmpulongest += tdep->size_ulong * 4;
+ if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+ tdep->size_ulong * 2))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s len = %d.\n",
+ OUTPUT_REG (tmpulongest, tdep->arg2),
+ tdep->size_ulong * 2);
+ return -1;
+ }
+ tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
+ byte_order);
+ len = extract_unsigned_integer (a + tdep->size_ulong,
+ tdep->size_ulong, byte_order);
+ if (record_linux_sockaddr (regcache, tdep, tmpulongest, len))
+ return -1;
+ }
+ case RECORD_SYS_RECV:
+ regcache_raw_read_unsigned (regcache, tdep->arg2,
+ &tmpulongest);
+ if (tmpulongest)
+ {
+ gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
+
+ tmpulongest += tdep->size_ulong;
+ if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+ tdep->size_ulong))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s len = %d.\n",
+ OUTPUT_REG (tmpulongest, tdep->arg2),
+ tdep->size_ulong);
+ return -1;
+ }
+ tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
+ byte_order);
+ if (tmpulongest)
+ {
+ a += tdep->size_ulong;
+ tmpint = (int) extract_unsigned_integer (a, tdep->size_ulong,
+ byte_order);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tmpint))
- return -1;
- }
- }
- break;
- case RECORD_SYS_SHUTDOWN:
- case RECORD_SYS_SETSOCKOPT:
- break;
- case RECORD_SYS_GETSOCKOPT:
- {
- gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
- gdb_byte *av = (gdb_byte *) alloca (tdep->size_int);
-
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- if (tmpulongest)
- {
- tmpulongest += tdep->size_ulong * 3;
- if (target_read_memory ((CORE_ADDR) tmpulongest, a,
- tdep->size_ulong * 2))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s len = %d.\n",
- OUTPUT_REG (tmpulongest, tdep->arg2),
- tdep->size_ulong * 2);
- return -1;
- }
- tmpulongest = extract_unsigned_integer (a + tdep->size_ulong,
- tdep->size_ulong,
- byte_order);
- if (tmpulongest)
- {
- if (target_read_memory ((CORE_ADDR) tmpulongest, av,
- tdep->size_int))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s "
- "len = %d.\n",
- phex_nz (tmpulongest,
- tdep->size_ulong),
- tdep->size_int);
- return -1;
- }
- tmpaddr
- = (CORE_ADDR) extract_unsigned_integer (a,
- tdep->size_ulong,
- byte_order);
- tmpint = (int) extract_unsigned_integer (av,
- tdep->size_int,
- byte_order);
- if (record_full_arch_list_add_mem (tmpaddr, tmpint))
- return -1;
- a += tdep->size_ulong;
- tmpaddr
- = (CORE_ADDR) extract_unsigned_integer (a,
- tdep->size_ulong,
- byte_order);
- if (record_full_arch_list_add_mem (tmpaddr,
+ return -1;
+ }
+ }
+ break;
+ case RECORD_SYS_SHUTDOWN:
+ case RECORD_SYS_SETSOCKOPT:
+ break;
+ case RECORD_SYS_GETSOCKOPT:
+ {
+ gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong * 2);
+ gdb_byte *av = (gdb_byte *) alloca (tdep->size_int);
+
+ regcache_raw_read_unsigned (regcache, tdep->arg2,
+ &tmpulongest);
+ if (tmpulongest)
+ {
+ tmpulongest += tdep->size_ulong * 3;
+ if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+ tdep->size_ulong * 2))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s len = %d.\n",
+ OUTPUT_REG (tmpulongest, tdep->arg2),
+ tdep->size_ulong * 2);
+ return -1;
+ }
+ tmpulongest = extract_unsigned_integer (a + tdep->size_ulong,
+ tdep->size_ulong,
+ byte_order);
+ if (tmpulongest)
+ {
+ if (target_read_memory ((CORE_ADDR) tmpulongest, av,
+ tdep->size_int))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s "
+ "len = %d.\n",
+ phex_nz (tmpulongest,
+ tdep->size_ulong),
+ tdep->size_int);
+ return -1;
+ }
+ tmpaddr
+ = (CORE_ADDR) extract_unsigned_integer (a,
+ tdep->size_ulong,
+ byte_order);
+ tmpint = (int) extract_unsigned_integer (av,
+ tdep->size_int,
+ byte_order);
+ if (record_full_arch_list_add_mem (tmpaddr, tmpint))
+ return -1;
+ a += tdep->size_ulong;
+ tmpaddr
+ = (CORE_ADDR) extract_unsigned_integer (a,
+ tdep->size_ulong,
+ byte_order);
+ if (record_full_arch_list_add_mem (tmpaddr,
tdep->size_int))
- return -1;
- }
- }
- }
- break;
- case RECORD_SYS_SENDMSG:
- break;
- case RECORD_SYS_RECVMSG:
- {
- gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong);
-
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- if (tmpulongest)
- {
- tmpulongest += tdep->size_ulong;
- if (target_read_memory ((CORE_ADDR) tmpulongest, a,
- tdep->size_ulong))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s len = %d.\n",
- OUTPUT_REG (tmpulongest, tdep->arg2),
- tdep->size_ulong);
- return -1;
- }
- tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
- byte_order);
- if (record_linux_msghdr (regcache, tdep, tmpulongest))
- return -1;
- }
- }
- break;
- default:
- printf_unfiltered (_("Process record and replay target "
- "doesn't support socketcall call 0x%s\n"),
- OUTPUT_REG (tmpulongest, tdep->arg1));
- return -1;
- break;
- }
+ return -1;
+ }
+ }
+ }
+ break;
+ case RECORD_SYS_SENDMSG:
+ break;
+ case RECORD_SYS_RECVMSG:
+ {
+ gdb_byte *a = (gdb_byte *) alloca (tdep->size_ulong);
+
+ regcache_raw_read_unsigned (regcache, tdep->arg2,
+ &tmpulongest);
+ if (tmpulongest)
+ {
+ tmpulongest += tdep->size_ulong;
+ if (target_read_memory ((CORE_ADDR) tmpulongest, a,
+ tdep->size_ulong))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s len = %d.\n",
+ OUTPUT_REG (tmpulongest, tdep->arg2),
+ tdep->size_ulong);
+ return -1;
+ }
+ tmpulongest = extract_unsigned_integer (a, tdep->size_ulong,
+ byte_order);
+ if (record_linux_msghdr (regcache, tdep, tmpulongest))
+ return -1;
+ }
+ }
+ break;
+ default:
+ printf_unfiltered (_("Process record and replay target "
+ "doesn't support socketcall call 0x%s\n"),
+ OUTPUT_REG (tmpulongest, tdep->arg1));
+ return -1;
+ break;
+ }
break;
case gdb_sys_syslog:
@@ -1107,14 +1107,14 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_itimerval))
- return -1;
+ return -1;
break;
case gdb_sys_getitimer:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_itimerval))
- return -1;
+ return -1;
break;
case gdb_sys_newstat:
@@ -1123,21 +1123,21 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_stat))
- return -1;
+ return -1;
break;
case gdb_sys_newfstatat:
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_stat))
- return -1;
+ return -1;
break;
case gdb_sys_uname:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_utsname))
- return -1;
+ return -1;
break;
case gdb_sys_iopl:
@@ -1150,11 +1150,11 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_rusage))
- return -1;
+ return -1;
break;
case gdb_sys_swapoff:
@@ -1164,7 +1164,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_sysinfo))
- return -1;
+ return -1;
break;
case gdb_sys_shmget:
@@ -1181,14 +1181,14 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_ulong))
- return -1;
+ return -1;
break;
case gdb_sys_shmctl:
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_shmid_ds))
- return -1;
+ return -1;
break;
/* XXX sys_semctl 525 still not supported. */
@@ -1196,14 +1196,14 @@ Do you want to stop the program?"),
case gdb_sys_msgrcv:
{
- ULONGEST msgp;
- LONGEST l;
-
- regcache_raw_read_signed (regcache, tdep->arg3, &l);
- regcache_raw_read_unsigned (regcache, tdep->arg2, &msgp);
- tmpint = l + tdep->size_long;
- if (record_full_arch_list_add_mem ((CORE_ADDR) msgp, tmpint))
- return -1;
+ ULONGEST msgp;
+ LONGEST l;
+
+ regcache_raw_read_signed (regcache, tdep->arg3, &l);
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &msgp);
+ tmpint = l + tdep->size_long;
+ if (record_full_arch_list_add_mem ((CORE_ADDR) msgp, tmpint))
+ return -1;
}
break;
@@ -1211,63 +1211,63 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_msqid_ds))
- return -1;
+ return -1;
break;
case gdb_sys_ipc:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
tmpulongest &= 0xffff;
switch (tmpulongest)
- {
- case RECORD_SEMOP:
- case RECORD_SEMGET:
- case RECORD_SEMTIMEDOP:
- case RECORD_MSGSND:
- case RECORD_MSGGET:
+ {
+ case RECORD_SEMOP:
+ case RECORD_SEMGET:
+ case RECORD_SEMTIMEDOP:
+ case RECORD_MSGSND:
+ case RECORD_MSGGET:
/* XXX maybe need do some record works with RECORD_SHMDT. */
- case RECORD_SHMDT:
- case RECORD_SHMGET:
- break;
- case RECORD_MSGRCV:
- {
- LONGEST second;
- ULONGEST ptr;
-
- regcache_raw_read_signed (regcache, tdep->arg3, &second);
- regcache_raw_read_unsigned (regcache, tdep->arg5, &ptr);
- tmpint = (int) second + tdep->size_long;
- if (record_full_arch_list_add_mem ((CORE_ADDR) ptr, tmpint))
- return -1;
- }
- break;
- case RECORD_MSGCTL:
- regcache_raw_read_unsigned (regcache, tdep->arg5,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ case RECORD_SHMDT:
+ case RECORD_SHMGET:
+ break;
+ case RECORD_MSGRCV:
+ {
+ LONGEST second;
+ ULONGEST ptr;
+
+ regcache_raw_read_signed (regcache, tdep->arg3, &second);
+ regcache_raw_read_unsigned (regcache, tdep->arg5, &ptr);
+ tmpint = (int) second + tdep->size_long;
+ if (record_full_arch_list_add_mem ((CORE_ADDR) ptr, tmpint))
+ return -1;
+ }
+ break;
+ case RECORD_MSGCTL:
+ regcache_raw_read_unsigned (regcache, tdep->arg5,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_msqid_ds))
- return -1;
- break;
- case RECORD_SHMAT:
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ return -1;
+ break;
+ case RECORD_SHMAT:
+ regcache_raw_read_unsigned (regcache, tdep->arg4,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_ulong))
- return -1;
- break;
- case RECORD_SHMCTL:
- regcache_raw_read_unsigned (regcache, tdep->arg5,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ return -1;
+ break;
+ case RECORD_SHMCTL:
+ regcache_raw_read_unsigned (regcache, tdep->arg5,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_shmid_ds))
- return -1;
- break;
- default:
+ return -1;
+ break;
+ default:
/* XXX RECORD_SEMCTL still not supported. */
- printf_unfiltered (_("Process record and replay target doesn't "
- "support ipc number %s\n"),
+ printf_unfiltered (_("Process record and replay target doesn't "
+ "support ipc number %s\n"),
pulongest (tmpulongest));
- break;
- }
+ break;
+ }
break;
case gdb_sys_fsync:
@@ -1280,27 +1280,27 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_new_utsname))
- return -1;
+ return -1;
break;
case gdb_sys_modify_ldt:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest == 0 || tmpulongest == 2)
- {
- ULONGEST ptr, bytecount;
+ {
+ ULONGEST ptr, bytecount;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &ptr);
- regcache_raw_read_unsigned (regcache, tdep->arg3, &bytecount);
- if (record_full_arch_list_add_mem ((CORE_ADDR) ptr, (int) bytecount))
- return -1;
- }
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &ptr);
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &bytecount);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) ptr, (int) bytecount))
+ return -1;
+ }
break;
case gdb_sys_adjtimex:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_timex))
- return -1;
+ return -1;
break;
case gdb_sys_mprotect:
@@ -1310,7 +1310,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_sigset_t))
- return -1;
+ return -1;
break;
case gdb_sys_ni_syscall127:
@@ -1322,37 +1322,37 @@ Do you want to stop the program?"),
case gdb_sys_quotactl:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
switch (tmpulongest)
- {
- case RECORD_Q_GETFMT:
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- /* __u32 */
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 4))
- return -1;
- break;
- case RECORD_Q_GETINFO:
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ case RECORD_Q_GETFMT:
+ regcache_raw_read_unsigned (regcache, tdep->arg4,
+ &tmpulongest);
+ /* __u32 */
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 4))
+ return -1;
+ break;
+ case RECORD_Q_GETINFO:
+ regcache_raw_read_unsigned (regcache, tdep->arg4,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_mem_dqinfo))
- return -1;
- break;
- case RECORD_Q_GETQUOTA:
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ return -1;
+ break;
+ case RECORD_Q_GETQUOTA:
+ regcache_raw_read_unsigned (regcache, tdep->arg4,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_if_dqblk))
- return -1;
- break;
- case RECORD_Q_XGETQSTAT:
- case RECORD_Q_XGETQUOTA:
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ return -1;
+ break;
+ case RECORD_Q_XGETQSTAT:
+ case RECORD_Q_XGETQUOTA:
+ regcache_raw_read_unsigned (regcache, tdep->arg4,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_fs_quota_stat))
- return -1;
- break;
- }
+ return -1;
+ break;
+ }
break;
case gdb_sys_getpgid:
@@ -1363,13 +1363,13 @@ Do you want to stop the program?"),
case gdb_sys_sysfs:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest == 2)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
/*XXX the size of memory is not very clear. */
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 10))
- return -1;
- }
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 10))
+ return -1;
+ }
break;
case gdb_sys_personality:
@@ -1382,19 +1382,19 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_loff_t))
- return -1;
+ return -1;
break;
case gdb_sys_getdents:
case gdb_sys_getdents64:
{
- ULONGEST count;
+ 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, count))
- return -1;
+ 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, count))
+ return -1;
}
break;
@@ -1402,19 +1402,19 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_fd_set))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_fd_set))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_fd_set))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_timeval))
- return -1;
+ return -1;
break;
case gdb_sys_flock:
@@ -1423,40 +1423,40 @@ Do you want to stop the program?"),
case gdb_sys_readv:
{
- ULONGEST vec, vlen;
-
- regcache_raw_read_unsigned (regcache, tdep->arg2, &vec);
- if (vec)
- {
- gdb_byte *iov = (gdb_byte *) alloca (tdep->size_iovec);
-
- regcache_raw_read_unsigned (regcache, tdep->arg3, &vlen);
- for (tmpulongest = 0; tmpulongest < vlen; tmpulongest++)
- {
- if (target_read_memory ((CORE_ADDR) vec, iov,
- tdep->size_iovec))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading "
- "memory at addr = 0x%s len = %d.\n",
- OUTPUT_REG (vec, tdep->arg2),
- tdep->size_iovec);
- return -1;
- }
- tmpaddr
- = (CORE_ADDR) extract_unsigned_integer (iov,
- tdep->size_pointer,
- byte_order);
- tmpint
- = (int) extract_unsigned_integer (iov + tdep->size_pointer,
- tdep->size_size_t,
- byte_order);
- if (record_full_arch_list_add_mem (tmpaddr, tmpint))
- return -1;
- vec += tdep->size_iovec;
- }
- }
+ ULONGEST vec, vlen;
+
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &vec);
+ if (vec)
+ {
+ gdb_byte *iov = (gdb_byte *) alloca (tdep->size_iovec);
+
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &vlen);
+ for (tmpulongest = 0; tmpulongest < vlen; tmpulongest++)
+ {
+ if (target_read_memory ((CORE_ADDR) vec, iov,
+ tdep->size_iovec))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading "
+ "memory at addr = 0x%s len = %d.\n",
+ OUTPUT_REG (vec, tdep->arg2),
+ tdep->size_iovec);
+ return -1;
+ }
+ tmpaddr
+ = (CORE_ADDR) extract_unsigned_integer (iov,
+ tdep->size_pointer,
+ byte_order);
+ tmpint
+ = (int) extract_unsigned_integer (iov + tdep->size_pointer,
+ tdep->size_size_t,
+ byte_order);
+ if (record_full_arch_list_add_mem (tmpaddr, tmpint))
+ return -1;
+ vec += tdep->size_iovec;
+ }
+ }
}
break;
@@ -1475,7 +1475,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
break;
case gdb_sys_sched_setscheduler:
@@ -1490,7 +1490,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_timespec))
- return -1;
+ return -1;
break;
case gdb_sys_mremap:
@@ -1501,15 +1501,15 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_uid_t))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_uid_t))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_uid_t))
- return -1;
+ return -1;
break;
case gdb_sys_vm86:
@@ -1519,31 +1519,31 @@ Do you want to stop the program?"),
case gdb_sys_poll:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST nfds;
+ {
+ ULONGEST nfds;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_pollfd * nfds))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_nfsservctl:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest == 7 || tmpulongest == 8)
- {
- int rsize;
+ {
+ int rsize;
- if (tmpulongest == 7)
- rsize = tdep->size_NFS_FHSIZE;
- else
- rsize = tdep->size_knfsd_fh;
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, rsize))
- return -1;
- }
+ if (tmpulongest == 7)
+ rsize = tdep->size_NFS_FHSIZE;
+ else
+ rsize = tdep->size_knfsd_fh;
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, rsize))
+ return -1;
+ }
break;
case gdb_sys_setresgid16:
@@ -1553,36 +1553,36 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_gid_t))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_gid_t))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_old_gid_t))
- return -1;
+ return -1;
break;
case gdb_sys_prctl:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
switch (tmpulongest)
- {
- case 2:
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ case 2:
+ regcache_raw_read_unsigned (regcache, tdep->arg2,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
- break;
- case 16:
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ return -1;
+ break;
+ case 16:
+ regcache_raw_read_unsigned (regcache, tdep->arg2,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_TASK_COMM_LEN))
- return -1;
- break;
- }
+ return -1;
+ break;
+ }
break;
case gdb_sys_rt_sigreturn:
@@ -1592,34 +1592,34 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_sigaction))
- return -1;
+ return -1;
break;
case gdb_sys_rt_sigprocmask:
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_sigset_t))
- return -1;
+ return -1;
break;
case gdb_sys_rt_sigpending:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST sigsetsize;
+ {
+ ULONGEST sigsetsize;
- regcache_raw_read_unsigned (regcache, tdep->arg2,&sigsetsize);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg2,&sigsetsize);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) sigsetsize))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_rt_sigtimedwait:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_siginfo_t))
- return -1;
+ return -1;
break;
case gdb_sys_rt_sigqueueinfo:
@@ -1629,14 +1629,14 @@ Do you want to stop the program?"),
case gdb_sys_pread64:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST count;
+ {
+ ULONGEST count;
- regcache_raw_read_unsigned (regcache, tdep->arg3,&count);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg3,&count);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) count))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_pwrite64:
@@ -1646,21 +1646,21 @@ Do you want to stop the program?"),
case gdb_sys_getcwd:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST size;
+ {
+ ULONGEST size;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &size);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &size);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) size))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_capget:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_cap_user_data_t))
- return -1;
+ return -1;
break;
case gdb_sys_capset:
@@ -1670,14 +1670,14 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_stack_t))
- return -1;
+ return -1;
break;
case gdb_sys_sendfile:
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_off_t))
- return -1;
+ return -1;
break;
case gdb_sys_ni_syscall188:
@@ -1689,7 +1689,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_rlimit))
- return -1;
+ return -1;
break;
case gdb_sys_mmap2:
@@ -1705,7 +1705,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_stat64))
- return -1;
+ return -1;
break;
case gdb_sys_lchown:
@@ -1720,15 +1720,15 @@ Do you want to stop the program?"),
case gdb_sys_getgroups:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST gidsetsize;
+ {
+ ULONGEST gidsetsize;
- regcache_raw_read_unsigned (regcache, tdep->arg1,
- &gidsetsize);
- tmpint = tdep->size_gid_t * (int) gidsetsize;
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
- return -1;
- }
+ regcache_raw_read_unsigned (regcache, tdep->arg1,
+ &gidsetsize);
+ tmpint = tdep->size_gid_t * (int) gidsetsize;
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
+ return -1;
+ }
break;
case gdb_sys_setgroups:
@@ -1740,15 +1740,15 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_uid_t))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_uid_t))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_uid_t))
- return -1;
+ return -1;
break;
case gdb_sys_setresgid:
@@ -1758,15 +1758,15 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_gid_t))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_gid_t))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_gid_t))
- return -1;
+ return -1;
break;
case gdb_sys_chown:
@@ -1781,7 +1781,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_PAGE_SIZE))
- return -1;
+ return -1;
break;
case gdb_sys_madvise:
@@ -1790,18 +1790,18 @@ Do you want to stop the program?"),
case gdb_sys_fcntl64:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest == tdep->fcntl_F_GETLK64)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_flock64))
- return -1;
- }
+ return -1;
+ }
else if (tmpulongest != tdep->fcntl_F_SETLK64
- && tmpulongest != tdep->fcntl_F_SETLKW64)
- {
- goto sys_fcntl;
- }
+ && tmpulongest != tdep->fcntl_F_SETLKW64)
+ {
+ goto sys_fcntl;
+ }
break;
case gdb_sys_ni_syscall222:
@@ -1818,14 +1818,14 @@ Do you want to stop the program?"),
case gdb_sys_fgetxattr:
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST size;
+ {
+ ULONGEST size;
- regcache_raw_read_unsigned (regcache, tdep->arg4, &size);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg4, &size);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) size))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_listxattr:
@@ -1833,14 +1833,14 @@ Do you want to stop the program?"),
case gdb_sys_flistxattr:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST size;
+ {
+ ULONGEST size;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) size))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_removexattr:
@@ -1853,7 +1853,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_loff_t))
- return -1;
+ return -1;
break;
case gdb_sys_futex:
@@ -1863,35 +1863,35 @@ Do you want to stop the program?"),
case gdb_sys_sched_getaffinity:
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST len;
+ {
+ ULONGEST len;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &len);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) len))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_set_thread_area:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
break;
case gdb_sys_get_thread_area:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_user_desc))
- return -1;
+ return -1;
break;
case gdb_sys_io_setup:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_long))
- return -1;
+ return -1;
break;
case gdb_sys_io_destroy:
@@ -1900,54 +1900,54 @@ Do you want to stop the program?"),
case gdb_sys_io_getevents:
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST nr;
+ {
+ ULONGEST nr;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &nr);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &nr);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
nr * tdep->size_io_event))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_io_submit:
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST nr, i;
- gdb_byte *iocbp;
-
- regcache_raw_read_unsigned (regcache, tdep->arg2, &nr);
- iocbp = (gdb_byte *) alloca (nr * tdep->size_pointer);
- if (target_read_memory ((CORE_ADDR) tmpulongest, iocbp,
- nr * tdep->size_pointer))
- {
- if (record_debug)
- fprintf_unfiltered (gdb_stdlog,
- "Process record: error reading memory "
- "at addr = 0x%s len = %u.\n",
- OUTPUT_REG (tmpulongest, tdep->arg2),
- (int) (nr * tdep->size_pointer));
- return -1;
- }
- for (i = 0; i < nr; i++)
- {
- tmpaddr
- = (CORE_ADDR) extract_unsigned_integer (iocbp,
- tdep->size_pointer,
- byte_order);
- if (record_full_arch_list_add_mem (tmpaddr, tdep->size_iocb))
- return -1;
- iocbp += tdep->size_pointer;
- }
- }
+ {
+ ULONGEST nr, i;
+ gdb_byte *iocbp;
+
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &nr);
+ iocbp = (gdb_byte *) alloca (nr * tdep->size_pointer);
+ if (target_read_memory ((CORE_ADDR) tmpulongest, iocbp,
+ nr * tdep->size_pointer))
+ {
+ if (record_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory "
+ "at addr = 0x%s len = %u.\n",
+ OUTPUT_REG (tmpulongest, tdep->arg2),
+ (int) (nr * tdep->size_pointer));
+ return -1;
+ }
+ for (i = 0; i < nr; i++)
+ {
+ tmpaddr
+ = (CORE_ADDR) extract_unsigned_integer (iocbp,
+ tdep->size_pointer,
+ byte_order);
+ if (record_full_arch_list_add_mem (tmpaddr, tdep->size_iocb))
+ return -1;
+ iocbp += tdep->size_pointer;
+ }
+ }
break;
case gdb_sys_io_cancel:
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_io_event))
- return -1;
+ return -1;
break;
case gdb_sys_fadvise64:
@@ -1956,29 +1956,29 @@ Do you want to stop the program?"),
case gdb_sys_exit_group:
{
- int q;
-
- target_terminal_ours ();
- q = yquery (_("The next instruction is syscall exit_group. "
- "It will make the program exit. "
- "Do you want to stop the program?"));
- target_terminal_inferior ();
- if (q)
- return 1;
+ int q;
+
+ target_terminal_ours ();
+ q = yquery (_("The next instruction is syscall exit_group. "
+ "It will make the program exit. "
+ "Do you want to stop the program?"));
+ target_terminal_inferior ();
+ if (q)
+ return 1;
}
break;
case gdb_sys_lookup_dcookie:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST len;
+ {
+ ULONGEST len;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) len))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_epoll_create:
@@ -1988,15 +1988,15 @@ Do you want to stop the program?"),
case gdb_sys_epoll_wait:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST maxevents;
+ {
+ ULONGEST maxevents;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(maxevents
* tdep->size_epoll_event)))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_remap_file_pages:
@@ -2007,21 +2007,21 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
break;
case gdb_sys_timer_settime:
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_itimerspec))
- return -1;
+ return -1;
break;
case gdb_sys_timer_gettime:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_itimerspec))
- return -1;
+ return -1;
break;
case gdb_sys_timer_getoverrun:
@@ -2033,21 +2033,21 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_timespec))
- return -1;
+ return -1;
break;
case gdb_sys_clock_getres:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_timespec))
- return -1;
+ return -1;
break;
case gdb_sys_clock_nanosleep:
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_timespec))
- return -1;
+ return -1;
break;
case gdb_sys_statfs64:
@@ -2055,7 +2055,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_statfs64))
- return -1;
+ return -1;
break;
case gdb_sys_tgkill:
@@ -2069,17 +2069,17 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST maxnode;
+ {
+ ULONGEST maxnode;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &maxnode);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &maxnode);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
maxnode * tdep->size_long))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_set_mempolicy:
@@ -2091,18 +2091,18 @@ Do you want to stop the program?"),
case gdb_sys_mq_timedreceive:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST msg_len;
+ {
+ ULONGEST msg_len;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &msg_len);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &msg_len);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) msg_len))
- return -1;
- }
+ return -1;
+ }
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
break;
case gdb_sys_mq_notify:
@@ -2112,7 +2112,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_mq_attr))
- return -1;
+ return -1;
break;
case gdb_sys_kexec_load:
@@ -2122,11 +2122,11 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_siginfo_t))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_rusage))
- return -1;
+ return -1;
break;
case gdb_sys_ni_syscall285:
@@ -2137,19 +2137,19 @@ Do you want to stop the program?"),
case gdb_sys_keyctl:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest == 6 || tmpulongest == 11)
- {
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (tmpulongest)
- {
- ULONGEST buflen;
-
- regcache_raw_read_unsigned (regcache, tdep->arg4, &buflen);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ {
+ regcache_raw_read_unsigned (regcache, tdep->arg3,
+ &tmpulongest);
+ if (tmpulongest)
+ {
+ ULONGEST buflen;
+
+ regcache_raw_read_unsigned (regcache, tdep->arg4, &buflen);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) buflen))
- return -1;
- }
- }
+ return -1;
+ }
+ }
break;
case gdb_sys_ioprio_set:
@@ -2169,7 +2169,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_stat64))
- return -1;
+ return -1;
break;
case gdb_sys_unlinkat:
@@ -2181,14 +2181,14 @@ Do you want to stop the program?"),
case gdb_sys_readlinkat:
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST bufsiz;
+ {
+ ULONGEST bufsiz;
- regcache_raw_read_unsigned (regcache, tdep->arg4, &bufsiz);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg4, &bufsiz);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
(int) bufsiz))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_fchmodat:
@@ -2199,36 +2199,36 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_fd_set))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_fd_set))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_fd_set))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_timespec))
- return -1;
+ return -1;
break;
case gdb_sys_ppoll:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST nfds;
+ {
+ ULONGEST nfds;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &nfds);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_pollfd * nfds))
- return -1;
- }
+ return -1;
+ }
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_timespec))
- return -1;
+ return -1;
break;
case gdb_sys_unshare:
@@ -2239,22 +2239,22 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
break;
case gdb_sys_splice:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_loff_t))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_loff_t))
- return -1;
+ return -1;
break;
case gdb_sys_sync_file_range:
@@ -2265,42 +2265,42 @@ Do you want to stop the program?"),
case gdb_sys_move_pages:
regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST nr_pages;
+ {
+ ULONGEST nr_pages;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &nr_pages);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
+ regcache_raw_read_unsigned (regcache, tdep->arg2, &nr_pages);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
nr_pages * tdep->size_int))
- return -1;
- }
+ return -1;
+ }
break;
case gdb_sys_getcpu:
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int))
- return -1;
+ return -1;
regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_ulong * 2))
- return -1;
+ return -1;
break;
case gdb_sys_epoll_pwait:
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
- {
- ULONGEST maxevents;
+ {
+ ULONGEST maxevents;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
- tmpint = (int) maxevents * tdep->size_epoll_event;
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
- return -1;
- }
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &maxevents);
+ tmpint = (int) maxevents * tdep->size_epoll_event;
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tmpint))
+ return -1;
+ }
break;
case gdb_sys_fallocate:
@@ -2313,7 +2313,7 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
tdep->size_int * 2))
- return -1;
+ return -1;
break;
case gdb_sys_inotify_init1:
@@ -2321,7 +2321,7 @@ Do you want to stop the program?"),
default:
printf_unfiltered (_("Process record and replay target doesn't "
- "support syscall number %d\n"), syscall);
+ "support syscall number %d\n"), syscall);
return -1;
break;
}
--
2.5.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/3] linux-record: Simplify with record_mem_at_reg()
2016-03-16 18:55 [PATCH 0/3] Some cleanups in linux-record.c Andreas Arnez
2016-03-16 18:56 ` [PATCH 2/3] linux-record.c: Fix whitespace issues Andreas Arnez
2016-03-16 18:56 ` [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2 Andreas Arnez
@ 2016-03-16 18:57 ` Andreas Arnez
2016-03-17 8:45 ` Yao Qi
2 siblings, 1 reply; 12+ messages in thread
From: Andreas Arnez @ 2016-03-16 18:57 UTC (permalink / raw)
To: gdb-patches; +Cc: Yao Qi, Metzger, Markus T
The function record_linux_system_call() often records a memory area
whose address is contained in a register. So far this required two
function calls: one for fetching the register value, and another one for
recording the memory area. These two function calls are now merged into
a new local helper function, and all occurrences are adjusted. This
reduces the source code and makes it more readable.
gdb/ChangeLog:
* linux-record.c (record_mem_at_reg): New helper function.
(record_linux_system_call): Exploit new helper function where
applicable.
---
gdb/linux-record.c | 578 +++++++++++++++--------------------------------------
1 file changed, 164 insertions(+), 414 deletions(-)
diff --git a/gdb/linux-record.c b/gdb/linux-record.c
index d171497..bf20419 100644
--- a/gdb/linux-record.c
+++ b/gdb/linux-record.c
@@ -85,6 +85,18 @@
#define OUTPUT_REG(val, num) phex_nz ((val), \
TYPE_LENGTH (gdbarch_register_type (get_regcache_arch (regcache), (num))))
+/* Record a memory area of length LEN pointed to by register
+ REGNUM. */
+
+static int
+record_mem_at_reg (struct regcache *regcache, int regnum, int len)
+{
+ ULONGEST addr;
+
+ regcache_raw_read_unsigned (regcache, regnum, &addr);
+ return record_full_arch_list_add_mem ((CORE_ADDR) addr, len);
+}
+
static int
record_linux_sockaddr (struct regcache *regcache,
struct linux_record_tdep *tdep, ULONGEST addr,
@@ -259,14 +271,9 @@ record_linux_system_call (enum gdb_syscall syscall,
break;
case gdb_sys_read:
- {
- ULONGEST addr, count;
-
- regcache_raw_read_unsigned (regcache, tdep->arg2, &addr);
- regcache_raw_read_unsigned (regcache, tdep->arg3, &count);
- if (record_full_arch_list_add_mem ((CORE_ADDR) addr, (int) count))
- return -1;
- }
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
+ if (record_mem_at_reg (regcache, tdep->arg2, (int) tmpulongest))
+ return -1;
break;
case gdb_sys_write:
@@ -306,9 +313,8 @@ record_linux_system_call (enum gdb_syscall syscall,
case gdb_sys_stat:
case gdb_sys_fstat:
case gdb_sys_lstat:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size__old_kernel_stat))
+ if (record_mem_at_reg (regcache, tdep->arg2,
+ tdep->size__old_kernel_stat))
return -1;
break;
@@ -327,9 +333,7 @@ record_linux_system_call (enum gdb_syscall syscall,
|| tmpulongest == RECORD_PTRACE_PEEKDATA
|| tmpulongest == RECORD_PTRACE_PEEKUSR)
{
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 4))
+ if (record_mem_at_reg (regcache, tdep->arg4, 4))
return -1;
}
break;
@@ -351,16 +355,12 @@ record_linux_system_call (enum gdb_syscall syscall,
break;
case gdb_sys_pipe:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int * 2))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int * 2))
return -1;
break;
case gdb_sys_times:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_tms))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_tms))
return -1;
break;
@@ -430,19 +430,14 @@ record_linux_system_call (enum gdb_syscall syscall,
|| tmpulongest == tdep->ioctl_TCGETA
|| tmpulongest == tdep->ioctl_TIOCGLCKTRMIOS)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_termios))
+ if (record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_termios))
return -1;
}
else if (tmpulongest == tdep->ioctl_TIOCGPGRP
|| tmpulongest == tdep->ioctl_TIOCGSID)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_pid_t))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_pid_t))
return -1;
}
else if (tmpulongest == tdep->ioctl_TIOCOUTQ
@@ -454,66 +449,48 @@ record_linux_system_call (enum gdb_syscall syscall,
|| tmpulongest == tdep->ioctl_TIOCGPTN
|| tmpulongest == tdep->ioctl_TIOCSERGETLSR)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_int))
return -1;
}
else if (tmpulongest == tdep->ioctl_TIOCGWINSZ)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_winsize))
+ if (record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_winsize))
return -1;
}
else if (tmpulongest == tdep->ioctl_TIOCLINUX)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
/* This syscall affects a char-size memory. */
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 1))
+ if (record_mem_at_reg (regcache, tdep->arg3, 1))
return -1;
}
else if (tmpulongest == tdep->ioctl_TIOCGSERIAL)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_serial_struct))
+ if (record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_serial_struct))
return -1;
}
else if (tmpulongest == tdep->ioctl_TCGETS2)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_termios2))
+ if (record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_termios2))
return -1;
}
else if (tmpulongest == tdep->ioctl_FIOQSIZE)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_loff_t))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_loff_t))
return -1;
}
else if (tmpulongest == tdep->ioctl_TIOCGICOUNT)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_serial_icounter_struct))
+ if (record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_serial_icounter_struct))
return -1;
}
else if (tmpulongest == tdep->ioctl_TIOCGHAYESESP)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_hayes_esp_config))
+ if (record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_hayes_esp_config))
return -1;
}
else if (tmpulongest == tdep->ioctl_TIOCSERGSTRUCT)
@@ -537,10 +514,7 @@ record_linux_system_call (enum gdb_syscall syscall,
sys_fcntl:
if (tmpulongest == tdep->fcntl_F_GETLK)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_flock))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_flock))
return -1;
}
break;
@@ -551,9 +525,8 @@ record_linux_system_call (enum gdb_syscall syscall,
break;
case gdb_sys_olduname:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_oldold_utsname))
+ if (record_mem_at_reg (regcache, tdep->arg1,
+ tdep->size_oldold_utsname))
return -1;
break;
@@ -562,9 +535,7 @@ record_linux_system_call (enum gdb_syscall syscall,
break;
case gdb_sys_ustat:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_ustat))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_ustat))
return -1;
break;
@@ -575,9 +546,8 @@ record_linux_system_call (enum gdb_syscall syscall,
break;
case gdb_sys_sigaction:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_sigaction))
+ if (record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_old_sigaction))
return -1;
break;
@@ -589,9 +559,8 @@ record_linux_system_call (enum gdb_syscall syscall,
break;
case gdb_sys_sigpending:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_sigset_t))
+ if (record_mem_at_reg (regcache, tdep->arg1,
+ tdep->size_old_sigset_t))
return -1;
break;
@@ -600,27 +569,18 @@ record_linux_system_call (enum gdb_syscall syscall,
break;
case gdb_sys_old_getrlimit:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_rlimit))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_rlimit))
return -1;
break;
case gdb_sys_getrusage:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_rusage))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_rusage))
return -1;
break;
case gdb_sys_gettimeofday:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_timeval))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_timezone))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_timeval)
+ || record_mem_at_reg (regcache, tdep->arg2, tdep->size_timezone))
return -1;
break;
@@ -693,15 +653,9 @@ record_linux_system_call (enum gdb_syscall syscall,
break;
case gdb_sys_readlink:
- {
- ULONGEST len;
-
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- regcache_raw_read_unsigned (regcache, tdep->arg3, &len);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, (int) len))
- return -1;
- }
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
+ if (record_mem_at_reg (regcache, tdep->arg2, (int) tmpulongest))
+ return -1;
break;
case gdb_sys_uselib:
@@ -723,9 +677,7 @@ record_linux_system_call (enum gdb_syscall syscall,
break;
case gdb_old_readdir:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_dirent))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_old_dirent))
return -1;
break;
@@ -768,9 +720,7 @@ Do you want to stop the program?"),
case gdb_sys_statfs:
case gdb_sys_fstatfs:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_statfs))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_statfs))
return -1;
break;
@@ -812,15 +762,9 @@ Do you want to stop the program?"),
break;
case gdb_sys_recv:
- {
- ULONGEST size;
-
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- regcache_raw_read_unsigned (regcache, tdep->arg3, &size);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- (int) size))
- return -1;
- }
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
+ if (record_mem_at_reg (regcache, tdep->arg2, (int) tmpulongest))
+ return -1;
break;
case gdb_sys_recvmsg:
@@ -830,9 +774,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_socketpair:
- regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
+ if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_int))
return -1;
break;
@@ -1104,25 +1046,19 @@ Do you want to stop the program?"),
break;
case gdb_sys_setitimer:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_itimerval))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_itimerval))
return -1;
break;
case gdb_sys_getitimer:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_itimerval))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_itimerval))
return -1;
break;
case gdb_sys_newstat:
case gdb_sys_newlstat:
case gdb_sys_newfstat:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_stat))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_stat))
return -1;
break;
@@ -1134,9 +1070,8 @@ Do you want to stop the program?"),
break;
case gdb_sys_uname:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_utsname))
+ if (record_mem_at_reg (regcache, tdep->arg1,
+ tdep->size_old_utsname))
return -1;
break;
@@ -1147,13 +1082,8 @@ Do you want to stop the program?"),
break;
case gdb_sys_wait4:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_rusage))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int)
+ || record_mem_at_reg (regcache, tdep->arg4, tdep->size_rusage))
return -1;
break;
@@ -1161,9 +1091,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_sysinfo:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_sysinfo))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_sysinfo))
return -1;
break;
@@ -1178,16 +1106,12 @@ Do you want to stop the program?"),
break;
case gdb_sys_shmat:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_ulong))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_ulong))
return -1;
break;
case gdb_sys_shmctl:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_shmid_ds))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_shmid_ds))
return -1;
break;
@@ -1196,21 +1120,17 @@ Do you want to stop the program?"),
case gdb_sys_msgrcv:
{
- ULONGEST msgp;
LONGEST l;
regcache_raw_read_signed (regcache, tdep->arg3, &l);
- regcache_raw_read_unsigned (regcache, tdep->arg2, &msgp);
tmpint = l + tdep->size_long;
- if (record_full_arch_list_add_mem ((CORE_ADDR) msgp, tmpint))
+ if (record_mem_at_reg (regcache, tdep->arg2, tmpint))
return -1;
}
break;
case gdb_sys_msgctl:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_msqid_ds))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_msqid_ds))
return -1;
break;
@@ -1231,34 +1151,25 @@ Do you want to stop the program?"),
case RECORD_MSGRCV:
{
LONGEST second;
- ULONGEST ptr;
regcache_raw_read_signed (regcache, tdep->arg3, &second);
- regcache_raw_read_unsigned (regcache, tdep->arg5, &ptr);
tmpint = (int) second + tdep->size_long;
- if (record_full_arch_list_add_mem ((CORE_ADDR) ptr, tmpint))
+ if (record_mem_at_reg (regcache, tdep->arg5, tmpint))
return -1;
}
break;
case RECORD_MSGCTL:
- regcache_raw_read_unsigned (regcache, tdep->arg5,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_msqid_ds))
+ if (record_mem_at_reg (regcache, tdep->arg5,
+ tdep->size_msqid_ds))
return -1;
break;
case RECORD_SHMAT:
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_ulong))
+ if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_ulong))
return -1;
break;
case RECORD_SHMCTL:
- regcache_raw_read_unsigned (regcache, tdep->arg5,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_shmid_ds))
+ if (record_mem_at_reg (regcache, tdep->arg5,
+ tdep->size_shmid_ds))
return -1;
break;
default:
@@ -1277,9 +1188,8 @@ Do you want to stop the program?"),
break;
case gdb_sys_newuname:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_new_utsname))
+ if (record_mem_at_reg (regcache, tdep->arg1,
+ tdep->size_new_utsname))
return -1;
break;
@@ -1287,19 +1197,16 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest == 0 || tmpulongest == 2)
{
- ULONGEST ptr, bytecount;
+ ULONGEST bytecount;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &ptr);
regcache_raw_read_unsigned (regcache, tdep->arg3, &bytecount);
- if (record_full_arch_list_add_mem ((CORE_ADDR) ptr, (int) bytecount))
+ if (record_mem_at_reg (regcache, tdep->arg2, (int) bytecount))
return -1;
}
break;
case gdb_sys_adjtimex:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_timex))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_timex))
return -1;
break;
@@ -1307,9 +1214,8 @@ Do you want to stop the program?"),
break;
case gdb_sys_sigprocmask:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_sigset_t))
+ if (record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_old_sigset_t))
return -1;
break;
@@ -1324,32 +1230,24 @@ Do you want to stop the program?"),
switch (tmpulongest)
{
case RECORD_Q_GETFMT:
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
/* __u32 */
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 4))
+ if (record_mem_at_reg (regcache, tdep->arg4, 4))
return -1;
break;
case RECORD_Q_GETINFO:
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_mem_dqinfo))
+ if (record_mem_at_reg (regcache, tdep->arg4,
+ tdep->size_mem_dqinfo))
return -1;
break;
case RECORD_Q_GETQUOTA:
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_if_dqblk))
+ if (record_mem_at_reg (regcache, tdep->arg4,
+ tdep->size_if_dqblk))
return -1;
break;
case RECORD_Q_XGETQSTAT:
case RECORD_Q_XGETQUOTA:
- regcache_raw_read_unsigned (regcache, tdep->arg4,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_fs_quota_stat))
+ if (record_mem_at_reg (regcache, tdep->arg4,
+ tdep->size_fs_quota_stat))
return -1;
break;
}
@@ -1364,10 +1262,8 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
if (tmpulongest == 2)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
/*XXX the size of memory is not very clear. */
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 10))
+ if (record_mem_at_reg (regcache, tdep->arg3, 10))
return -1;
}
break;
@@ -1379,41 +1275,22 @@ Do you want to stop the program?"),
break;
case gdb_sys_llseek:
- regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_loff_t))
+ if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_loff_t))
return -1;
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, count))
- return -1;
- }
+ regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
+ if (record_mem_at_reg (regcache, tdep->arg2, tmpulongest))
+ return -1;
break;
case gdb_sys_select:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_fd_set))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_fd_set))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_fd_set))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_timeval))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_fd_set)
+ || record_mem_at_reg (regcache, tdep->arg3, tdep->size_fd_set)
+ || record_mem_at_reg (regcache, tdep->arg4, tdep->size_fd_set)
+ || record_mem_at_reg (regcache, tdep->arg5, tdep->size_timeval))
return -1;
break;
@@ -1472,9 +1349,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_sched_getparam:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int))
return -1;
break;
@@ -1487,9 +1362,7 @@ Do you want to stop the program?"),
case gdb_sys_sched_rr_get_interval:
case gdb_sys_nanosleep:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_timespec))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_timespec))
return -1;
break;
@@ -1498,17 +1371,11 @@ Do you want to stop the program?"),
break;
case gdb_sys_getresuid16:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_uid_t))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_uid_t))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_uid_t))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_old_uid_t)
+ || record_mem_at_reg (regcache, tdep->arg2,
+ tdep->size_old_uid_t)
+ || record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_old_uid_t))
return -1;
break;
@@ -1539,9 +1406,7 @@ Do you want to stop the program?"),
rsize = tdep->size_NFS_FHSIZE;
else
rsize = tdep->size_knfsd_fh;
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, rsize))
+ if (record_mem_at_reg (regcache, tdep->arg3, rsize))
return -1;
}
break;
@@ -1550,17 +1415,11 @@ Do you want to stop the program?"),
break;
case gdb_sys_getresgid16:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_gid_t))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_gid_t))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_old_gid_t))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_old_gid_t)
+ || record_mem_at_reg (regcache, tdep->arg2,
+ tdep->size_old_gid_t)
+ || record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_old_gid_t))
return -1;
break;
@@ -1569,17 +1428,12 @@ Do you want to stop the program?"),
switch (tmpulongest)
{
case 2:
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int))
return -1;
break;
case 16:
- regcache_raw_read_unsigned (regcache, tdep->arg2,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_TASK_COMM_LEN))
+ if (record_mem_at_reg (regcache, tdep->arg2,
+ tdep->size_TASK_COMM_LEN))
return -1;
break;
}
@@ -1589,16 +1443,12 @@ Do you want to stop the program?"),
break;
case gdb_sys_rt_sigaction:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_sigaction))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_sigaction))
return -1;
break;
case gdb_sys_rt_sigprocmask:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_sigset_t))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_sigset_t))
return -1;
break;
@@ -1616,9 +1466,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_rt_sigtimedwait:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_siginfo_t))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_siginfo_t))
return -1;
break;
@@ -1657,9 +1505,8 @@ Do you want to stop the program?"),
break;
case gdb_sys_capget:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_cap_user_data_t))
+ if (record_mem_at_reg (regcache, tdep->arg2,
+ tdep->size_cap_user_data_t))
return -1;
break;
@@ -1667,16 +1514,12 @@ Do you want to stop the program?"),
break;
case gdb_sys_sigaltstack:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_stack_t))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_stack_t))
return -1;
break;
case gdb_sys_sendfile:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_off_t))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_off_t))
return -1;
break;
@@ -1686,9 +1529,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_getrlimit:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_rlimit))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_rlimit))
return -1;
break;
@@ -1702,9 +1543,7 @@ Do you want to stop the program?"),
case gdb_sys_stat64:
case gdb_sys_lstat64:
case gdb_sys_fstat64:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_stat64))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_stat64))
return -1;
break;
@@ -1737,17 +1576,9 @@ Do you want to stop the program?"),
break;
case gdb_sys_getresuid:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_uid_t))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_uid_t))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_uid_t))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_uid_t)
+ || record_mem_at_reg (regcache, tdep->arg2, tdep->size_uid_t)
+ || record_mem_at_reg (regcache, tdep->arg3, tdep->size_uid_t))
return -1;
break;
@@ -1755,17 +1586,9 @@ Do you want to stop the program?"),
break;
case gdb_sys_getresgid:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_gid_t))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_gid_t))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_gid_t))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_gid_t)
+ || record_mem_at_reg (regcache, tdep->arg2, tdep->size_gid_t)
+ || record_mem_at_reg (regcache, tdep->arg3, tdep->size_gid_t))
return -1;
break;
@@ -1778,9 +1601,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_mincore:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_PAGE_SIZE))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_PAGE_SIZE))
return -1;
break;
@@ -1791,10 +1612,8 @@ Do you want to stop the program?"),
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest == tdep->fcntl_F_GETLK64)
{
- regcache_raw_read_unsigned (regcache, tdep->arg3,
- &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_flock64))
+ if (record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_flock64))
return -1;
}
else if (tmpulongest != tdep->fcntl_F_SETLK64
@@ -1850,9 +1669,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_sendfile64:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_loff_t))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_loff_t))
return -1;
break;
@@ -1874,23 +1691,17 @@ Do you want to stop the program?"),
break;
case gdb_sys_set_thread_area:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int))
return -1;
break;
case gdb_sys_get_thread_area:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_user_desc))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_user_desc))
return -1;
break;
case gdb_sys_io_setup:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_long))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_long))
return -1;
break;
@@ -1944,9 +1755,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_io_cancel:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_io_event))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_io_event))
return -1;
break;
@@ -2004,23 +1813,17 @@ Do you want to stop the program?"),
break;
case gdb_sys_timer_create:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_int))
return -1;
break;
case gdb_sys_timer_settime:
- regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_itimerspec))
+ if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_itimerspec))
return -1;
break;
case gdb_sys_timer_gettime:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_itimerspec))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_itimerspec))
return -1;
break;
@@ -2030,31 +1833,23 @@ Do you want to stop the program?"),
break;
case gdb_sys_clock_gettime:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_timespec))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_timespec))
return -1;
break;
case gdb_sys_clock_getres:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_timespec))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_timespec))
return -1;
break;
case gdb_sys_clock_nanosleep:
- regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_timespec))
+ if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_timespec))
return -1;
break;
case gdb_sys_statfs64:
case gdb_sys_fstatfs64:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_statfs64))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_statfs64))
return -1;
break;
@@ -2066,9 +1861,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_get_mempolicy:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int))
return -1;
regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
if (tmpulongest)
@@ -2099,9 +1892,7 @@ Do you want to stop the program?"),
(int) msg_len))
return -1;
}
- regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
+ if (record_mem_at_reg (regcache, tdep->arg4, tdep->size_int))
return -1;
break;
@@ -2109,9 +1900,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_mq_getsetattr:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_mq_attr))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_mq_attr))
return -1;
break;
@@ -2119,13 +1908,8 @@ Do you want to stop the program?"),
break;
case gdb_sys_waitid:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_siginfo_t))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_rusage))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_siginfo_t)
+ || record_mem_at_reg (regcache, tdep->arg5, tdep->size_rusage))
return -1;
break;
@@ -2166,9 +1950,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_fstatat64:
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_stat64))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_stat64))
return -1;
break;
@@ -2196,21 +1978,10 @@ Do you want to stop the program?"),
break;
case gdb_sys_pselect6:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_fd_set))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_fd_set))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_fd_set))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_timespec))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_fd_set)
+ || record_mem_at_reg (regcache, tdep->arg3, tdep->size_fd_set)
+ || record_mem_at_reg (regcache, tdep->arg4, tdep->size_fd_set)
+ || record_mem_at_reg (regcache, tdep->arg5, tdep->size_timespec))
return -1;
break;
@@ -2225,9 +1996,7 @@ Do you want to stop the program?"),
tdep->size_pollfd * nfds))
return -1;
}
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_timespec))
+ if (record_mem_at_reg (regcache, tdep->arg3, tdep->size_timespec))
return -1;
break;
@@ -2236,24 +2005,14 @@ Do you want to stop the program?"),
break;
case gdb_sys_get_robust_list:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_int)
+ || record_mem_at_reg (regcache, tdep->arg3, tdep->size_int))
return -1;
break;
case gdb_sys_splice:
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_loff_t))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg4, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_loff_t))
+ if (record_mem_at_reg (regcache, tdep->arg2, tdep->size_loff_t)
+ || record_mem_at_reg (regcache, tdep->arg4, tdep->size_loff_t))
return -1;
break;
@@ -2276,17 +2035,10 @@ Do you want to stop the program?"),
break;
case gdb_sys_getcpu:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg2, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int))
- return -1;
- regcache_raw_read_unsigned (regcache, tdep->arg3, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_ulong * 2))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int)
+ || record_mem_at_reg (regcache, tdep->arg2, tdep->size_int)
+ || record_mem_at_reg (regcache, tdep->arg3,
+ tdep->size_ulong * 2))
return -1;
break;
@@ -2310,9 +2062,7 @@ Do you want to stop the program?"),
break;
case gdb_sys_pipe2:
- regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
- if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
- tdep->size_int * 2))
+ if (record_mem_at_reg (regcache, tdep->arg1, tdep->size_int * 2))
return -1;
break;
--
2.5.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2
2016-03-16 18:56 ` [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2 Andreas Arnez
@ 2016-03-16 20:23 ` Marcin Kościelnicki
2016-03-17 12:51 ` Andreas Arnez
2016-03-17 8:42 ` Yao Qi
1 sibling, 1 reply; 12+ messages in thread
From: Marcin Kościelnicki @ 2016-03-16 20:23 UTC (permalink / raw)
To: Andreas Arnez, gdb-patches; +Cc: Yao Qi, Metzger, Markus T
On 16/03/16 19:54, Andreas Arnez wrote:
> This patch added handling for some syscalls to linux-record.c:
>
> https://sourceware.org/ml/gdb-patches/2015-10/msg00452.html
>
> But for both `pipe' and `pipe2' the patch lacks a statement after an
> `if', such that the following `break' is interpreted as the `if'-body
> instead.
>
> This adds the missing (return-) statements for the conditionals.
Whoops, my bad. This looks like obvious patch material. Though I
wonder why it wasn't detected earlier by someone running GCC 6 with its
-Wmisleading-indentation warning - does it not catch it?
Btw, it seems that cases gdb_sys_pipe2 and gdb_sys_pipe could be
squashed into one.
>
> gdb/ChangeLog:
>
> * linux-record.c (record_linux_system_call): Add missing return
> statements to handling of pipe and pipe2 syscalls.
> ---
> gdb/linux-record.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gdb/linux-record.c b/gdb/linux-record.c
> index a40845a..2e86936 100644
> --- a/gdb/linux-record.c
> +++ b/gdb/linux-record.c
> @@ -354,6 +354,7 @@ record_linux_system_call (enum gdb_syscall syscall,
> regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
> if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
> tdep->size_int * 2))
> + return -1;
> break;
>
> case gdb_sys_times:
> @@ -2312,6 +2313,7 @@ Do you want to stop the program?"),
> regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
> if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
> tdep->size_int * 2))
> + return -1;
> break;
>
> case gdb_sys_inotify_init1:
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2
2016-03-16 18:56 ` [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2 Andreas Arnez
2016-03-16 20:23 ` Marcin Kościelnicki
@ 2016-03-17 8:42 ` Yao Qi
2016-03-17 9:11 ` Andreas Arnez
1 sibling, 1 reply; 12+ messages in thread
From: Yao Qi @ 2016-03-17 8:42 UTC (permalink / raw)
To: Andreas Arnez
Cc: gdb-patches, Yao Qi, Metzger, Markus T, Marcin Kościelnicki
Andreas Arnez <arnez@linux.vnet.ibm.com> writes:
> gdb/ChangeLog:
>
> * linux-record.c (record_linux_system_call): Add missing return
> statements to handling of pipe and pipe2 syscalls.
Patch is good to me.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/3] linux-record.c: Fix whitespace issues
2016-03-16 18:56 ` [PATCH 2/3] linux-record.c: Fix whitespace issues Andreas Arnez
@ 2016-03-17 8:44 ` Yao Qi
2016-03-17 9:12 ` Andreas Arnez
0 siblings, 1 reply; 12+ messages in thread
From: Yao Qi @ 2016-03-17 8:44 UTC (permalink / raw)
To: Andreas Arnez; +Cc: gdb-patches, Yao Qi, Metzger, Markus T
Andreas Arnez <arnez@linux.vnet.ibm.com> writes:
> gdb/ChangeLog:
>
> * linux-record.c: Fix whitespace issues: tabify; remove trailing
s/:/; ?
> spaces.
Patch is OK.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] linux-record: Simplify with record_mem_at_reg()
2016-03-16 18:57 ` [PATCH 3/3] linux-record: Simplify with record_mem_at_reg() Andreas Arnez
@ 2016-03-17 8:45 ` Yao Qi
2016-03-17 9:11 ` Andreas Arnez
0 siblings, 1 reply; 12+ messages in thread
From: Yao Qi @ 2016-03-17 8:45 UTC (permalink / raw)
To: Andreas Arnez; +Cc: gdb-patches, Yao Qi, Metzger, Markus T
Andreas Arnez <arnez@linux.vnet.ibm.com> writes:
> gdb/ChangeLog:
>
> * linux-record.c (record_mem_at_reg): New helper function.
> (record_linux_system_call): Exploit new helper function where
> applicable.
Patch is OK.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2
2016-03-17 8:42 ` Yao Qi
@ 2016-03-17 9:11 ` Andreas Arnez
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Arnez @ 2016-03-17 9:11 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches, Metzger, Markus T, Marcin Kościelnicki
On Thu, Mar 17 2016, Yao Qi wrote:
> Andreas Arnez <arnez@linux.vnet.ibm.com> writes:
>
>> gdb/ChangeLog:
>>
>> * linux-record.c (record_linux_system_call): Add missing return
>> statements to handling of pipe and pipe2 syscalls.
>
> Patch is good to me.
Thanks, pushed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] linux-record: Simplify with record_mem_at_reg()
2016-03-17 8:45 ` Yao Qi
@ 2016-03-17 9:11 ` Andreas Arnez
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Arnez @ 2016-03-17 9:11 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches, Metzger, Markus T
On Thu, Mar 17 2016, Yao Qi wrote:
> Andreas Arnez <arnez@linux.vnet.ibm.com> writes:
>
>> gdb/ChangeLog:
>>
>> * linux-record.c (record_mem_at_reg): New helper function.
>> (record_linux_system_call): Exploit new helper function where
>> applicable.
>
> Patch is OK.
Thanks, pushed.
--
Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/3] linux-record.c: Fix whitespace issues
2016-03-17 8:44 ` Yao Qi
@ 2016-03-17 9:12 ` Andreas Arnez
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Arnez @ 2016-03-17 9:12 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches, Metzger, Markus T
On Thu, Mar 17 2016, Yao Qi wrote:
> Andreas Arnez <arnez@linux.vnet.ibm.com> writes:
>
>> gdb/ChangeLog:
>>
>> * linux-record.c: Fix whitespace issues: tabify; remove trailing
>
> s/:/; ?
>
>> spaces.
>
> Patch is OK.
Thanks, changed and pushed.
--
Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2
2016-03-16 20:23 ` Marcin Kościelnicki
@ 2016-03-17 12:51 ` Andreas Arnez
0 siblings, 0 replies; 12+ messages in thread
From: Andreas Arnez @ 2016-03-17 12:51 UTC (permalink / raw)
To: Marcin Kościelnicki; +Cc: gdb-patches, Yao Qi, Metzger, Markus T
On Wed, Mar 16 2016, Marcin Kościelnicki wrote:
> On 16/03/16 19:54, Andreas Arnez wrote:
>> This patch added handling for some syscalls to linux-record.c:
>>
>> https://sourceware.org/ml/gdb-patches/2015-10/msg00452.html
>>
>> But for both `pipe' and `pipe2' the patch lacks a statement after an
>> `if', such that the following `break' is interpreted as the `if'-body
>> instead.
>>
>> This adds the missing (return-) statements for the conditionals.
>
> Whoops, my bad. This looks like obvious patch material. Though I
> wonder why it wasn't detected earlier by someone running GCC 6 with
> its -Wmisleading-indentation warning - does it not catch it?
Right, it doesn't catch it (yet):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66298
> Btw, it seems that cases gdb_sys_pipe2 and gdb_sys_pipe could be
> squashed into one.
Right, and a few other cases could be squashed as well. Mabye I'll post
another patch for that...
--
Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-03-17 12:51 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-16 18:55 [PATCH 0/3] Some cleanups in linux-record.c Andreas Arnez
2016-03-16 18:56 ` [PATCH 2/3] linux-record.c: Fix whitespace issues Andreas Arnez
2016-03-17 8:44 ` Yao Qi
2016-03-17 9:12 ` Andreas Arnez
2016-03-16 18:56 ` [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2 Andreas Arnez
2016-03-16 20:23 ` Marcin Kościelnicki
2016-03-17 12:51 ` Andreas Arnez
2016-03-17 8:42 ` Yao Qi
2016-03-17 9:11 ` Andreas Arnez
2016-03-16 18:57 ` [PATCH 3/3] linux-record: Simplify with record_mem_at_reg() Andreas Arnez
2016-03-17 8:45 ` Yao Qi
2016-03-17 9:11 ` Andreas Arnez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox