Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
  • * Re: [PATCH] solib-svr4.c: Fix set_solib_svr4_fetch_link_map_offsets
           [not found] <1010920205607.ZM17368@ocotillo.lan>
           [not found] ` <s3ielp1ecwc.fsf@soliton.wins.uva.nl>
    @ 2001-09-21 18:56 ` Andrew Cagney
      2001-09-21 20:31   ` Kevin Buettner
      2001-09-21 19:32 ` Andrew Cagney
      2 siblings, 1 reply; 6+ messages in thread
    From: Andrew Cagney @ 2001-09-21 18:56 UTC (permalink / raw)
      To: Kevin Buettner; +Cc: gdb-patches
    
    > As a heads up though, one of the problems is that solib-svr4.c
    > actually contains (ifdef'd) shared library support for both SVR4 and
    > SunOS.  I will be disentangling these mechanisms and will place SunOS
    > shared library support in its own file.  That way we'll be able to do
    > away with the SVR4_SHARED_LIBS macro and we won't accidentally attempt
    > to ever include <link.h> from solib-svr4.c any longer.
    
    To be honest, I've been very tempted to solve this problem using a very 
    brutal approach: take solib-svr4.c, copy it to solib-aout.c, strip 
    out/in SVR4-SHARED_LIBS code, and then tweek the config files to use either.
    
    I think this is one of those cases where the desire to re-use the code 
    was taken a little to far - better to get the interfaces right and have 
    a clear separation.  Who cares about a little duplication :-)
    
    enjoy,
    Andrew
    
    
    
    ^ permalink raw reply	[flat|nested] 6+ messages in thread
  • * Re: [PATCH] solib-svr4.c: Fix set_solib_svr4_fetch_link_map_offsets
           [not found] <1010920205607.ZM17368@ocotillo.lan>
           [not found] ` <s3ielp1ecwc.fsf@soliton.wins.uva.nl>
      2001-09-21 18:56 ` Andrew Cagney
    @ 2001-09-21 19:32 ` Andrew Cagney
      2001-09-21 20:14   ` Kevin Buettner
      2 siblings, 1 reply; 6+ messages in thread
    From: Andrew Cagney @ 2001-09-21 19:32 UTC (permalink / raw)
      To: Kevin Buettner; +Cc: gdb-patches
    
    > I recently attempted to use set_solib_svr4_fetch_link_map_offsets() to
    > establish a Linux/PPC specific link map fetcher, but discovered a
    > number of problems.  One of them is as follows...  I attempted to call
    > set_solib_svr4_fetch_link_map_offsets() from rs6000_gdbarch_init().
    > The <arch>_gdbarch_init() functions (as they are commonly named) are
    > used to allocate and initialize a gdbarch struct which is then installed
    > to define a new "architecture" after this function returns.
    
    First an fyi.  Elena found a cute bug in gdbarch's init sequence - it 
    leaves the old architecture installed while it is creating the new 
    architecture vis:
    
    	-	create new architecture
    	-	swap out old architecture
    	-	install new architecture
    	-	initialize remainder of new architecture
    
      This leads to all sorts of confusion such as what you encountered here.
    
    I'm working on a patch that will change the initialization behavour so 
    that it:
    
    	-	swaps out the old architecture
    	-	creates the new architecture
    	-	installs new architecture
    	-	initializes remainder of new architecture
    
    I recall NickD encountering a similar situation to yours.  The 
    gdbarch_data object's behavour was changed to better handle this situtation.
    
    Instead of having a global variable, have you looked at registering a 
    data pointer and then calling set_gdbarch_data(), from 
    set_solib_svr4_fetch_link_map_offsets(), to set it?
    
    The only potential problem I can see with this is with non- multi-arch 
    but there, looking at the code I think it is already handled.
    
    Andrew
    
    
    
    
    ^ permalink raw reply	[flat|nested] 6+ messages in thread

  • end of thread, other threads:[~2001-09-21 20:42 UTC | newest]
    
    Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <1010920205607.ZM17368@ocotillo.lan>
         [not found] ` <s3ielp1ecwc.fsf@soliton.wins.uva.nl>
    2001-09-20 15:16   ` [PATCH] solib-svr4.c: Fix set_solib_svr4_fetch_link_map_offsets Kevin Buettner
    2001-09-21 18:56 ` Andrew Cagney
    2001-09-21 20:31   ` Kevin Buettner
    2001-09-21 20:42     ` Andrew Cagney
    2001-09-21 19:32 ` Andrew Cagney
    2001-09-21 20:14   ` Kevin Buettner
    

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