mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] Two patches - ptrace single stepping + modpost.c
@ 2003-05-28 11:58 Russell King
  2003-05-28 15:44 ` Ivan Kokshaysky
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2003-05-28 11:58 UTC (permalink / raw)
  To: Linux Kernel List

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-28 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-28 11:58 [RFC] Two patches - ptrace single stepping + modpost.c Russell King
2003-05-28 15:44 ` Ivan Kokshaysky

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®