This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] GDB process record and reverse debugging improvements for arm*-linux*
- From: Yao Qi <yao at codesourcery dot com>
- To: Omair Javaid <omair dot javaid at linaro dot org>
- Cc: <gdb-patches at sourceware dot org>, Patch Tracking <patches at linaro dot org>
- Date: Mon, 11 Nov 2013 17:52:10 +0800
- Subject: Re: [PATCH 2/2] GDB process record and reverse debugging improvements for arm*-linux*
- Authentication-results: sourceware.org; auth=none
- References: <CANW4E-0qP8iMVh1czWuOjhwfH9Q-2aJUG=2wEzDX1mLXy3avAw at mail dot gmail dot com> <5268865F dot 6060307 at codesourcery dot com> <527C5887 dot 8070304 at linaro dot org>
On 11/08/2013 11:20 AM, Omair Javaid wrote:
2013-11-08 Omair Javaid<omair.javaid@linaro.org>
* arm-linux-tdep.c (struct arm_linux_record_tdep): Declare.
(arm_canonicalize_syscall): New function.
(arm_all_but_pc_registers_record): New function.
(arm_linux_syscall_record): New function.
(arm_linux_init_abi): Add syscall recording constructs.
* arm-tdep.c (thumb_record_ldm_stm_swi): Update thumb syscall decoding.
(arm_record_coproc_data_proc): Update arm syscall decoding.
* arm-tdep.h (gdbarch_tdep): Update arm_syscall_record declaration.
We can write the last entry like this:
* arm-tdep.h (struct gdbarch_tdep) <arm_swi_record>: Remove.
<arm_syscall_record>: New field.
+#include "record-full.h"
+#include "linux-record.h"
+
We should mention these two inclusions in ChangeLog too, like
* arm-linux-tdep.c: Include "record-full.h" and
"linux-record.h".
#include "cli/cli-utils.h"
#include "stap-probe.h"
#include "parser-defs.h"
@@ -1231,6 +1234,98 @@ arm_stap_parse_special_token (struct gdb
return 1;
}
+/* ARM process record-replay constructs; syscall, signal etc. */
+
+struct linux_record_tdep arm_linux_record_tdep;
+
+/* arm_canonicalize_syscall maps from the native arm Linux set
+ of syscall ids into a canonical set of syscall ids used by
+ process record. */
+
+static enum gdb_syscall
+arm_canonicalize_syscall (int syscall)
+{
+ enum { sys_process_vm_writev = 377 };
+
+ if (syscall <= gdb_sys_sched_getaffinity)
+ {
+ return syscall;
+ }
Unnecessary braces.
+ else if (syscall >= 243 && syscall <= 247 )
+ {
+ return syscall + 2;
+ }
+ else if (syscall >= 248 && syscall <= 253 )
+ {
+ return syscall + 4;
+ }
+
+ return -1;
+}
+
+/* Handler for arm system call instruction and recording. */
+
+static int
+arm_linux_syscall_record (struct regcache *regcache, unsigned long
svc_number)
Your mailer should wrap your patch. That means other people can't apply
your patch cleanly.
Patch looks good to me but you still need a maintainer's approval.
--
Yao (éå)