This is the mail archive of the gdb-prs@sources.redhat.com 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: objc/1058: [PATCH] Step over Objective-C dispatch function


Synopsis: [PATCH] Step over Objective-C dispatch function

State-Changed-From-To: open->closed
State-Changed-By: cagney
State-Changed-When: Thu Mar 20 21:12:49 2003
State-Changed-Why:
    Adam,
    
    Seems you were waiting on me here :-(
    
    I've looked at what the underlying code is trying to do and, unfortunatly, the original objc-lang.c botched its portability(1), sigh!  The file is currently native only so infrun.c can't directly refer to objc-lang.c, and hence, will need to go via a dispatch table.  Going via a dispatch table wouldn't hurt anyway.
    
    Can you please do things as sketched out below.
    
    - append to "language.h":struct language_defn the method:
    
        /* If 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);
    
    - add to "language.h" the global method:
    
        CORE_ADDR skip_language_trampoline (CORE_ADDR pc);
    
    the implementation iterates through all registered languages looking for and calling any non-NULL struct language_defn.skip_trampoline() functions.  Returning the result from the first that returns non-zero, or 0 if all `fail'.
    
    - add to objc-lang.c, a language specific objc_skip_trampoline() that implements the above
    
    - just confirm that the objc_skip_trampoline() only does target side accesses (memory/register read/write) after it's confirmed that there is a valid objc symbol.  No valid objc symbol, no target access.
    
    - for infrun.c, before the existing SKIP_TRAMPOLINE() call, make a call to skip_language_trampoline() and then, only if that `fails', try the SKIP_TRAMPOLINE() method.
    
    The intent of all this is to make it possible to at leat enable objc on selective natives, and then over time make it more portable.
    
    Andrew
    
    (1) I noticed that the parameter extract methods assume host=target.
    

http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=1058


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