libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libunwind] suggest adding unw_init_local_accessors


From: Mark Young
Subject: Re: [libunwind] suggest adding unw_init_local_accessors
Date: Thu, 05 Dec 2002 18:38:20 -0800
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0

Yes, I can accomplish what I want by copying the accessors struct belonging to unw_local_address_space ...
    unw_accessors_t ac;
    unw_addr_space_t as;
    ac = *unw_get_accessors(unw_local_addr_space);
    ac.access_mem = my_access_mem;
    as = unw_create_addr_space(&ac);
    rc = unw_init_remote(&cursor), as, uc)

I'm concerned by the removal of the acquire_unwind_info accessor function. The new dynamic unwind info registration scheme requires all active procedures to be registered before unwinding begins. The list of registered dynamic procedures duplicates a similar list necessarily maintained by our application. I understand and appreciate how the underlying descriptor structure can be shared by all procedures with identical prologue/epilog code sequences, but the number of dynamic procedures can be very large (for example, when simulating a large chip design). I think it would be worthwhile to allow the application to manage the detailed list of dynamic procedures if it so chooses. In our case, the dynamic procedures are generated consecutively into large allocated blocks -- which suggests a compromise -- define some way to register a dynamic code section with a callback function to be used during an unwind step to obtain the procedure entry address and unwind info for any ip address that falls in the section.
--Mark

David Mosberger wrote:
On Tue, 12 Nov 2002 15:42:41 -0800, Mark Young <address@hidden> said:
            

  Mark> In using libunwind with dynamically generated code, it would
  Mark> be useful to call the register/memory/unwind-info access
  Mark> functions used by unw_init_local to handle frames created by
  Mark> non-dynamic code. Rather than simply making the local access
  Mark> functions externally visible, I suggest adding a new routine
  Mark> "unw_init_local_accessors" to initialize an unw_accessors_t
  Mark> structure in the same manner as unw_init_local. This would
  Mark> allow personalized access functions to be selectively
  Mark> substituted for local access functions, as in this example:

This should now be possible via the unw_get_accessors() routine.
Mark, could you let me know if this meets your needs?

Thanks,

	--david
  

-- 
Mark Young            address@hidden     Tel: 503.526.1661
Staff Engineer         www.model.com      Fax: 503.526.5473
Model Technology, Inc.
10450 SW Nimbus Avenue/Bldg RB, Portland, OR 97223-4347 USA


reply via email to

[Prev in Thread] Current Thread [Next in Thread]