• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1commit 0e3f431fc6b494f8d9361d48e35d2b99dddd2dcf
2Author: cs1111 <chenshi51@huawei.com>
3Date:   Sat May 17 18:01:38 2025 +0800
4
5    fix:ohos-configure
6
7    Signed-off-by: cs1111 <chenshi51@huawei.com>
8
9diff --git a/include/config.h b/include/config.h
10new file mode 100644
11index 00000000..98fcd1e9
12--- /dev/null
13+++ b/include/config.h
14@@ -0,0 +1,235 @@
15+/* include/config.h.  Generated from config.h.in by configure.  */
16+/* include/config.h.in.  Generated from configure.ac by autoheader.  */
17+
18+/* Block signals before mutex operations */
19+/* #undef CONFIG_BLOCK_SIGNALS */
20+
21+/* Enable Debug Frame */
22+/* #undef CONFIG_DEBUG_FRAME */
23+
24+/* Support for Microsoft ABI extensions */
25+/* #undef CONFIG_MSABI_SUPPORT */
26+
27+/* Define to 1 if you want every memory access validated */
28+#define CONSERVATIVE_CHECKS 1
29+
30+/* Define to 1 if you have the <asm/ptrace_offsets.h> header file. */
31+/* #undef HAVE_ASM_PTRACE_OFFSETS_H */
32+
33+/* Define to 1 if you have the <byteswap.h> header file. */
34+#define HAVE_BYTESWAP_H 1
35+
36+/* Define to 1 if you have the declaration of `PTRACE_CONT', and to 0 if you
37+   don't. */
38+#define HAVE_DECL_PTRACE_CONT 1
39+
40+/* Define to 1 if you have the declaration of `PTRACE_POKEDATA', and to 0 if
41+   you don't. */
42+#define HAVE_DECL_PTRACE_POKEDATA 1
43+
44+/* Define to 1 if you have the declaration of `PTRACE_POKEUSER', and to 0 if
45+   you don't. */
46+#define HAVE_DECL_PTRACE_POKEUSER 1
47+
48+/* Define to 1 if you have the declaration of `PTRACE_SETREGSET', and to 0 if
49+   you don't. */
50+#define HAVE_DECL_PTRACE_SETREGSET 1
51+
52+/* Define to 1 if you have the declaration of `PTRACE_SINGLESTEP', and to 0 if
53+   you don't. */
54+#define HAVE_DECL_PTRACE_SINGLESTEP 1
55+
56+/* Define to 1 if you have the declaration of `PTRACE_SYSCALL', and to 0 if
57+   you don't. */
58+#define HAVE_DECL_PTRACE_SYSCALL 1
59+
60+/* Define to 1 if you have the declaration of `PTRACE_TRACEME', and to 0 if
61+   you don't. */
62+#define HAVE_DECL_PTRACE_TRACEME 1
63+
64+/* Define to 1 if you have the declaration of `PT_CONTINUE', and to 0 if you
65+   don't. */
66+#define HAVE_DECL_PT_CONTINUE 0
67+
68+/* Define to 1 if you have the declaration of `PT_GETFPREGS', and to 0 if you
69+   don't. */
70+#define HAVE_DECL_PT_GETFPREGS 1
71+
72+/* Define to 1 if you have the declaration of `PT_GETREGS', and to 0 if you
73+   don't. */
74+#define HAVE_DECL_PT_GETREGS 0
75+
76+/* Define to 1 if you have the declaration of `PT_IO', and to 0 if you don't.
77+   */
78+#define HAVE_DECL_PT_IO 0
79+
80+/* Define to 1 if you have the declaration of `PT_STEP', and to 0 if you
81+   don't. */
82+#define HAVE_DECL_PT_STEP 1
83+
84+/* Define to 1 if you have the declaration of `PT_SYSCALL', and to 0 if you
85+   don't. */
86+#define HAVE_DECL_PT_SYSCALL 1
87+
88+/* Define to 1 if you have the declaration of `PT_TRACE_ME', and to 0 if you
89+   don't. */
90+#define HAVE_DECL_PT_TRACE_ME 1
91+
92+/* Define to 1 if you have the <dlfcn.h> header file. */
93+#define HAVE_DLFCN_H 1
94+
95+/* Define to 1 if you have the `dlmodinfo' function. */
96+/* #undef HAVE_DLMODINFO */
97+
98+/* Define to 1 if you have the `dl_iterate_phdr' function. */
99+#define HAVE_DL_ITERATE_PHDR 1
100+
101+/* Define to 1 if you have the `dl_phdr_removals_counter' function. */
102+/* #undef HAVE_DL_PHDR_REMOVALS_COUNTER */
103+
104+/* Define to 1 if you have the <elf.h> header file. */
105+#define HAVE_ELF_H 1
106+
107+/* Define to 1 if you have the <endian.h> header file. */
108+#define HAVE_ENDIAN_H 1
109+
110+/* Define to 1 if you have the <execinfo.h> header file. */
111+/* #undef HAVE_EXECINFO_H */
112+
113+/* Define to 1 if you have the `getunwind' function. */
114+/* #undef HAVE_GETUNWIND */
115+
116+/* Define to 1 if you have the <ia64intrin.h> header file. */
117+/* #undef HAVE_IA64INTRIN_H */
118+
119+/* Define to 1 if you have the <inttypes.h> header file. */
120+#define HAVE_INTTYPES_H 1
121+
122+/* Define to 1 if you have the `uca' library (-luca). */
123+/* #undef HAVE_LIBUCA */
124+
125+/* Define to 1 if you have the <link.h> header file. */
126+#define HAVE_LINK_H 1
127+
128+/* Define if you have liblzma */
129+/* #undef HAVE_LZMA */
130+
131+/* Define to 1 if you have the <memory.h> header file. */
132+#define HAVE_MEMORY_H 1
133+
134+/* Define to 1 if you have the `mincore' function. */
135+/* #undef HAVE_MINCORE */
136+
137+/* Define to 1 if you have the `pipe2' function. */
138+#define HAVE_PIPE2 1
139+
140+/* Define to 1 if you have the <signal.h> header file. */
141+#define HAVE_SIGNAL_H 1
142+
143+/* Define to 1 if you have the <stdint.h> header file. */
144+#define HAVE_STDINT_H 1
145+
146+/* Define to 1 if you have the <stdlib.h> header file. */
147+#define HAVE_STDLIB_H 1
148+
149+/* Define to 1 if you have the <strings.h> header file. */
150+#define HAVE_STRINGS_H 1
151+
152+/* Define to 1 if you have the <string.h> header file. */
153+#define HAVE_STRING_H 1
154+
155+/* Define to 1 if `dlpi_subs' is a member of `struct dl_phdr_info'. */
156+/* #undef HAVE_STRUCT_DL_PHDR_INFO_DLPI_SUBS */
157+
158+/* Define to 1 if the system has the type `struct elf_prstatus'. */
159+/* #undef HAVE_STRUCT_ELF_PRSTATUS */
160+
161+/* Define to 1 if the system has the type `struct prstatus'. */
162+/* #undef HAVE_STRUCT_PRSTATUS */
163+
164+/* Define to 1 if you have the <sys/elf.h> header file. */
165+/* #undef HAVE_SYS_ELF_H */
166+
167+/* Define to 1 if you have the <sys/endian.h> header file. */
168+/* #undef HAVE_SYS_ENDIAN_H */
169+
170+/* Define to 1 if you have the <sys/link.h> header file. */
171+/* #undef HAVE_SYS_LINK_H */
172+
173+/* Define to 1 if you have the <sys/procfs.h> header file. */
174+/* #undef HAVE_SYS_PROCFS_H */
175+
176+/* Define to 1 if you have the <sys/ptrace.h> header file. */
177+#define HAVE_SYS_PTRACE_H 1
178+
179+/* Define to 1 if you have the <sys/stat.h> header file. */
180+#define HAVE_SYS_STAT_H 1
181+
182+/* Define to 1 if you have the <sys/syscall.h> header file. */
183+#define HAVE_SYS_SYSCALL_H 1
184+
185+/* Define to 1 if you have the <sys/types.h> header file. */
186+#define HAVE_SYS_TYPES_H 1
187+
188+/* Define to 1 if you have the <sys/uc_access.h> header file. */
189+/* #undef HAVE_SYS_UC_ACCESS_H */
190+
191+/* Define to 1 if you have the `ttrace' function. */
192+/* #undef HAVE_TTRACE */
193+
194+/* Define to 1 if you have the <unistd.h> header file. */
195+#define HAVE_UNISTD_H 1
196+
197+/* Defined if __builtin_unreachable() is available */
198+#define HAVE__BUILTIN_UNREACHABLE 1
199+
200+/* Defined if __builtin___clear_cache() is available */
201+#define HAVE__BUILTIN___CLEAR_CACHE 1
202+
203+/* Define to 1 if --enable-per-thread-cache */
204+/* #undef HAVE___CACHE_PER_THREAD */
205+
206+/* Define to the sub-directory where libtool stores uninstalled libraries. */
207+#define LT_OBJDIR ".libs/"
208+
209+/* Name of package */
210+#define PACKAGE "libunwind"
211+
212+/* Define to the address where bug reports for this package should be sent. */
213+#define PACKAGE_BUGREPORT "https://github.com/libunwind/libunwind"
214+
215+/* Define to the full name of this package. */
216+#define PACKAGE_NAME "libunwind"
217+
218+/* Define to the full name and version of this package. */
219+#define PACKAGE_STRING "libunwind 1.8.1"
220+
221+/* Define to the one symbol short name of this package. */
222+#define PACKAGE_TARNAME "libunwind"
223+
224+/* Define to the home page for this package. */
225+#define PACKAGE_URL ""
226+
227+/* Define to the version of this package. */
228+#define PACKAGE_VERSION "1.8.1"
229+
230+/* The size of `off_t', as computed by sizeof. */
231+#define SIZEOF_OFF_T 8
232+
233+/* Define to 1 if you have the ANSI C header files. */
234+#define STDC_HEADERS 1
235+
236+/* Version number of package */
237+#define VERSION "1.8.1"
238+
239+/* Define to empty if `const' does not conform to ANSI C. */
240+/* #undef const */
241+
242+/* Define to `__inline__' or `__inline' if that's what the C compiler
243+   calls it, or to nothing if 'inline' is not supported under any name.  */
244+#ifndef __cplusplus
245+/* #undef inline */
246+#endif
247+
248+/* Define to `unsigned int' if <sys/types.h> does not define. */
249+/* #undef size_t */
250\ No newline at end of file
251diff --git a/include/libunwind-common.h b/include/libunwind-common.h
252new file mode 100644
253index 00000000..42fd74b4
254--- /dev/null
255+++ b/include/libunwind-common.h
256@@ -0,0 +1,344 @@
257+/* libunwind - a platform-independent unwind library
258+   Copyright (C) 2001-2004 Hewlett-Packard Co
259+	Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
260+
261+This file is part of libunwind.
262+
263+Permission is hereby granted, free of charge, to any person obtaining
264+a copy of this software and associated documentation files (the
265+"Software"), to deal in the Software without restriction, including
266+without limitation the rights to use, copy, modify, merge, publish,
267+distribute, sublicense, and/or sell copies of the Software, and to
268+permit persons to whom the Software is furnished to do so, subject to
269+the following conditions:
270+
271+The above copyright notice and this permission notice shall be
272+included in all copies or substantial portions of the Software.
273+
274+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
275+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
276+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
277+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
278+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
279+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
280+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
281+
282+#define UNW_VERSION_MAJOR	1
283+#define UNW_VERSION_MINOR	8
284+#define UNW_VERSION_EXTRA	1
285+
286+#define UNW_VERSION_CODE(maj,min)	(((maj) << 16) | (min))
287+#define UNW_VERSION	UNW_VERSION_CODE(UNW_VERSION_MAJOR, UNW_VERSION_MINOR)
288+
289+#ifdef __sun
290+// On SmartOS, gcc fails with the following error:
291+//
292+// ../include/libunwind-common.h:43:41: error: expected identifier or '(' before numeric constant
293+// # define UNW_PREFIX UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_)
294+//                                         ^
295+//
296+// workaround is to undefine _U explicitly.
297+// see https://github.com/libunwind/libunwind/issues/118 for more details.
298+//
299+#undef _U
300+#endif
301+
302+#define UNW_PASTE2(x,y)	x##y
303+#define UNW_PASTE(x,y)	UNW_PASTE2(x,y)
304+#define UNW_OBJ(fn)	UNW_PASTE(UNW_PREFIX, fn)
305+#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
306+
307+#ifdef UNW_LOCAL_ONLY
308+# define UNW_PREFIX	UNW_PASTE(UNW_PASTE(_UL,UNW_TARGET),_)
309+#else /* !UNW_LOCAL_ONLY */
310+# define UNW_PREFIX	UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_)
311+#endif /* !UNW_LOCAL_ONLY */
312+
313+/* Error codes.  The unwind routines return the *negated* values of
314+   these error codes on error and a non-negative value on success.  */
315+typedef enum
316+  {
317+    UNW_ESUCCESS = 0,		/* no error */
318+    UNW_EUNSPEC,		/* unspecified (general) error */
319+    UNW_ENOMEM,			/* out of memory */
320+    UNW_EBADREG,		/* bad register number */
321+    UNW_EREADONLYREG,		/* attempt to write read-only register */
322+    UNW_ESTOPUNWIND,		/* stop unwinding */
323+    UNW_EINVALIDIP,		/* invalid IP */
324+    UNW_EBADFRAME,		/* bad frame */
325+    UNW_EINVAL,			/* unsupported operation or bad value */
326+    UNW_EBADVERSION,		/* unwind info has unsupported version */
327+    UNW_ENOINFO			/* no unwind info found */
328+  }
329+unw_error_t;
330+
331+/* The following enum defines the indices for a couple of
332+   (pseudo-)registers which have the same meaning across all
333+   platforms.  (RO) means read-only.  (RW) means read-write.  General
334+   registers (aka "integer registers") are expected to start with
335+   index 0.  The number of such registers is architecture-dependent.
336+   The remaining indices can be used as an architecture sees fit.  The
337+   last valid register index is given by UNW_REG_LAST.  */
338+typedef enum
339+  {
340+    UNW_REG_IP = UNW_TDEP_IP,		/* (rw) instruction pointer (pc) */
341+    UNW_REG_SP = UNW_TDEP_SP,		/* (ro) stack pointer */
342+    UNW_REG_EH = UNW_TDEP_EH,		/* (rw) exception-handling reg base */
343+    UNW_REG_LAST = UNW_TDEP_LAST_REG
344+  }
345+unw_frame_regnum_t;
346+
347+/* Number of exception-handler argument registers: */
348+#define UNW_NUM_EH_REGS		UNW_TDEP_NUM_EH_REGS
349+
350+typedef enum
351+  {
352+    UNW_CACHE_NONE,			/* no caching */
353+    UNW_CACHE_GLOBAL,			/* shared global cache */
354+    UNW_CACHE_PER_THREAD		/* per-thread caching */
355+  }
356+unw_caching_policy_t;
357+
358+typedef enum
359+  {
360+    UNW_INIT_SIGNAL_FRAME = 1           /* We know this is a signal frame */
361+  }
362+unw_init_local2_flags_t;
363+
364+typedef int unw_regnum_t;
365+
366+/* The unwind cursor starts at the youngest (most deeply nested) frame
367+   and is used to track the frame state as the unwinder steps from
368+   frame to frame.  It is safe to make (shallow) copies of variables
369+   of this type.  */
370+typedef struct unw_cursor
371+  {
372+    unw_word_t opaque[UNW_TDEP_CURSOR_LEN];
373+  }
374+unw_cursor_t;
375+
376+/* This type encapsulates the entire (preserved) machine-state.  */
377+typedef unw_tdep_context_t unw_context_t;
378+
379+/* unw_getcontext() fills the unw_context_t pointed to by UC with the
380+   machine state as it exists at the call-site.  For implementation
381+   reasons, this needs to be a target-dependent macro.  It's easiest
382+   to think of unw_getcontext() as being identical to getcontext(). */
383+#define unw_getcontext(uc)		unw_tdep_getcontext(uc)
384+
385+/* Return 1 if register number R is a floating-point register, zero
386+   otherwise.
387+   This routine is signal-safe.  */
388+#define unw_is_fpreg(r)			unw_tdep_is_fpreg(r)
389+
390+typedef unw_tdep_fpreg_t unw_fpreg_t;
391+
392+typedef struct unw_addr_space *unw_addr_space_t;
393+
394+/* Each target may define it's own set of flags, but bits 0-15 are
395+   reserved for general libunwind-use.  */
396+#define UNW_PI_FLAG_FIRST_TDEP_BIT	16
397+/* The information comes from a .debug_frame section.  */
398+#define UNW_PI_FLAG_DEBUG_FRAME	32
399+
400+typedef struct unw_proc_info
401+  {
402+    unw_word_t start_ip;	/* first IP covered by this procedure */
403+    unw_word_t end_ip;		/* first IP NOT covered by this procedure */
404+#if defined(NEED_LAST_IP)
405+    unw_word_t last_ip;		/* first IP that could begin another procedure */
406+#endif
407+    unw_word_t lsda;		/* address of lang.-spec. data area (if any) */
408+    unw_word_t handler;		/* optional personality routine */
409+    unw_word_t gp;		/* global-pointer value for this procedure */
410+    unw_word_t flags;		/* misc. flags */
411+
412+    int format;			/* unwind-info format (arch-specific) */
413+    int unwind_info_size;	/* size of the information (if applicable) */
414+    void *unwind_info;		/* unwind-info (arch-specific) */
415+    unw_tdep_proc_info_t extra;	/* target-dependent auxiliary proc-info */
416+  }
417+unw_proc_info_t;
418+
419+typedef int (*unw_reg_states_callback)(void *token,
420+				       void *reg_states_data,
421+				       size_t reg_states_data_size,
422+				       unw_word_t start_ip, unw_word_t end_ip);
423+
424+/* These are backend callback routines that provide access to the
425+   state of a "remote" process.  This can be used, for example, to
426+   unwind another process through the ptrace() interface.  */
427+typedef struct unw_accessors
428+  {
429+    /* Look up the unwind info associated with instruction-pointer IP.
430+       On success, the routine fills in the PROC_INFO structure.  */
431+    int (*find_proc_info) (unw_addr_space_t, unw_word_t, unw_proc_info_t *,
432+			   int, void *);
433+
434+    /* Release any resources (e.g., memory) that were allocated for
435+       the unwind info returned in by a previous call to
436+       find_proc_info() with NEED_UNWIND_INFO set to 1.  */
437+    void (*put_unwind_info) (unw_addr_space_t, unw_proc_info_t *, void *);
438+
439+    /* Return the list-head of the dynamically registered unwind
440+       info.  */
441+    int (*get_dyn_info_list_addr) (unw_addr_space_t, unw_word_t *, void *);
442+
443+    /* Access aligned word at address ADDR.  The value is returned
444+       according to the endianness of the host (e.g., if the host is
445+       little-endian and the target is big-endian, access_mem() needs
446+       to byte-swap the value before returning it).  */
447+    int (*access_mem) (unw_addr_space_t, unw_word_t, unw_word_t *, int,
448+		       void *);
449+
450+    /* Access register number REG at address ADDR.  */
451+    int (*access_reg) (unw_addr_space_t, unw_regnum_t, unw_word_t *, int,
452+		       void *);
453+
454+    /* Access register number REG at address ADDR.  */
455+    int (*access_fpreg) (unw_addr_space_t, unw_regnum_t,
456+			 unw_fpreg_t *, int, void *);
457+
458+    int (*resume) (unw_addr_space_t, unw_cursor_t *, void *);
459+
460+    /* Optional call back to obtain the name of a (static) procedure.
461+       Dynamically generated procedures are handled automatically by
462+       libunwind.  This callback is optional and may be set to
463+       NULL.  */
464+    int (*get_proc_name) (unw_addr_space_t, unw_word_t, char *, size_t,
465+			  unw_word_t *, void *);
466+
467+    /* Optional call back to obtain the name of a elf file where the ip belongs to.
468+       This callback is optional and may be set to NULL.  */
469+    int (*get_elf_filename) (unw_addr_space_t, unw_word_t, char *, size_t,
470+			  unw_word_t *, void *);
471+
472+    /* Optional call back to obtain the start and end ip of a procedure.
473+     * procedure ip range is [start, end), the range is without end.
474+     * This callback is optional and may be set to NULL.
475+     */
476+    int (*get_proc_ip_range) (unw_addr_space_t, unw_word_t, unw_word_t *,
477+			  unw_word_t *, void *);
478+
479+    /* Optional call back to return a mask to be used with pointer
480+     * authentication on arm64.
481+     *
482+     * The on bits in the returned mask indicate which bits in a return address
483+     * are part of a pointer authentication code.  These are the bits in the
484+     * return address to turn off so that the calling frame can be found
485+     * for the unwinding to continue.
486+     *
487+     * The return value must be host-endian.  e.g. if the target is big-endian
488+     * and the host is little endian, the implementation of this function
489+     * must byte swap.
490+     *
491+     * This callback is optional and may be set to NULL.  In this case all
492+     * the bits in the return address are used, as if no masking were done.
493+     */
494+    unw_word_t (*ptrauth_insn_mask) (unw_addr_space_t, void *);
495+
496+  }
497+unw_accessors_t;
498+
499+typedef enum unw_save_loc_type
500+  {
501+    UNW_SLT_NONE,	/* register is not saved ("not an l-value") */
502+    UNW_SLT_MEMORY,	/* register has been saved in memory */
503+    UNW_SLT_REG		/* register has been saved in (another) register */
504+  }
505+unw_save_loc_type_t;
506+
507+typedef struct unw_save_loc
508+  {
509+    unw_save_loc_type_t type;
510+    union
511+      {
512+	unw_word_t addr;	/* valid if type==UNW_SLT_MEMORY */
513+	unw_regnum_t regnum;	/* valid if type==UNW_SLT_REG */
514+      }
515+    u;
516+    unw_tdep_save_loc_t extra;	/* target-dependent additional information */
517+  }
518+unw_save_loc_t;
519+
520+struct dl_phdr_info;
521+typedef int (*unw_iterate_phdr_callback_t) (struct dl_phdr_info *, size_t, void *);
522+typedef int (*unw_iterate_phdr_func_t) (unw_iterate_phdr_callback_t, void *);
523+
524+/* These routines work both for local and remote unwinding.  */
525+
526+#define unw_local_addr_space		UNW_OBJ(local_addr_space)
527+#define unw_create_addr_space		UNW_OBJ(create_addr_space)
528+#define unw_destroy_addr_space		UNW_OBJ(destroy_addr_space)
529+#define unw_get_accessors		UNW_ARCH_OBJ(get_accessors)
530+#define unw_get_accessors_int		UNW_ARCH_OBJ(get_accessors_int)
531+#define unw_init_local			UNW_OBJ(init_local)
532+#define unw_init_local2			UNW_OBJ(init_local2)
533+#define unw_init_remote			UNW_OBJ(init_remote)
534+#define unw_step			UNW_OBJ(step)
535+#define unw_resume			UNW_OBJ(resume)
536+#define unw_get_proc_info		UNW_OBJ(get_proc_info)
537+#define unw_get_proc_info_by_ip		UNW_OBJ(get_proc_info_by_ip)
538+#define unw_get_proc_info_in_range	UNW_OBJ(get_proc_info_in_range)
539+#define unw_reg_states_iterate		UNW_OBJ(reg_states_iterate)
540+#define unw_apply_reg_state		UNW_OBJ(apply_reg_state)
541+#define unw_get_reg			UNW_OBJ(get_reg)
542+#define unw_set_reg			UNW_OBJ(set_reg)
543+#define unw_get_fpreg			UNW_OBJ(get_fpreg)
544+#define unw_set_fpreg			UNW_OBJ(set_fpreg)
545+#define unw_get_save_loc		UNW_OBJ(get_save_loc)
546+#define unw_is_signal_frame		UNW_OBJ(is_signal_frame)
547+#define unw_get_proc_name		UNW_OBJ(get_proc_name)
548+#define unw_get_proc_name_by_ip		UNW_OBJ(get_proc_name_by_ip)
549+#define unw_get_elf_filename		UNW_OBJ(get_elf_filename)
550+#define unw_get_elf_filename_by_ip		UNW_OBJ(get_elf_filename_by_ip)
551+#define unw_set_caching_policy		UNW_OBJ(set_caching_policy)
552+#define unw_set_cache_size		UNW_OBJ(set_cache_size)
553+#define unw_set_iterate_phdr_function	UNW_OBJ(set_iterate_phdr_function)
554+#define unw_regname			UNW_ARCH_OBJ(regname)
555+#define unw_flush_cache			UNW_ARCH_OBJ(flush_cache)
556+#define unw_strerror			UNW_ARCH_OBJ(strerror)
557+
558+extern unw_addr_space_t unw_create_addr_space (unw_accessors_t *, int);
559+extern void unw_destroy_addr_space (unw_addr_space_t);
560+extern unw_accessors_t *unw_get_accessors (unw_addr_space_t);
561+extern unw_accessors_t *unw_get_accessors_int (unw_addr_space_t);
562+extern void unw_flush_cache (unw_addr_space_t, unw_word_t, unw_word_t);
563+extern int unw_set_caching_policy (unw_addr_space_t, unw_caching_policy_t);
564+extern int unw_set_cache_size (unw_addr_space_t, size_t, int);
565+extern void unw_set_iterate_phdr_function (unw_addr_space_t, unw_iterate_phdr_func_t);
566+extern const char *unw_regname (unw_regnum_t);
567+
568+extern int unw_init_local (unw_cursor_t *, unw_context_t *);
569+extern int unw_init_local2 (unw_cursor_t *, unw_context_t *, int);
570+extern int unw_init_remote (unw_cursor_t *, unw_addr_space_t, void *);
571+extern int unw_step (unw_cursor_t *);
572+extern int unw_resume (unw_cursor_t *);
573+extern int unw_get_proc_info (unw_cursor_t *, unw_proc_info_t *);
574+extern int unw_get_proc_info_by_ip (unw_addr_space_t, unw_word_t,
575+				    unw_proc_info_t *, void *);
576+extern int unw_get_proc_info_in_range (unw_word_t, unw_word_t,
577+                                       unw_word_t, unw_word_t,
578+                                       unw_word_t, unw_word_t,
579+                                       unw_addr_space_t, unw_word_t,
580+                                       unw_proc_info_t *, int,
581+                                       void *);
582+extern int unw_reg_states_iterate (unw_cursor_t *, unw_reg_states_callback, void *);
583+extern int unw_apply_reg_state (unw_cursor_t *, void *);
584+extern int unw_get_reg (unw_cursor_t *, int, unw_word_t *);
585+extern int unw_set_reg (unw_cursor_t *, int, unw_word_t);
586+extern int unw_get_fpreg (unw_cursor_t *, int, unw_fpreg_t *);
587+extern int unw_set_fpreg (unw_cursor_t *, int, unw_fpreg_t);
588+extern int unw_get_save_loc (unw_cursor_t *, int, unw_save_loc_t *);
589+extern int unw_is_signal_frame (unw_cursor_t *);
590+extern int unw_get_proc_name (unw_cursor_t *, char *, size_t, unw_word_t *);
591+extern int unw_get_proc_name_by_ip (unw_addr_space_t, unw_word_t, char *,
592+				    size_t, unw_word_t *, void *);
593+extern int unw_get_elf_filename (unw_cursor_t *, char *, size_t, unw_word_t *);
594+extern int unw_get_elf_filename_by_ip (unw_addr_space_t, unw_word_t, char *,
595+                                       size_t, unw_word_t *, void *);
596+extern const char *unw_strerror (int);
597+extern int unw_backtrace (void **, int);
598+extern int unw_backtrace2 (void **, int, unw_context_t*, int);
599+
600+extern unw_addr_space_t unw_local_addr_space;
601