libunwind-devel
[Top][All Lists]
Advanced

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

[libunwind] Cursor copying


From: Thomas Hallgren
Subject: [libunwind] Cursor copying
Date: Mon, 16 Aug 2004 12:29:07 +0100

The libunwind overview mentions how bidirectional iteration can be achieved using cursor copies. I'd like to know how to safely copy a cursor. A mere memcpy seems unsafe since the cursor contains a pointer to an unw_context_t. The copy needs a state of its own doesn't it?

A suggestion could be to include a copy function in the libunwind. Something like this:

 

  unw_copy_cursor(unw_cursor_t* from, unw_cursor_t* to, unw_context_t* toContext);

 

The reason for passing the 'to' and 'toContext' is of course to avoid the need for memory allocation.

Regards,

Thomas Hallgren

 


reply via email to

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