[PATCH] arm-syscall record support [phase-3]

Tom Tromey tromey@redhat.com
Fri Jun 22 15:55:00 GMT 2012


>>>>> "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



More information about the Gdb-patches mailing list