Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Step over Objective-C dispatch function
@ 2003-01-03  3:35 Adam Fedor
  2003-01-31  2:52 ` Michael Snyder
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Fedor @ 2003-01-03  3:35 UTC (permalink / raw)
  To: GDB Patches

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

All Objective-C messages are called through the standard dispatch 
function. This patch steps right into the method without the user having 
to go through the dispatch function manually.


[-- Attachment #2: objc20.patch --]
[-- Type: text/plain, Size: 2301 bytes --]

2003-01-02  Adam Fedor  <fedor@gnu.org>

	* infrun.c (handle_inferior_event): Add test to step over
	Objective-C dispatch function.
	* Makefile.in (infrun.o): Add $(objc_lang_h)

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.302
diff -u -p -r1.302 Makefile.in
--- Makefile.in 2 Jan 2003 20:29:15 -0000       1.302
+++ Makefile.in 3 Jan 2003 03:24:54 -0000
@@ -1795,7 +1796,8 @@ infptrace.o: infptrace.c $(defs_h) $(fra
 infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \
        $(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \
        $(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \
-       $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h)
+       $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h) \
+       $(objc_lang_h)
 inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
        $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h)
 infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.92
diff -u -p -r1.92 infrun.c
--- infrun.c	18 Dec 2002 18:03:42 -0000	1.92
+++ infrun.c	3 Jan 2003 03:20:06 -0000
@@ -42,6 +42,7 @@
 #include "inf-loop.h"
 #include "regcache.h"
 #include "value.h"
+#include "objc-lang.h"
 
 /* Prototypes for local functions */
 
@@ -1173,6 +1174,7 @@ void
 handle_inferior_event (struct execution_control_state *ecs)
 {
   CORE_ADDR tmp;
+  CORE_ADDR new_stop;
   int stepped_after_stopped_by_watchpoint;
   int sw_single_step_trap_p = 0;
 
@@ -2428,6 +2430,22 @@ process_event_stop_test:
 	      keep_going (ecs);
 	      return;
 	    }
+	}
+
+      /* Step over Objective-C dispatch function.  */
+      if (tmp)
+	find_objc_msgcall (tmp, &new_stop);
+      else
+	find_objc_msgcall (stop_pc, &new_stop);
+      
+      if (new_stop)           /* step into a method call */
+	ecs->stop_func_start = new_stop;
+      
+      if (new_stop)
+	{
+	  tmp = SKIP_TRAMPOLINE_CODE (new_stop);
+	  if (tmp != 0)
+	    ecs->stop_func_start = tmp;
 	}
 
       /* If we have line number information for the function we

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

end of thread, other threads:[~2003-03-25 16:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-03  3:35 [PATCH] Step over Objective-C dispatch function Adam Fedor
2003-01-31  2:52 ` Michael Snyder
2003-01-31  3:07   ` Andrew Cagney
2003-01-31  3:54     ` Adam Fedor
2003-03-20 21:08       ` Andrew Cagney
2003-03-25 15:56         ` Adam Fedor
2003-03-25 16:25           ` Andrew Cagney
2003-03-25 16:41             ` Andrew Cagney

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