From: Pedro Alves <palves@redhat.com>
To: Omair Javaid <omair.javaid@linaro.org>
Cc: oza Pawandeep <oza.pawandeep@gmail.com>,
Yao Qi <yao@codesourcery.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Patch Tracking <patches@linaro.org>
Subject: Re: [PATCH 2/2] GDB process record and reverse debugging improvements for arm*-linux*
Date: Fri, 20 Dec 2013 12:37:00 -0000 [thread overview]
Message-ID: <52B43A15.2070302@redhat.com> (raw)
In-Reply-To: <52929027.7020303@linaro.org>
On 11/24/2013 11:47 PM, Omair Javaid wrote:
> After incorporating all suggestions I am posting a final patch. Looking
> for a go ahead for commit.
>
> This patch adds support for process record/replay system call recording
> for arm targets.
>
> 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-linux-tdep.c: Include "record-full.h" and
> "linux-record.h".
These two entries are in the same file, so merge them, like:
* arm-linux-tdep.c: Include "record-full.h" and
"linux-record.h".
(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 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)
^^
Spurious space.
> + return syscall;
> + 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. */
Spurious "and" ? Otherwise I can't parse it.
> +
> +static int
> +arm_linux_syscall_record (struct regcache *regcache, unsigned long svc_number)
> +{
...
> +
> + ret = record_linux_system_call (syscall_gdb, regcache,
> + &arm_linux_record_tdep);
> + if (ret)
if (ret != 0)
> + return ret;
> +
> + arm_linux_record_tdep.ioctl_TIOCGSERIAL = 0x541E;
> + arm_linux_record_tdep.ioctl_TIOCSSERIAL = 0x541F;
...
> + arm_linux_record_tdep.ioctl_TCGETS2 = 0x802c542a;
> + arm_linux_record_tdep.ioctl_TCSETS2 = 0x402c542b;
I see a mixup of uppercase and lowercase in these hex constants.
Could you make them all lowercase please?
> + else
> + {
> + arm_record_unsupported_insn(arm_insn_r);
Space before parens.
> + ret = -1;
> + }
Otherwise looks good.
--
Pedro Alves
prev parent reply other threads:[~2013-12-20 12:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 0:09 Omair Javaid
2013-10-24 2:32 ` Yao Qi
2013-11-08 5:32 ` Omair Javaid
2013-11-11 10:01 ` Yao Qi
2013-11-11 10:08 ` oza Pawandeep
[not found] ` <CANW4E-08KZaKZHXqKyw+T8KdrFAU8Z2UeAiQMej2LqdCVYu8oA@mail.gmail.com>
2013-11-24 23:48 ` Omair Javaid
2013-12-17 10:23 ` Omair Javaid
2013-12-20 12:37 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52B43A15.2070302@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=omair.javaid@linaro.org \
--cc=oza.pawandeep@gmail.com \
--cc=patches@linaro.org \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox