@@ -39,7 +39,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
struct dwarf_cursor; /* forward-declaration */
#include "dwarf-config.h"
+#ifndef UNW_REMOTE_ONLY
#include <link.h>
+#endif
#include <pthread.h>
/* DWARF expression opcodes. */
@@ -378,10 +380,12 @@ struct dwarf_callback_data
#define dwarf_step UNW_OBJ (dwarf_step)
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_find_proc_info (unw_addr_space_t as, unw_word_t ip,
unw_proc_info_t *pi,
int need_unwind_info, void *arg);
+#endif /* !UNW_REMOTE_ONLY */
extern int dwarf_find_debug_frame (int found, unw_dyn_info_t *di_debug,
struct dl_phdr_info *info, unw_word_t ip);
extern int dwarf_search_unwind_table (unw_addr_space_t as,
@@ -79,6 +79,7 @@ linear_search (unw_addr_space_t as, unw_word_t ip,
}
return -UNW_ENOINFO;
}
+#endif /* !UNW_REMOTE_ONLY */
#ifdef CONFIG_DEBUG_FRAME
/* 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 */
+#ifndef UNW_REMOTE_ONLY
+
/* ptr is a pointer to a dwarf_callback_data structure and, on entry,
member ip contains the instruction-pointer we're looking
for. */
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> --- include/dwarf.h | 4 ++++ src/dwarf/Gfind_proc_info-lsb.c | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-)