/* Process record and replay target code for GNU/Linux.
- Copyright (C) 2008-2021 Free Software Foundation, Inc.
+ Copyright (C) 2008-2022 Free Software Foundation, Inc.
This file is part of GDB.
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);
+ gdb_printf (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);
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);
+ gdb_printf (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;
}
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);
+ gdb_printf (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,
}
else if (tmpulongest == tdep->ioctl_TIOCSERGSTRUCT)
{
- printf_unfiltered (_("Process record and replay target doesn't "
- "support ioctl request TIOCSERGSTRUCT\n"));
+ gdb_printf (gdb_stderr,
+ _("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));
+ gdb_printf (gdb_stderr,
+ _("Process record and replay target doesn't "
+ "support ioctl request 0x%s.\n"),
+ OUTPUT_REG (tmpulongest, tdep->arg2));
return 1;
}
break;
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);
+ gdb_printf (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. */
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);
+ gdb_printf (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);
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);
+ gdb_printf (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))
{
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);
+ gdb_printf (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
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);
+ gdb_printf (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))
{
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);
+ gdb_printf (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,
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);
+ gdb_printf (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_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);
+ gdb_printf (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
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);
+ gdb_printf (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,
}
break;
default:
- printf_unfiltered (_("Process record and replay target "
- "doesn't support socketcall call 0x%s\n"),
- OUTPUT_REG (tmpulongest, tdep->arg1));
+ gdb_printf (gdb_stderr,
+ _("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 gdb_sys_statx:
+ regcache_raw_read_unsigned (regcache, tdep->arg5, &tmpulongest);
+ if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, 256))
+ return -1;
+ break;
+
case gdb_sys_uname:
if (record_mem_at_reg (regcache, tdep->arg1,
tdep->size_old_utsname))
break;
default:
/* XXX RECORD_SEMCTL still not supported. */
- printf_unfiltered (_("Process record and replay target doesn't "
- "support ipc number %s\n"),
- pulongest (tmpulongest));
+ gdb_printf (gdb_stderr,
+ _("Process record and replay target doesn't "
+ "support ipc number %s\n"),
+ pulongest (tmpulongest));
break;
}
break;
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);
+ gdb_printf (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
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));
+ gdb_printf (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++)
break;
default:
- printf_unfiltered (_("Process record and replay target doesn't "
- "support syscall number %d\n"), syscall);
+ gdb_printf (gdb_stderr,
+ _("Process record and replay target doesn't "
+ "support syscall number %d\n"), syscall);
return -1;
break;
}