mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: [RFC] Two patches - ptrace single stepping + modpost.c
Date: Wed, 28 May 2003 12:58:53 +0100	[thread overview]
Message-ID: <20030528125853.A30380@flint.arm.linux.org.uk> (raw)

Ok, here's two patches I'd like to get sorted out and merged into
2.5 or whatever.

The first: add a flag to tsk->ptrace to indicate whether we're
single stepping or not.  This is used by the ARM ptrace code in
arch/arm/kernel/signal.c to decide whether we need to halt the
process for the debugger during signal processing, or remove
and set single stepping breakpoints.

Other architectures which use similar schemes (eg, alpha) might also
like this; it looks like Alpha may be a little buggy; it appears
to carry the single stepping status across signal handling.  What
happens if the debugger decides to disable single stepping when
the debugged process receives a signal?

--- orig/include/linux/ptrace.h	Tue May 27 10:05:43 2003
+++ linux/include/linux/ptrace.h	Tue May 27 10:14:30 2003
@@ -65,6 +65,7 @@
 #define PT_TRACE_EXIT	0x00000200
 
 #define PT_TRACE_MASK	0x000003f4
+#define PT_SINGLESTEP	0x80000000	/* single stepping (used on ARM) */
 
 #include <linux/compiler.h>		/* For unlikely.  */
 #include <linux/sched.h>		/* For struct task_struct.  */


The second: this allows modpost.c to build on ARM.  For some unknown
reason, EM_SPARC* are not present in my system headers.  This isn't
the right solution since it would interfere with cross-building SPARC.
Are EM_SPARC* normally defined as preprocessor macros or enums?

--- orig/scripts/modpost.c	Mon May  5 17:40:29 2003
+++ linux/scripts/modpost.c	Thu May  8 16:40:46 2003
@@ -296,13 +296,14 @@
 		/* ignore global offset table */
 		if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0)
 			break;
+#if defined(__sparc__) || defined(__sparc_v9__)
 		if (info->hdr->e_machine == EM_SPARC ||
 		    info->hdr->e_machine == EM_SPARCV9) {
 			/* Ignore register directives. */
 			if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
 				break;
 		}
-		
+#endif
 		if (memcmp(symname, MODULE_SYMBOL_PREFIX,
 			   strlen(MODULE_SYMBOL_PREFIX)) == 0) {
 			s = alloc_symbol(symname + 

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


             reply	other threads:[~2003-05-28 11:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-28 11:58 Russell King [this message]
2003-05-28 15:44 ` Ivan Kokshaysky

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=20030528125853.A30380@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®