Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Don't allow calling inferior functions in reverse execution mode
@ 2011-05-26 16:23 Pedro Alves
  2011-05-26 16:37 ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2011-05-26 16:23 UTC (permalink / raw)
  To: gdb-patches

Can't work...

Applied.

-- 
Pedro Alves

2011-05-26  Pedro Alves  <pedro@codesourcery.com>

	gdb/
	* infcall.c (call_function_by_hand): Don't allow calling functions
	in reverse execution mode.

---
 gdb/infcall.c |    3 +++
 1 file changed, 3 insertions(+)

Index: src/gdb/infcall.c
===================================================================
--- src.orig/gdb/infcall.c	2011-05-26 17:16:02.000000000 +0100
+++ src/gdb/infcall.c	2011-05-26 17:15:57.251253809 +0100
@@ -495,6 +495,9 @@ call_function_by_hand (struct value *fun
   if (get_traceframe_number () >= 0)
     error (_("May not call functions while looking at trace frames."));
 
+  if (execution_direction == EXEC_REVERSE)
+    error (_("May not call functions in reverse."));
+
   frame = get_current_frame ();
   gdbarch = get_frame_arch (frame);
 


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

* Re: Don't allow calling inferior functions in reverse execution mode
  2011-05-26 16:23 Don't allow calling inferior functions in reverse execution mode Pedro Alves
@ 2011-05-26 16:37 ` Joel Brobecker
  2011-05-26 17:21   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2011-05-26 16:37 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

> +  if (execution_direction == EXEC_REVERSE)
> +    error (_("May not call functions in reverse."));

I was wondering if "Functions may not be called in reverse mode"
might be clearer?  I can make the change later if people agree...

-- 
Joel


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

* Re: Don't allow calling inferior functions in reverse execution mode
  2011-05-26 16:37 ` Joel Brobecker
@ 2011-05-26 17:21   ` Eli Zaretskii
  2011-05-30 16:09     ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2011-05-26 17:21 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: pedro, gdb-patches

> Date: Thu, 26 May 2011 09:36:54 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
> 
> > +  if (execution_direction == EXEC_REVERSE)
> > +    error (_("May not call functions in reverse."));
> 
> I was wondering if "Functions may not be called in reverse mode"
> might be clearer?  I can make the change later if people agree...

How about

   Cannot call functions in reverse mode.

?


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

* Re: Don't allow calling inferior functions in reverse execution mode
  2011-05-26 17:21   ` Eli Zaretskii
@ 2011-05-30 16:09     ` Joel Brobecker
  0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2011-05-30 16:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: pedro, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 135 bytes --]

> How about
> 
>    Cannot call functions in reverse mode.

That's a good suggestion, so I applied it as attached...

Thanks!
-- 
Joel

[-- Attachment #2: infcall.diff --]
[-- Type: text/x-diff, Size: 1226 bytes --]

commit 01630be116f8e3e5eb5791d29fef5af99305a40c
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Mon May 30 08:59:07 2011 -0700

    Rephrase error message in infcall.c:call_function_by_hand
    
    No real change besides the error message.
    
    gdb/ChangeLog:
    
    	* infcall.c (call_function_by_hand): Rephrase error message.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 83203a2..7a60b8e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-30  Joel Brobecker  <brobecker@adacore.com>
+
+	* infcall.c (call_function_by_hand): Rephrase error message.
+
 2011-05-27  Pedro Alves  <pedro@codesourcery.com>
 
 	* defs.h (struct thread_info, struct inferior): Delete forward
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 4063b7f..6553e2a 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -496,7 +496,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
     error (_("May not call functions while looking at trace frames."));
 
   if (execution_direction == EXEC_REVERSE)
-    error (_("May not call functions in reverse."));
+    error (_("Cannot call functions in reverse mode."));
 
   frame = get_current_frame ();
   gdbarch = get_frame_arch (frame);

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

end of thread, other threads:[~2011-05-30 16:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-26 16:23 Don't allow calling inferior functions in reverse execution mode Pedro Alves
2011-05-26 16:37 ` Joel Brobecker
2011-05-26 17:21   ` Eli Zaretskii
2011-05-30 16:09     ` Joel Brobecker

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