From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5836 invoked by alias); 14 Apr 2009 23:06:58 -0000 Received: (qmail 5820 invoked by uid 22791); 14 Apr 2009 23:06:56 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Apr 2009 23:06:50 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id n3EN6NDh053880 ; Wed, 15 Apr 2009 01:06:23 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402:d::11]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n3EN6NnC049100 ; Wed, 15 Apr 2009 01:06:23 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n3EN6Lmx096796 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Wed, 15 Apr 2009 01:06:22 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: "'Joel Brobecker'" Cc: , , "'Eli Zaretskii'" References: <000001c9ae14$24fb7cd0$6ef27670$@u-strasbg.fr> <20090326230959.GN9472@adacore.com> In-Reply-To: <20090326230959.GN9472@adacore.com> Subject: [RFC] GDB ARIndex Linux rule cleanup Date: Tue, 14 Apr 2009 23:06:00 -0000 Message-ID: <007301c9bd55$a66e8320$f34b8960$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00286.txt.bz2 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. Comments welcome, Pierre Muller Pascal language support maintainer for GDB 2009-04-15 Pierre Muller 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