1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-09-27 17:09:29 +02:00

UNW_REMOTE_ONLY fixes

Exclude <link.h> because it is only required for local unwinding when
iterating over the program headers.

Have the following DWARF related functions available in case of
UNW_REMOTE_ONLY because they are used by libunwind-ptrace:
  dwarf_find_debug_frame
  locate_debug_info
  find_binary_for_address
  load_debug_frame
  debug_frame_tab_new
  debug_frame_tab_append
  debug_frame_tab_shrink
  debug_frame_tab_compare

Signed-off-by: Ken Werner <ken.werner@linaro.org>
This commit is contained in:
Ken Werner 2011-10-20 15:28:25 +00:00 committed by Arun Sharma
parent 2c865b6ed3
commit 0fed502a81
2 changed files with 7 additions and 0 deletions

View file

@ -39,7 +39,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
struct dwarf_cursor; /* forward-declaration */ struct dwarf_cursor; /* forward-declaration */
#include "dwarf-config.h" #include "dwarf-config.h"
#ifndef UNW_REMOTE_ONLY
#include <link.h> #include <link.h>
#endif
#include <pthread.h> #include <pthread.h>
/* DWARF expression opcodes. */ /* DWARF expression opcodes. */
@ -378,10 +380,12 @@ struct dwarf_callback_data
#define dwarf_step UNW_OBJ (dwarf_step) #define dwarf_step UNW_OBJ (dwarf_step)
extern int dwarf_init (void); extern int dwarf_init (void);
#ifndef UNW_REMOTE_ONLY
extern int dwarf_callback (struct dl_phdr_info *info, size_t size, void *ptr); extern int dwarf_callback (struct dl_phdr_info *info, size_t size, void *ptr);
extern int dwarf_find_proc_info (unw_addr_space_t as, unw_word_t ip, extern int dwarf_find_proc_info (unw_addr_space_t as, unw_word_t ip,
unw_proc_info_t *pi, unw_proc_info_t *pi,
int need_unwind_info, void *arg); int need_unwind_info, void *arg);
#endif /* !UNW_REMOTE_ONLY */
extern int dwarf_find_debug_frame (int found, unw_dyn_info_t *di_debug, extern int dwarf_find_debug_frame (int found, unw_dyn_info_t *di_debug,
struct dl_phdr_info *info, unw_word_t ip); struct dl_phdr_info *info, unw_word_t ip);
extern int dwarf_search_unwind_table (unw_addr_space_t as, extern int dwarf_search_unwind_table (unw_addr_space_t as,

View file

@ -79,6 +79,7 @@ linear_search (unw_addr_space_t as, unw_word_t ip,
} }
return -UNW_ENOINFO; return -UNW_ENOINFO;
} }
#endif /* !UNW_REMOTE_ONLY */
#ifdef CONFIG_DEBUG_FRAME #ifdef CONFIG_DEBUG_FRAME
/* Load .debug_frame section from FILE. Allocates and returns space /* Load .debug_frame section from FILE. Allocates and returns space
@ -555,6 +556,8 @@ dwarf_find_debug_frame (int found, unw_dyn_info_t *di_debug,
#endif /* CONFIG_DEBUG_FRAME */ #endif /* CONFIG_DEBUG_FRAME */
#ifndef UNW_REMOTE_ONLY
/* ptr is a pointer to a dwarf_callback_data structure and, on entry, /* ptr is a pointer to a dwarf_callback_data structure and, on entry,
member ip contains the instruction-pointer we're looking member ip contains the instruction-pointer we're looking
for. */ for. */