From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17916 invoked by alias); 25 Mar 2003 16:25:26 -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 17906 invoked from network); 25 Mar 2003 16:25:25 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 25 Mar 2003 16:25:25 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 8FCD32B11; Tue, 25 Mar 2003 11:25:18 -0500 (EST) Message-ID: <3E8082EE.2010207@redhat.com> Date: Tue, 25 Mar 2003 16:25:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, 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> <3E39E4F3.E7865684@redhat.com> <3E39E86E.9060700@redhat.com> <3E39F35A.9050208@doc.com> <3E7A2DCA.6050205@redhat.com> <3E807C37.1040804@doc.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00494.txt.bz2 Minor tweaks: > Index: infrun.c > =================================================================== > RCS file: /cvs/src/src/gdb/infrun.c,v > retrieving revision 1.99 > diff -u -p -r1.99 infrun.c > --- infrun.c 20 Mar 2003 22:52:53 -0000 1.99 > +++ infrun.c 25 Mar 2003 04:12:09 -0000 > @@ -43,6 +43,7 @@ > #include "regcache.h" > #include "value.h" > #include "observer.h" > +#include "language.h" > > /* Prototypes for local functions */ > > @@ -2386,7 +2387,9 @@ process_event_stop_test: > function. That's what tells us (a) whether we want to step > into it at all, and (b) what prologue we want to run to > the end of, if we do step into it. */ > - real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc); > + real_stop_pc = skip_language_trampoline(stop_pc); GNU puts a space between the function and its arguments vis: skip_language_trampoline (stop_pc) check the other code for this. > + if (real_stop_pc == 0) > + real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc); > if (real_stop_pc != 0) > ecs->stop_func_start = real_stop_pc; > > +/* Iterate through all registered languages looking for and calling > + any non-NULL struct language_defn.skip_trampoline() functions. > + Return the result from the first that returns non-zero, or 0 if all > + `fail'. */ > +CORE_ADDR > +skip_language_trampoline (CORE_ADDR pc) > +{ > + int i; > + CORE_ADDR real_pc = 0; > + > + for (i = 0; i < languages_size; i++) > + { > + if (languages[i]->skip_trampoline) > + { > + real_pc = (languages[i]->skip_trampoline)(pc); > + if (real_pc) > + break; > + } > + } > + > + return real_pc; Return 0. Otherwize, the old SKIP_TRAMPOLINE_CODE() won't kick in. > + /* PC is possibly an unknown languages trampoline. > + If that PC falls in a trampoline belonging to this language, > + return the address of the first pc in the real function, or 0 > + if it isn't a language tramp for this language. */ > + CORE_ADDR (*skip_trampoline) (CORE_ADDR pc); > + yep. Otherwize approved. Andrew