Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Powerpc and software single step
@ 2003-08-12 22:31 Jimi Xenidis
  2003-08-19 17:55 ` Kevin Buettner
  0 siblings, 1 reply; 35+ messages in thread
From: Jimi Xenidis @ 2003-08-12 22:31 UTC (permalink / raw)
  To: gdb-patches

The AIX kernel does not support single step but the Linux kernel does.

However, I am working with a remote machine level debugger for PowerPC
that allows me to debug a running Linux kernel and cannot support
single stepping.  For this I require that when debugging a Linux
target I need to turn on SOFTWARE_SINGLE_STEP.
 
I would like to add this to an "obscure" setting that will turn it on
even under Linux.
Here is the patch.. please accept, feel free to mangle the symbol
names to taste.

-JX

diff -Naur -X ./Xdiff src/gdb/config/powerpc/tm-linux.h mygdb/gdb/config/powerpc/tm-linux.h
--- src/gdb/config/powerpc/tm-linux.h	Thu Jun 12 19:58:07 2003
+++ mygdb/gdb/config/powerpc/tm-linux.h	Tue Aug 12 09:05:02 2003
@@ -33,9 +33,11 @@
 
 /* We can single step on linux */
 #undef  SOFTWARE_SINGLE_STEP
-#define SOFTWARE_SINGLE_STEP(p,q) internal_error (__FILE__, __LINE__, "Will never execute!")
+extern void ppc_linux_software_single_step (enum target_signal, int);
+#define SOFTWARE_SINGLE_STEP(sig,bp_p) ppc_linux_software_single_step (sig, bp_p)
 #undef  SOFTWARE_SINGLE_STEP_P
-#define SOFTWARE_SINGLE_STEP_P() 0
+extern int ppc_linux_single_step_mode;
+#define SOFTWARE_SINGLE_STEP_P() ppc_linux_single_step_mode
 
 /* Make sure nexti gets the help it needs for debugging assembly code
    without symbols */
diff -Naur -X ./Xdiff src/gdb/ppc-linux-tdep.c mygdb/gdb/ppc-linux-tdep.c
--- src/gdb/ppc-linux-tdep.c	Tue Jun 24 19:09:22 2003
+++ mygdb/gdb/ppc-linux-tdep.c	Tue Aug 12 09:22:11 2003
@@ -1075,10 +1075,35 @@
     }
 }
 
+int ppc_linux_single_step_mode = 0;
+void
+ppc_linux_software_single_step (enum target_signal sig , int bp_p)
+{
+  if (ppc_linux_single_step_mode)
+    {
+      rs6000_software_single_step (sig, bp_p);
+    }
+  else
+    {
+      internal_error (__FILE__, __LINE__, "Will never execute!");
+    }
+}
+
 void
 _initialize_ppc_linux_tdep (void)
 {
   gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_LINUX,
 			  ppc_linux_init_abi);
   add_core_fns (&ppc_linux_regset_core_fns);
+
+  add_show_from_set (add_set_cmd("single-step-mode", class_obscure,
+				 var_integer,
+				 &ppc_linux_single_step_mode, "\
+Set single step mode for PowerPCtarget:\n\
+  0 = Target supports single stepping (i.e. Linux)\n\
+  1 = Target does not support single stepping (i.e. AIX, Simulators).",
+				 &setlist),
+		     &showlist);
 }
+
+


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

end of thread, other threads:[~2003-10-10  2:40 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-12 22:31 Powerpc and software single step Jimi Xenidis
2003-08-19 17:55 ` Kevin Buettner
2003-08-19 19:05   ` Jimi Xenidis
2003-08-19 19:13   ` Daniel Jacobowitz
2003-08-19 22:32     ` Jimi Xenidis
2003-08-20  2:30       ` Daniel Jacobowitz
2003-08-20  2:57         ` Jimi Xenidis
2003-08-20  3:09           ` Daniel Jacobowitz
2003-08-20  3:21             ` Jimi Xenidis
2003-08-20 13:07               ` Daniel Jacobowitz
2003-08-20 13:54                 ` Jimi Xenidis
2003-08-20 15:51             ` Andrew Cagney
2003-08-20 16:02               ` Jimi Xenidis
2003-08-21  3:48                 ` Andrew Cagney
2003-08-22 13:17                   ` Jimi Xenidis
2003-08-22 15:54                     ` Andrew Cagney
2003-08-22 17:32                       ` Jimi Xenidis
2003-08-22 18:20                         ` Andrew Cagney
2003-09-08 18:58                           ` Patch to eliminate SOFTWARE_SINGLE_STEP from ppc Was: " Jimi Xenidis
2003-09-08 19:00                             ` Daniel Jacobowitz
2003-09-08 20:17                               ` Jimi Xenidis
2003-09-08 20:20                                 ` Daniel Jacobowitz
2003-09-08 21:22                                   ` Jimi Xenidis
2003-09-08 22:01                                     ` Kevin Buettner
2003-09-09 10:30                                       ` Jimi Xenidis
2003-09-09 15:30                                       ` AHAH! " Jimi Xenidis
2003-09-09 16:15                                         ` Kevin Buettner
2003-09-09 17:01                                           ` Jimi Xenidis
2003-09-09 17:55                                             ` Kevin Buettner
2003-09-09 22:01                                               ` PATCH: Re: AHAH! Re: Patch to eliminate SOFTWARE_SINGLE_STEP Jimi Xenidis
2003-09-10  1:24                                                 ` Kevin Buettner
2003-10-10  2:40                                                   ` Andrew Cagney
2003-08-20  2:30     ` Powerpc and software single step Andrew Cagney
2003-08-20  2:33       ` Daniel Jacobowitz
2003-08-21 14:01         ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox