This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Different output from -gdb-show than show


Pedro Alves wrote:
On Tuesday 31 August 2010 20:03:06, Michael Snyder wrote:
Pedro Alves wrote:
On Tuesday 31 August 2010 19:33:17, Michael Snyder wrote:

Would this be suitable?
You also need to reset exec_direction back from execution_direction in set_exec_direction_func. The set command callbacks are called _after_
their controlled variable has already been changed. See
infrun.c:set_non_stop, for example.


Hmmm, but "exec_direction" doesn't actually seem to be used anywhere.

I did try this patch, and after failing to set "reverse", it
still shows "Forward".

What am I missing?

That "-gdb-show exec-direction" reads from exec_direction. See Marc's original bug report upthread. :-)


I don't see how, since it's a static variable and I've looked at every local reference to it.

But anyway, here's a new patch:


2010-08-31  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>

	* infrun.c (set_exec_direction_func): Error out if target does not
	support reverse execution.

Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.445
diff -u -p -r1.445 infrun.c
--- infrun.c	1 Jul 2010 15:36:15 -0000	1.445
+++ infrun.c	31 Aug 2010 19:09:07 -0000
@@ -6436,6 +6436,11 @@ set_exec_direction_func (char *args, int
       else if (!strcmp (exec_direction, exec_reverse))
 	execution_direction = EXEC_REVERSE;
     }
+  else
+    {
+      exec_direction = exec_forward;
+      error (_("Target does not support this operation."));
+    }
 }
 
 static void

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]