From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21848 invoked by alias); 31 Jan 2003 02:52:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21841 invoked from network); 31 Jan 2003 02:52:37 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 31 Jan 2003 02:52:37 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h0V2qbf13989 for ; Thu, 30 Jan 2003 21:52:37 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h0V2qan26101; Thu, 30 Jan 2003 21:52:36 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h0V2qZw29956; Thu, 30 Jan 2003 18:52:35 -0800 Message-ID: <3E39E4F3.E7865684@redhat.com> Date: Fri, 31 Jan 2003 02:52:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Adam Fedor CC: GDB Patches Subject: Re: [PATCH] Step over Objective-C dispatch function References: <3E1504FF.2070506@doc.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00825.txt.bz2 Adam Fedor wrote: > > 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. Adam, can you explain / comment what you're doing a little more? I *think* what you're doing is trying to follow thru the dispatcher to the actual method -- but the only reason I can even guess that is because I've worked on debugging objective-c. > > ------------------------------------------------------------------------------- > 2003-01-02 Adam Fedor > > * 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