[PATCH][v850] Add new ptrace defines for v850 to get process address details

Miles Bader (miles@lsi.nec.co.jp)
Tue, 25 Mar 2003 11:56:57 +0900 (JST)


This adds some magic addresses for use with PT_USERPEEK that allow gdb
to find out where a process is located in memory, so it can correctly
relocate its symbols to match the running process. The actual
implementation in sys_ptrace is currently tangled up with some other
ptrace changes, so I'll leave that for later.

diff -ruN -X../cludes linux-2.5.66-moo.orig/include/asm-v850/ptrace.h linux-2.5.66-moo/include/asm-v850/ptrace.h
--- linux-2.5.66-moo.orig/include/asm-v850/ptrace.h 2002-11-05 11:25:32.000000000 +0900
+++ linux-2.5.66-moo/include/asm-v850/ptrace.h 2003-03-25 10:37:52.000000000 +0900
@@ -108,4 +110,11 @@
#define PT_SIZE ((NUM_GPRS + 6) * _PT_REG_SIZE)


+/* These are `magic' values for PTRACE_PEEKUSR that return info about where
+ a process is located in memory. */
+#define PT_TEXT_ADDR (PT_SIZE + 1)
+#define PT_TEXT_LEN (PT_SIZE + 2)
+#define PT_DATA_ADDR (PT_SIZE + 3)
+
+
#endif /* __V850_PTRACE_H__ */
-
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/