This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] arm-syscall record support [phase-3]
- From: Tom Tromey <tromey at redhat dot com>
- To: oza Pawandeep <oza dot pawandeep at gmail dot com>
- Cc: "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 22 Jun 2012 09:55:28 -0600
- Subject: Re: [PATCH] arm-syscall record support [phase-3]
- References: <CAK1A=4yGtdn8kEjY0AgQWFVqzZywzAePZ9kRN4ti5opY0pHkvQ@mail.gmail.com>
>>>>> "Oza" == oza Pawandeep <oza.pawandeep@gmail.com> writes:
Oza> This patch provides arm-syscall record support. currently it supports
Oza> till gdb_sys_sched_getaffinity = 242.
This needs a ChangeLog entry.
Oza> +struct linux_record_tdep arm_linux_record_tdep;
Why not static?
It should probably have an introductory comment.
Oza> +static enum gdb_syscall
Oza> +arm_canonicalize_syscall (int syscall)
Likewise about the comment.
Oza> +static int
Oza> +arm_all_but_pc_registers_record (struct regcache *regcache)
Likewise.
Oza> +/* Record the system call.
Oza> + Record Change in followign registers.
Typo, "following".
Oza> +static int
Oza> +arm_linux_swi_syscall_record (struct regcache *regcache)
Comment.
Oza> + arm_linux_record_tdep.size__old_kernel_stat = 32;
Oza> + arm_linux_record_tdep.size_tms = 16;
Oza> + arm_linux_record_tdep.size_loff_t = 8;
Oza> + arm_linux_record_tdep.size_flock = 16;
Oza> + arm_linux_record_tdep.size_oldold_utsname = 45;
Oza> + arm_linux_record_tdep.size_ustat = 20;
[...]
Hard-coding a huge number of constants like this just seems terrible to me.
I don't know what else to do though.
Oza> diff -urN orig/arm-tdep.c new/arm-tdep.c
Oza> --- orig/arm-tdep.c 2012-05-19 02:32:48.000000000 +0530
Oza> +++ new/arm-tdep.c 2012-06-07 22:36:33.376647300 +0530
Is this an unrelated change?
Tom