lkml.org 
[lkml]   [2003]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[RFC] Two patches - ptrace single stepping + modpost.c
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.052 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site