[RFC] GDB ARIndex Linux rule cleanup
Mark Kettenis
mark.kettenis@xs4all.nl
Tue Apr 14 23:38:00 GMT 2009
> From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> Date: Wed, 15 Apr 2009 01:06:30 +0200
>
> Following the discussion about GNU/Linux regressions in
> ARI pages, I send this for comment.
>
> Joel told us that all those occurrences should be considered
> kernel specific.
> I have no opinion directly on the matter, and I only
> send this for the ARI to give better results.
I think some of these changes are really silly or plain wrong
("Linux-only kernel registers") and we should simply drop the rule
from the ARI.
> 2009-04-15 Pierre Muller <muller.u-strasbg.fr>
>
> ARI fix: GNU/Linux rule in comments.
> * amd64-tdep.c (amd64_displaced_step_fixup): Specify Linux kernel.
> * i386-tdep.c (i386_displaced_step_fixup): Idem.
> * i386-tdep.h (I386_MAX_INSN_LEN): Idem.
> * ppc-linux-tdep.c (ppc_linux_supply_gregset): Idem.
> (_initialize_ppc_linux_tdep): Idem.
> * ppc-linux-tdep.h: Idem.
> * linux-nat.c: Idem in starting comments.
> (linux_nat_filter_event): Idem.
>
> Index: amd64-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/amd64-tdep.c,v
> retrieving revision 1.58
> diff -u -p -r1.58 amd64-tdep.c
> --- amd64-tdep.c 17 Feb 2009 06:14:16 -0000 1.58
> +++ amd64-tdep.c 14 Apr 2009 22:55:47 -0000
> @@ -1273,7 +1273,7 @@ amd64_displaced_step_fixup (struct gdbar
> }
>
> /* The list of issues to contend with here is taken from
> - resume_execution in arch/x86/kernel/kprobes.c, Linux 2.6.28.
> + resume_execution in arch/x86/kernel/kprobes.c, Linux kernel 2.6.28.
> Yay for Free Software! */
>
> /* Relocate the %rip back to the program's instruction stream,
> Index: i386-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/i386-tdep.c,v
> retrieving revision 1.269
> diff -u -p -r1.269 i386-tdep.c
> --- i386-tdep.c 17 Feb 2009 06:14:16 -0000 1.269
> +++ i386-tdep.c 14 Apr 2009 22:55:48 -0000
> @@ -430,7 +430,7 @@ i386_displaced_step_fixup (struct gdbarc
> paddr_nz (from), paddr_nz (to), insn[0], insn[1]);
>
> /* The list of issues to contend with here is taken from
> - resume_execution in arch/i386/kernel/kprobes.c, Linux 2.6.20.
> + resume_execution in arch/i386/kernel/kprobes.c, Linux kernel 2.6.20.
> Yay for Free Software! */
>
> /* Relocate the %eip, if necessary. */
> Index: i386-tdep.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/i386-tdep.h,v
> retrieving revision 1.57
> diff -u -p -r1.57 i386-tdep.h
> --- i386-tdep.h 4 Feb 2009 14:49:41 -0000 1.57
> +++ i386-tdep.h 14 Apr 2009 22:55:48 -0000
> @@ -165,7 +165,7 @@ extern struct type *i386_sse_type (struc
> #define I386_SEL_KPL 0x0000 /* Kernel Privilige Level. */
>
> /* The length of the longest i386 instruction (according to
> - include/asm-i386/kprobes.h in Linux 2.6. */
> + include/asm-i386/kprobes.h in Linux kernel 2.6. */
> #define I386_MAX_INSN_LEN (16)
>
> /* Functions exported from i386-tdep.c. */
> Index: ppc-linux-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
> retrieving revision 1.110
> diff -u -p -r1.110 ppc-linux-tdep.c
> --- ppc-linux-tdep.c 22 Feb 2009 01:02:19 -0000 1.110
> +++ ppc-linux-tdep.c 14 Apr 2009 22:55:48 -0000
> @@ -659,7 +659,7 @@ ppc64_linux_convert_from_func_ptr_addr (
> return addr;
> }
>
> -/* Wrappers to handle Linux-only registers. */
> +/* Wrappers to handle Linux-only kernel registers. */
>
> static void
> ppc_linux_supply_gregset (const struct regset *regset,
> @@ -1175,7 +1175,7 @@ _initialize_ppc_linux_tdep (void)
> gdbarch_register_osabi (bfd_arch_rs6000, bfd_mach_rs6k, GDB_OSABI_LINUX,
> ppc_linux_init_abi);
>
> - /* Initialize the Linux target descriptions. */
> + /* Initialize the Linux kernel target descriptions. */
> initialize_tdesc_powerpc_32l ();
> initialize_tdesc_powerpc_altivec32l ();
> initialize_tdesc_powerpc_vsx32l ();
> Index: ppc-linux-tdep.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/ppc-linux-tdep.h,v
> retrieving revision 1.4
> diff -u -p -r1.4 ppc-linux-tdep.h
> --- ppc-linux-tdep.h 3 Jan 2009 05:57:53 -0000 1.4
> +++ ppc-linux-tdep.h 14 Apr 2009 22:55:48 -0000
> @@ -38,7 +38,7 @@ enum {
> /* Return 1 if PPC_ORIG_R3_REGNUM and PPC_TRAP_REGNUM are usable. */
> int ppc_linux_trap_reg_p (struct gdbarch *gdbarch);
>
> -/* Linux target descriptions. */
> +/* Linux kernel target descriptions. */
> extern struct target_desc *tdesc_powerpc_32l;
> extern struct target_desc *tdesc_powerpc_altivec32l;
> extern struct target_desc *tdesc_powerpc_vsx32l;
> Index: linux-nat.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/linux-nat.c,v
> retrieving revision 1.128
> diff -u -p -r1.128 linux-nat.c
> --- linux-nat.c 1 Apr 2009 19:07:50 -0000 1.128
> +++ linux-nat.c 14 Apr 2009 22:55:50 -0000
> @@ -70,7 +70,7 @@ When waiting for an event in a specific
> the specific pid, and not passing WNOHANG.
>
> When waiting for an event in all threads, waitpid is not quite good. Prior
> to
> -version 2.4, Linux can either wait for event in main thread, or in
> secondary
> +version 2.4, Linux kernel can either wait for event in main thread, or in
> secondary
> threads. (2.4 has the __WALL flag). So, if we use blocking waitpid, we
> might
> miss an event. The solution is to use non-blocking waitpid, together with
> sigsuspend. First, we use non-blocking waitpid to get an event in the main
>
> @@ -2625,7 +2625,7 @@ linux_nat_filter_event (int lwpid, int s
> {
> /* If this is the main thread, we must stop all threads and verify
> if they are still alive. This is because in the nptl thread model
> - on Linux 2.4, there is no signal issued for exiting LWPs
> + on Linux kernel 2.4, there is no signal issued for exiting LWPs
> other than the main thread. We only get the main thread exit
> signal once all child threads have already exited. If we
> stop all the threads and use the stop_wait_callback to check
>
More information about the Gdb
mailing list