SERVER-98185 libunwind-v1.8.1 (#30495)
GitOrigin-RevId: 440d7170a99171accd03ffd9d9cfea435af40154
This commit is contained in:
parent
f1ced9e1c1
commit
c0f68b6967
@ -47,7 +47,7 @@ a notice will be included in
|
||||
| [libmongocrypt] | Apache-2.0 | 1.12.0 | ✗ | ✗ |
|
||||
| [librdkafka - the Apache Kafka C/C++ client library] | BSD-3-Clause, Xmlproc License, ISC, MIT, Public Domain, Zlib, BSD-2-Clause, Andreas Stolcke License | 2.0.2 | | ✗ |
|
||||
| [LibTomCrypt] | WTFPL, Public Domain | 1.18.2 | ✗ | ✗ |
|
||||
| [libunwind/libunwind] | MIT | v1.6.2 | | ✗ |
|
||||
| [libunwind/libunwind] | MIT | v1.8.1 | | ✗ |
|
||||
| [linenoise] | BSD-2-Clause | Unknown | | ✗ |
|
||||
| [MongoDB C Driver] | Apache-2.0 | 1.27.6 | ✗ | ✗ |
|
||||
| [Mozilla Firefox] | MPL-2.0 | 115.7.0esr | unknown | ✗ |
|
||||
|
||||
@ -1063,7 +1063,7 @@
|
||||
"name": "Organization: github"
|
||||
},
|
||||
"name": "libunwind/libunwind",
|
||||
"version": "v1.6.2",
|
||||
"version": "v1.8.1",
|
||||
"licenses": [
|
||||
{
|
||||
"license": {
|
||||
@ -1071,7 +1071,7 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"purl": "pkg:github/libunwind/libunwind@v1.6.2",
|
||||
"purl": "pkg:github/libunwind/libunwind@v1.8.1",
|
||||
"properties": [
|
||||
{
|
||||
"name": "internal:team_responsible",
|
||||
@ -1083,7 +1083,7 @@
|
||||
},
|
||||
{
|
||||
"name": "info_link",
|
||||
"value": "http://www.nongnu.org/libunwind/"
|
||||
"value": "http://www.github.com/libunwind/libunwind"
|
||||
},
|
||||
{
|
||||
"name": "import_script_path",
|
||||
|
||||
231
src/third_party/unwind/BUILD.bazel
vendored
231
src/third_party/unwind/BUILD.bazel
vendored
@ -13,138 +13,128 @@ config_setting(
|
||||
},
|
||||
)
|
||||
|
||||
# Update procedure (mostly out of date):
|
||||
# Run "scripts/host_config.sh". This creates a `make_output.json` file.
|
||||
# Find the "unwind" library. Combine its `srcs` file list with the sources
|
||||
# of all local libraries named in its "deps".
|
||||
#
|
||||
# Ensure that compilation flags are captured in this Bazel file.
|
||||
mongo_cc_library(
|
||||
name = "unwind",
|
||||
srcs = [
|
||||
# Generated by a manual process:
|
||||
# - Run "scripts/host_config.sh |tee host_config.out".
|
||||
# - Gather .o dependencies of the libunwind.a target.
|
||||
# - Some .o are from prereq libraries, they have .lax paths.
|
||||
# Replace the `*.lax/$PREREQ/*.o` dependencies with the
|
||||
# corresponding .o from that $PREREQ library.
|
||||
# - Replace each .o with the source file (.c or .S) that generated it.
|
||||
# - Ensure the the ${CC} arguments are preserved by SCons.
|
||||
# Note you can skip NDEBUG defines as those should be inherited.
|
||||
"dist/src/dwarf/global.c",
|
||||
"dist/src/dwarf/Lexpr.c",
|
||||
"dist/src/dwarf/Lfde.c",
|
||||
"dist/src/dwarf/Lfind_proc_info-lsb.c",
|
||||
"dist/src/dwarf/Lfind_unwind_table.c",
|
||||
"dist/src/dwarf/Lparser.c",
|
||||
"dist/src/dwarf/Lpe.c",
|
||||
"dist/src/dl-iterate-phdr.c",
|
||||
"dist/src/elf64.c",
|
||||
"dist/src/mi/backtrace.c",
|
||||
"dist/src/mi/dyn-cancel.c",
|
||||
"dist/src/mi/dyn-info-list.c",
|
||||
"dist/src/mi/dyn-register.c",
|
||||
"dist/src/mi/flush_cache.c",
|
||||
"dist/src/mi/init.c",
|
||||
"dist/src/mi/Ldestroy_addr_space.c",
|
||||
"dist/src/mi/Ldyn-extract.c",
|
||||
"dist/src/mi/Lfind_dynamic_proc_info.c",
|
||||
"dist/src/mi/Lget_accessors.c",
|
||||
"dist/src/mi/Lget_fpreg.c",
|
||||
"dist/src/mi/Lget_proc_info_by_ip.c",
|
||||
"dist/src/mi/Lget_proc_name.c",
|
||||
"dist/src/mi/Lget_reg.c",
|
||||
"dist/src/mi/Lput_dynamic_unwind_info.c",
|
||||
"dist/src/mi/Lset_cache_size.c",
|
||||
"dist/src/mi/Lset_caching_policy.c",
|
||||
"dist/src/mi/Lset_fpreg.c",
|
||||
"dist/src/mi/Lset_reg.c",
|
||||
"dist/src/mi/mempool.c",
|
||||
"dist/src/mi/strerror.c",
|
||||
] + select({
|
||||
"@platforms//os:linux": ["dist/src/os-linux.c"],
|
||||
"//conditions:default": [],
|
||||
}) +
|
||||
select({
|
||||
"@platforms//cpu:aarch64": [
|
||||
"dist/src/aarch64/Lapply_reg_state.c",
|
||||
"dist/src/aarch64/Lcreate_addr_space.c",
|
||||
"dist/src/aarch64/Lget_proc_info.c",
|
||||
"dist/src/aarch64/Lget_save_loc.c",
|
||||
"dist/src/aarch64/Lglobal.c",
|
||||
"dist/src/aarch64/Linit.c",
|
||||
"dist/src/aarch64/Linit_local.c",
|
||||
"dist/src/aarch64/Linit_remote.c",
|
||||
"dist/src/aarch64/Lis_signal_frame.c",
|
||||
"dist/src/aarch64/Lreg_states_iterate.c",
|
||||
"dist/src/aarch64/Lregs.c",
|
||||
"dist/src/aarch64/Lresume.c",
|
||||
"dist/src/aarch64/Lstash_frame.c",
|
||||
"dist/src/aarch64/Lstep.c",
|
||||
"dist/src/aarch64/Ltrace.c",
|
||||
"dist/src/aarch64/is_fpreg.c",
|
||||
"dist/src/aarch64/regname.c",
|
||||
],
|
||||
"@platforms//cpu:x86_64": [
|
||||
"dist/src/x86_64/Lapply_reg_state.c",
|
||||
"dist/src/x86_64/Lcreate_addr_space.c",
|
||||
"dist/src/x86_64/Lget_proc_info.c",
|
||||
"dist/src/x86_64/Lget_save_loc.c",
|
||||
"dist/src/x86_64/Lglobal.c",
|
||||
"dist/src/x86_64/Linit.c",
|
||||
"dist/src/x86_64/Linit_local.c",
|
||||
"dist/src/x86_64/Linit_remote.c",
|
||||
"dist/src/x86_64/Los-linux.c",
|
||||
"dist/src/x86_64/Lreg_states_iterate.c",
|
||||
"dist/src/x86_64/Lregs.c",
|
||||
"dist/src/x86_64/Lresume.c",
|
||||
"dist/src/x86_64/Lstash_frame.c",
|
||||
"dist/src/x86_64/Lstep.c",
|
||||
"dist/src/x86_64/Ltrace.c",
|
||||
"dist/src/x86_64/is_fpreg.c",
|
||||
"dist/src/x86_64/regname.c",
|
||||
],
|
||||
"@platforms//cpu:ppc": [
|
||||
"dist/src/ppc/Lget_proc_info.c",
|
||||
"dist/src/ppc/Lget_save_loc.c",
|
||||
"dist/src/ppc/Linit_local.c",
|
||||
"dist/src/ppc/Linit_remote.c",
|
||||
"dist/src/ppc/Lis_signal_frame.c",
|
||||
"dist/src/ppc64/Lapply_reg_state.c",
|
||||
"dist/src/ppc64/Lcreate_addr_space.c",
|
||||
"dist/src/ppc64/Lglobal.c",
|
||||
"dist/src/ppc64/Linit.c",
|
||||
"dist/src/ppc64/Lreg_states_iterate.c",
|
||||
"dist/src/ppc64/Lregs.c",
|
||||
"dist/src/ppc64/Lresume.c",
|
||||
"dist/src/ppc64/Lstep.c",
|
||||
"dist/src/ppc64/get_func_addr.c",
|
||||
"dist/src/ppc64/is_fpreg.c",
|
||||
"dist/src/ppc64/regname.c",
|
||||
],
|
||||
"@platforms//cpu:s390x": [
|
||||
"dist/src/s390x/Lapply_reg_state.c",
|
||||
"dist/src/s390x/Lcreate_addr_space.c",
|
||||
"dist/src/s390x/Lget_proc_info.c",
|
||||
"dist/src/s390x/Lget_save_loc.c",
|
||||
"dist/src/s390x/Lglobal.c",
|
||||
"dist/src/s390x/Linit.c",
|
||||
"dist/src/s390x/Linit_local.c",
|
||||
"dist/src/s390x/Linit_remote.c",
|
||||
"dist/src/s390x/Lis_signal_frame.c",
|
||||
"dist/src/s390x/Lreg_states_iterate.c",
|
||||
"dist/src/s390x/Lregs.c",
|
||||
"dist/src/s390x/Lresume.c",
|
||||
"dist/src/s390x/Lstep.c",
|
||||
"dist/src/s390x/is_fpreg.c",
|
||||
"dist/src/s390x/regname.c",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
"dist/src/dl-iterate-phdr.c",
|
||||
"dist/src/dwarf/Lexpr.c",
|
||||
"dist/src/dwarf/Lfde.c",
|
||||
"dist/src/dwarf/Lfind_proc_info-lsb.c",
|
||||
"dist/src/dwarf/Lfind_unwind_table.c",
|
||||
"dist/src/dwarf/Lget_proc_info_in_range.c",
|
||||
"dist/src/dwarf/Lparser.c",
|
||||
"dist/src/dwarf/Lpe.c",
|
||||
"dist/src/dwarf/global.c",
|
||||
"dist/src/elf64.c",
|
||||
"dist/src/mi/Laddress_validator.c",
|
||||
"dist/src/mi/Ldestroy_addr_space.c",
|
||||
"dist/src/mi/Ldyn-extract.c",
|
||||
"dist/src/mi/Lfind_dynamic_proc_info.c",
|
||||
"dist/src/mi/Lget_accessors.c",
|
||||
"dist/src/mi/Lget_elf_filename.c",
|
||||
"dist/src/mi/Lget_fpreg.c",
|
||||
"dist/src/mi/Lget_proc_info_by_ip.c",
|
||||
"dist/src/mi/Lget_proc_name.c",
|
||||
"dist/src/mi/Lget_reg.c",
|
||||
"dist/src/mi/Lput_dynamic_unwind_info.c",
|
||||
"dist/src/mi/Lset_cache_size.c",
|
||||
"dist/src/mi/Lset_caching_policy.c",
|
||||
"dist/src/mi/Lset_fpreg.c",
|
||||
"dist/src/mi/Lset_iterate_phdr_function.c",
|
||||
"dist/src/mi/Lset_reg.c",
|
||||
"dist/src/mi/backtrace.c",
|
||||
"dist/src/mi/dyn-cancel.c",
|
||||
"dist/src/mi/dyn-info-list.c",
|
||||
"dist/src/mi/dyn-register.c",
|
||||
"dist/src/mi/flush_cache.c",
|
||||
"dist/src/mi/init.c",
|
||||
"dist/src/mi/mempool.c",
|
||||
"dist/src/mi/strerror.c",
|
||||
"dist/src/os-linux.c",
|
||||
] + select({
|
||||
"@platforms//cpu:aarch64": [
|
||||
"dist/src/aarch64/Lapply_reg_state.c",
|
||||
"dist/src/aarch64/Lcreate_addr_space.c",
|
||||
"dist/src/aarch64/Lget_proc_info.c",
|
||||
"dist/src/aarch64/Lget_save_loc.c",
|
||||
"dist/src/aarch64/Lglobal.c",
|
||||
"dist/src/aarch64/Linit.c",
|
||||
"dist/src/aarch64/Linit_local.c",
|
||||
"dist/src/aarch64/Linit_remote.c",
|
||||
"dist/src/aarch64/Lis_signal_frame.c",
|
||||
"dist/src/aarch64/Los-linux.c",
|
||||
"dist/src/aarch64/Lreg_states_iterate.c",
|
||||
"dist/src/aarch64/Lregs.c",
|
||||
"dist/src/aarch64/Lresume.c",
|
||||
"dist/src/aarch64/Lstash_frame.c",
|
||||
"dist/src/aarch64/Lstep.c",
|
||||
"dist/src/aarch64/Ltrace.c",
|
||||
"dist/src/aarch64/getcontext.S",
|
||||
"dist/src/aarch64/is_fpreg.c",
|
||||
"dist/src/aarch64/regname.c",
|
||||
],
|
||||
"@platforms//cpu:x86_64": [
|
||||
"dist/src/x86_64/Lapply_reg_state.c",
|
||||
"dist/src/x86_64/Lcreate_addr_space.c",
|
||||
"dist/src/x86_64/Lget_proc_info.c",
|
||||
"dist/src/x86_64/Lget_save_loc.c",
|
||||
"dist/src/x86_64/Lglobal.c",
|
||||
"dist/src/x86_64/Linit.c",
|
||||
"dist/src/x86_64/Linit_local.c",
|
||||
"dist/src/x86_64/Linit_remote.c",
|
||||
"dist/src/x86_64/Los-linux.c",
|
||||
"dist/src/x86_64/Lreg_states_iterate.c",
|
||||
"dist/src/x86_64/Lregs.c",
|
||||
"dist/src/x86_64/Lresume.c",
|
||||
"dist/src/x86_64/Lstash_frame.c",
|
||||
"dist/src/x86_64/Lstep.c",
|
||||
"dist/src/x86_64/Ltrace.c",
|
||||
"dist/src/x86_64/getcontext.S",
|
||||
"dist/src/x86_64/is_fpreg.c",
|
||||
"dist/src/x86_64/regname.c",
|
||||
"dist/src/x86_64/setcontext.S",
|
||||
],
|
||||
"@platforms//cpu:ppc": [],
|
||||
"@platforms//cpu:ppc": [
|
||||
"dist/src/ppc/Lget_proc_info.c",
|
||||
"dist/src/ppc/Lget_save_loc.c",
|
||||
"dist/src/ppc/Linit_local.c",
|
||||
"dist/src/ppc/Linit_remote.c",
|
||||
"dist/src/ppc/Lis_signal_frame.c",
|
||||
"dist/src/ppc64/Lapply_reg_state.c",
|
||||
"dist/src/ppc64/Lcreate_addr_space.c",
|
||||
"dist/src/ppc64/Lglobal.c",
|
||||
"dist/src/ppc64/Linit.c",
|
||||
"dist/src/ppc64/Lreg_states_iterate.c",
|
||||
"dist/src/ppc64/Lregs.c",
|
||||
"dist/src/ppc64/Lresume.c",
|
||||
"dist/src/ppc64/Lstep.c",
|
||||
"dist/src/ppc64/get_func_addr.c",
|
||||
"dist/src/ppc64/is_fpreg.c",
|
||||
"dist/src/ppc64/regname.c",
|
||||
],
|
||||
"@platforms//cpu:s390x": [
|
||||
"dist/src/s390x/Lapply_reg_state.c",
|
||||
"dist/src/s390x/Lcreate_addr_space.c",
|
||||
"dist/src/s390x/Lget_proc_info.c",
|
||||
"dist/src/s390x/Lget_save_loc.c",
|
||||
"dist/src/s390x/Lglobal.c",
|
||||
"dist/src/s390x/Linit.c",
|
||||
"dist/src/s390x/Linit_local.c",
|
||||
"dist/src/s390x/Linit_remote.c",
|
||||
"dist/src/s390x/Lis_signal_frame.c",
|
||||
"dist/src/s390x/Lreg_states_iterate.c",
|
||||
"dist/src/s390x/Lregs.c",
|
||||
"dist/src/s390x/Lresume.c",
|
||||
"dist/src/s390x/Lstep.c",
|
||||
"dist/src/s390x/getcontext.S",
|
||||
"dist/src/s390x/is_fpreg.c",
|
||||
"dist/src/s390x/regname.c",
|
||||
"dist/src/s390x/setcontext.S",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
@ -213,6 +203,7 @@ mongo_cc_library(
|
||||
"HAVE_CONFIG_H",
|
||||
# Grant access to nonstandard gnu c functions, which the dist autoconf build script is also setting.
|
||||
"_GNU_SOURCE",
|
||||
"__EXTENSIONS__",
|
||||
],
|
||||
skip_global_deps = [
|
||||
# This is a globally injected dependency.
|
||||
|
||||
6
src/third_party/unwind/dist/INSTALL
vendored
6
src/third_party/unwind/dist/INSTALL
vendored
@ -1,8 +1,8 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
@ -225,7 +225,7 @@ order to use an ANSI C compiler:
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX 'make' updates targets which have the same time stamps as their
|
||||
HP-UX 'make' updates targets which have the same timestamps as their
|
||||
prerequisites, which makes it generally unusable when shipped generated
|
||||
files such as 'configure' are involved. Use GNU 'make' instead.
|
||||
|
||||
|
||||
16
src/third_party/unwind/dist/Makefile.am
vendored
16
src/third_party/unwind/dist/Makefile.am
vendored
@ -1,3 +1,4 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
include_HEADERS = include/libunwind-dynamic.h
|
||||
|
||||
if BUILD_PTRACE
|
||||
@ -7,7 +8,9 @@ endif BUILD_PTRACE
|
||||
if BUILD_COREDUMP
|
||||
include_HEADERS += include/libunwind-coredump.h
|
||||
endif BUILD_COREDUMP
|
||||
|
||||
if BUILD_NTO
|
||||
include_HEADERS += include/libunwind-nto.h
|
||||
endif BUILD_NTO
|
||||
if ARCH_AARCH64
|
||||
include_HEADERS += include/libunwind-aarch64.h
|
||||
endif
|
||||
@ -23,9 +26,6 @@ endif
|
||||
if ARCH_MIPS
|
||||
include_HEADERS += include/libunwind-mips.h
|
||||
endif
|
||||
if ARCH_TILEGX
|
||||
include_HEADERS += include/libunwind-tilegx.h
|
||||
endif
|
||||
if ARCH_X86
|
||||
include_HEADERS += include/libunwind-x86.h
|
||||
endif
|
||||
@ -47,6 +47,9 @@ endif
|
||||
if ARCH_RISCV
|
||||
include_HEADERS += include/libunwind-riscv.h
|
||||
endif
|
||||
if ARCH_LOONGARCH64
|
||||
include_HEADERS += include/libunwind-loongarch64.h
|
||||
endif
|
||||
|
||||
if !REMOTE_ONLY
|
||||
include_HEADERS += include/libunwind.h
|
||||
@ -81,8 +84,6 @@ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
|
||||
include/tdep-hppa/jmpbuf.h include/tdep-hppa/dwarf-config.h \
|
||||
include/tdep-mips/libunwind_i.h \
|
||||
include/tdep-mips/jmpbuf.h include/tdep-mips/dwarf-config.h \
|
||||
include/tdep-tilegx/libunwind_i.h \
|
||||
include/tdep-tilegx/jmpbuf.h include/tdep-tilegx/dwarf-config.h \
|
||||
include/tdep-x86/libunwind_i.h \
|
||||
include/tdep-x86/jmpbuf.h include/tdep-x86/dwarf-config.h \
|
||||
include/tdep-x86_64/libunwind_i.h \
|
||||
@ -97,6 +98,9 @@ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
|
||||
include/tdep-s390x/jmpbuf.h include/tdep-s390x/libunwind_i.h \
|
||||
include/tdep-riscv/dwarf-config.h \
|
||||
include/tdep-riscv/jmpbuf.h include/tdep-riscv/libunwind_i.h \
|
||||
include/tdep-loongarch64/dwarf-config.h \
|
||||
include/tdep-loongarch64/jmpbuf.h \
|
||||
include/tdep-loongarch64/libunwind_i.h \
|
||||
include/tdep/libunwind_i.h \
|
||||
include/tdep/jmpbuf.h include/tdep/dwarf-config.h
|
||||
|
||||
|
||||
103
src/third_party/unwind/dist/Makefile.in
vendored
103
src/third_party/unwind/dist/Makefile.in
vendored
@ -1,7 +1,7 @@
|
||||
# Makefile.in generated by automake 1.15.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -91,12 +91,12 @@ host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@BUILD_PTRACE_TRUE@am__append_1 = include/libunwind-ptrace.h
|
||||
@BUILD_COREDUMP_TRUE@am__append_2 = include/libunwind-coredump.h
|
||||
@ARCH_AARCH64_TRUE@am__append_3 = include/libunwind-aarch64.h
|
||||
@ARCH_ARM_TRUE@am__append_4 = include/libunwind-arm.h
|
||||
@ARCH_IA64_TRUE@am__append_5 = include/libunwind-ia64.h
|
||||
@ARCH_HPPA_TRUE@am__append_6 = include/libunwind-hppa.h
|
||||
@ARCH_MIPS_TRUE@am__append_7 = include/libunwind-mips.h
|
||||
@ARCH_TILEGX_TRUE@am__append_8 = include/libunwind-tilegx.h
|
||||
@BUILD_NTO_TRUE@am__append_3 = include/libunwind-nto.h
|
||||
@ARCH_AARCH64_TRUE@am__append_4 = include/libunwind-aarch64.h
|
||||
@ARCH_ARM_TRUE@am__append_5 = include/libunwind-arm.h
|
||||
@ARCH_IA64_TRUE@am__append_6 = include/libunwind-ia64.h
|
||||
@ARCH_HPPA_TRUE@am__append_7 = include/libunwind-hppa.h
|
||||
@ARCH_MIPS_TRUE@am__append_8 = include/libunwind-mips.h
|
||||
@ARCH_X86_TRUE@am__append_9 = include/libunwind-x86.h
|
||||
@ARCH_X86_64_TRUE@am__append_10 = include/libunwind-x86_64.h
|
||||
@ARCH_PPC32_TRUE@am__append_11 = include/libunwind-ppc32.h
|
||||
@ -104,13 +104,16 @@ target_triplet = @target@
|
||||
@ARCH_SH_TRUE@am__append_13 = include/libunwind-sh.h
|
||||
@ARCH_S390X_TRUE@am__append_14 = include/libunwind-s390x.h
|
||||
@ARCH_RISCV_TRUE@am__append_15 = include/libunwind-riscv.h
|
||||
@REMOTE_ONLY_FALSE@am__append_16 = include/libunwind.h
|
||||
@BUILD_UNWIND_HEADER_TRUE@@REMOTE_ONLY_FALSE@am__append_17 = include/unwind.h
|
||||
@CONFIG_TESTS_TRUE@am__append_18 = tests
|
||||
@CONFIG_DOCS_TRUE@am__append_19 = doc
|
||||
@ARCH_LOONGARCH64_TRUE@am__append_16 = include/libunwind-loongarch64.h
|
||||
@REMOTE_ONLY_FALSE@am__append_17 = include/libunwind.h
|
||||
@BUILD_UNWIND_HEADER_TRUE@@REMOTE_ONLY_FALSE@am__append_18 = include/unwind.h
|
||||
@CONFIG_TESTS_TRUE@am__append_19 = tests
|
||||
@CONFIG_DOCS_TRUE@am__append_20 = doc
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
@ -155,13 +158,14 @@ am__can_run_installinfo = \
|
||||
esac
|
||||
am__include_HEADERS_DIST = include/libunwind-dynamic.h \
|
||||
include/libunwind-ptrace.h include/libunwind-coredump.h \
|
||||
include/libunwind-aarch64.h include/libunwind-arm.h \
|
||||
include/libunwind-ia64.h include/libunwind-hppa.h \
|
||||
include/libunwind-mips.h include/libunwind-tilegx.h \
|
||||
include/libunwind-nto.h include/libunwind-aarch64.h \
|
||||
include/libunwind-arm.h include/libunwind-ia64.h \
|
||||
include/libunwind-hppa.h include/libunwind-mips.h \
|
||||
include/libunwind-x86.h include/libunwind-x86_64.h \
|
||||
include/libunwind-ppc32.h include/libunwind-ppc64.h \
|
||||
include/libunwind-sh.h include/libunwind-s390x.h \
|
||||
include/libunwind-riscv.h include/libunwind.h include/unwind.h
|
||||
include/libunwind-riscv.h include/libunwind-loongarch64.h \
|
||||
include/libunwind.h include/unwind.h
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
@ -199,7 +203,7 @@ am__recursive_targets = \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
cscope distdir distdir-am dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
@ -217,9 +221,6 @@ am__define_uniq_tagged_files = \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DIST_SUBDIRS = src tests doc
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/ar-lib \
|
||||
$(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
|
||||
@ -274,6 +275,8 @@ am__relativize = \
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
# Exists only to be overridden by the user if desired.
|
||||
AM_DISTCHECK_DVI_TARGET = dvi
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
@ -294,8 +297,9 @@ CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
@ -311,6 +315,7 @@ ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
@ -356,11 +361,13 @@ PKG_EXTRA = @PKG_EXTRA@
|
||||
PKG_MAINTAINER = @PKG_MAINTAINER@
|
||||
PKG_MAJOR = @PKG_MAJOR@
|
||||
PKG_MINOR = @PKG_MINOR@
|
||||
PTHREADS_LIB = @PTHREADS_LIB@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
UNW_TESTDRIVER = @UNW_TESTDRIVER@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
@ -424,15 +431,16 @@ target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
include_HEADERS = include/libunwind-dynamic.h $(am__append_1) \
|
||||
$(am__append_2) $(am__append_3) $(am__append_4) \
|
||||
$(am__append_5) $(am__append_6) $(am__append_7) \
|
||||
$(am__append_8) $(am__append_9) $(am__append_10) \
|
||||
$(am__append_11) $(am__append_12) $(am__append_13) \
|
||||
$(am__append_14) $(am__append_15) $(am__append_16) \
|
||||
$(am__append_17)
|
||||
$(am__append_17) $(am__append_18)
|
||||
nodist_include_HEADERS = include/libunwind-common.h
|
||||
SUBDIRS = src $(am__append_18) $(am__append_19)
|
||||
SUBDIRS = src $(am__append_19) $(am__append_20)
|
||||
noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
|
||||
include/compiler.h include/libunwind_i.h include/mempool.h \
|
||||
include/remote.h \
|
||||
@ -447,8 +455,6 @@ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
|
||||
include/tdep-hppa/jmpbuf.h include/tdep-hppa/dwarf-config.h \
|
||||
include/tdep-mips/libunwind_i.h \
|
||||
include/tdep-mips/jmpbuf.h include/tdep-mips/dwarf-config.h \
|
||||
include/tdep-tilegx/libunwind_i.h \
|
||||
include/tdep-tilegx/jmpbuf.h include/tdep-tilegx/dwarf-config.h \
|
||||
include/tdep-x86/libunwind_i.h \
|
||||
include/tdep-x86/jmpbuf.h include/tdep-x86/dwarf-config.h \
|
||||
include/tdep-x86_64/libunwind_i.h \
|
||||
@ -463,6 +469,9 @@ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
|
||||
include/tdep-s390x/jmpbuf.h include/tdep-s390x/libunwind_i.h \
|
||||
include/tdep-riscv/dwarf-config.h \
|
||||
include/tdep-riscv/jmpbuf.h include/tdep-riscv/libunwind_i.h \
|
||||
include/tdep-loongarch64/dwarf-config.h \
|
||||
include/tdep-loongarch64/jmpbuf.h \
|
||||
include/tdep-loongarch64/libunwind_i.h \
|
||||
include/tdep/libunwind_i.h \
|
||||
include/tdep/jmpbuf.h include/tdep/dwarf-config.h
|
||||
|
||||
@ -506,8 +515,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
@ -704,8 +713,10 @@ cscopelist-am: $(am__tagged_files)
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
distdir-am: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
@ -785,6 +796,10 @@ dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zstd: distdir
|
||||
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@ -827,6 +842,8 @@ distcheck: dist
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
*.tar.zst*) \
|
||||
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
@ -842,7 +859,7 @@ distcheck: dist
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
@ -1008,19 +1025,19 @@ uninstall-am: uninstall-includeHEADERS uninstall-nodist_includeHEADERS
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-includeHEADERS \
|
||||
install-info install-info-am install-man \
|
||||
install-nodist_includeHEADERS install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-includeHEADERS \
|
||||
dist-xz dist-zip dist-zstd distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-includeHEADERS install-info install-info-am \
|
||||
install-man install-nodist_includeHEADERS install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-includeHEADERS \
|
||||
uninstall-nodist_includeHEADERS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
26
src/third_party/unwind/dist/NEWS
vendored
26
src/third_party/unwind/dist/NEWS
vendored
@ -28,11 +28,11 @@
|
||||
|
||||
* News for v1.0:
|
||||
|
||||
** Fast unwind (rbp, rsp, rip only) on x86_64 with a fallback to
|
||||
** Fast unwind (rbp, rsp, rip only) on x86_64 with a fallback to
|
||||
slow code path (Lassi Tuura)
|
||||
** Improved local and remote unwinding on ARM (Ken Werner)
|
||||
** Testing, stability and many fixes on x86 (Paul Pluzhnikov)
|
||||
** FreeBSD port and clean separation of OS specific bits
|
||||
** FreeBSD port and clean separation of OS specific bits
|
||||
(Konstantin Belousov)
|
||||
** Thanks for all the bug reports, contributions and testing!
|
||||
|
||||
@ -108,7 +108,7 @@
|
||||
* News for v0.98:
|
||||
|
||||
** Update libunwind to be compliant with the updated/expanded
|
||||
ia64 unwind specificiation by HJ Lu [1]. This is needed for
|
||||
ia64 unwind specification by HJ Lu [1]. This is needed for
|
||||
GCC 3.4 compatibility.
|
||||
|
||||
[1] http://www.kernel.org/pub/linux/devel/gcc/unwind/
|
||||
@ -116,7 +116,7 @@
|
||||
** Initial support for x86-64 has been added courtesy of Max Asbock.
|
||||
Along with this came a bunch of DWARF2 unwinder fixes.
|
||||
|
||||
** A new rountine unw_strerror() has been added courtesy of
|
||||
** A new routine unw_strerror() has been added courtesy of
|
||||
Thomas Hallgren.
|
||||
|
||||
** Including <libunwind.h> now defines 4 macros that can be used
|
||||
@ -188,40 +188,40 @@
|
||||
at IBM and it is expected that this support will be merged into the
|
||||
official tree soon.
|
||||
|
||||
|
||||
|
||||
* News for v0.96:
|
||||
|
||||
** _Unwind_*() routines defined by the C++ ABI are now included in
|
||||
libunwind.
|
||||
|
||||
|
||||
|
||||
* News for v0.95:
|
||||
|
||||
** Bigger, better, faster, or so the theory goes.
|
||||
|
||||
|
||||
|
||||
* News for v0.93:
|
||||
|
||||
** More bug-fixes & improved HP-UX support.
|
||||
|
||||
|
||||
|
||||
* News for v0.92:
|
||||
|
||||
** Bug-fix release. IA-64 unwinder can now be built with Intel compiler (ECC).
|
||||
|
||||
|
||||
|
||||
* News for v0.91:
|
||||
|
||||
** Lots of documentation updates
|
||||
** Some portability fixes.
|
||||
|
||||
|
||||
|
||||
* News for v0.9:
|
||||
|
||||
** The libunwind API is mostly feature-complete at this point (hence the
|
||||
version jump from v0.2 to v0.9).
|
||||
|
||||
|
||||
|
||||
* News for v0.2:
|
||||
|
||||
** Automated configuration/build with autoconf and automake.
|
||||
@ -236,12 +236,12 @@
|
||||
e.g., useful for building a debugger that can support multiple targets
|
||||
such as x86, ia64, etc.)
|
||||
|
||||
|
||||
|
||||
* News for v0.1:
|
||||
|
||||
** Added support for exception handling.
|
||||
|
||||
|
||||
|
||||
* News for v0.0:
|
||||
|
||||
** It's a brand new package.
|
||||
|
||||
63
src/third_party/unwind/dist/README
vendored
63
src/third_party/unwind/dist/README
vendored
@ -1,6 +1,7 @@
|
||||
# libunwind
|
||||
|
||||
[](https://travis-ci.org/libunwind/libunwind)
|
||||
[](https://github.com/libunwind/libunwind/actions/workflows/CI-unix.yml)
|
||||
[](https://github.com/libunwind/libunwind/actions/workflows/CI-win.yml)
|
||||
|
||||
This library supports several architecture/operating-system combinations:
|
||||
|
||||
@ -15,13 +16,17 @@ This library supports several architecture/operating-system combinations:
|
||||
| Linux | SuperH | ✓ |
|
||||
| Linux | IA-64 | ✓ |
|
||||
| Linux | PARISC | Works well, but C library missing unwind-info |
|
||||
| Linux | Tilegx | 64-bit mode only |
|
||||
| Linux | MIPS | Newly added |
|
||||
| Linux | MIPS | ✓ |
|
||||
| Linux | RISC-V | 64-bit only |
|
||||
| Linux | LoongArch | 64-bit only |
|
||||
| HP-UX | IA-64 | Mostly works, but known to have serious limitations |
|
||||
| FreeBSD | x86-64 | ✓ |
|
||||
| FreeBSD | x86 | ✓ |
|
||||
| FreeBSD | AArch64 | ✓ |
|
||||
| FreeBSD | PPC32 | ✓ |
|
||||
| FreeBSD | PPC64 | ✓ |
|
||||
| QNX | Aarch64 | ✓ |
|
||||
| QNX | x86-64 | ✓ |
|
||||
| Solaris | x86-64 | ✓ |
|
||||
|
||||
## Libc Requirements
|
||||
@ -41,13 +46,13 @@ such dependencies
|
||||
| arm | p | |
|
||||
| hppa | p | p |
|
||||
| ia64 | p | r |
|
||||
| loongarch | p | |
|
||||
| mips | p | |
|
||||
| ppc32 | r | |
|
||||
| ppc64 | r | r |
|
||||
| riscv | p | p |
|
||||
| s390x | p | p |
|
||||
| sh | r | |
|
||||
| tilegx | r | r |
|
||||
| x86 | p | r |
|
||||
| x86_64 | p | p |
|
||||
|
||||
@ -57,9 +62,9 @@ In general, this library can be built and installed with the following
|
||||
commands:
|
||||
|
||||
$ autoreconf -i # Needed only for building from git. Depends on libtool.
|
||||
$ ./configure
|
||||
$ ./configure --prefix=PREFIX
|
||||
$ make
|
||||
$ make install prefix=PREFIX
|
||||
$ make install
|
||||
|
||||
where `PREFIX` is the installation prefix. By default, a prefix of
|
||||
`/usr/local` is used, such that `libunwind.a` is installed in
|
||||
@ -89,18 +94,6 @@ libunwind should be configured and installed on HP-UX like this:
|
||||
|
||||
Caveat: Unwinding of 32-bit (ILP32) binaries is not supported at the moment.
|
||||
|
||||
### Workaround for older versions of GCC
|
||||
|
||||
GCC v3.0 and GCC v3.2 ship with a bad version of `sys/types.h`. The
|
||||
workaround is to issue the following commands before running
|
||||
`configure`:
|
||||
|
||||
$ mkdir $top_dir/include/sys
|
||||
$ cp /usr/include/sys/types.h $top_dir/include/sys
|
||||
|
||||
GCC v3.3.2 or later have been fixed and do not require this
|
||||
workaround.
|
||||
|
||||
### Building for PowerPC64 / Linux
|
||||
|
||||
For building for power64 you should use:
|
||||
@ -136,27 +129,6 @@ After building the library, you can run a set of regression tests with:
|
||||
|
||||
$ make check
|
||||
|
||||
### Expected results on IA-64 Linux
|
||||
|
||||
Unless you have a very recent C library and compiler installed, it is
|
||||
currently expected to have the following tests fail on IA-64 Linux:
|
||||
|
||||
* `Gtest-init` (should pass starting with glibc-2.3.x/gcc-3.4)
|
||||
* `Ltest-init` (should pass starting with glibc-2.3.x/gcc-3.4)
|
||||
* `test-ptrace` (should pass starting with glibc-2.3.x/gcc-3.4)
|
||||
* `run-ia64-test-dyn1` (should pass starting with glibc-2.3.x)
|
||||
|
||||
This does not mean that libunwind cannot be used with older compilers
|
||||
or C libraries, it just means that for certain corner cases, unwinding
|
||||
will fail. Since they're corner cases, it is not likely for
|
||||
applications to trigger them.
|
||||
|
||||
Note: If you get lots of errors in `Gia64-test-nat` and `Lia64-test-nat`, it's
|
||||
almost certainly a sign of an old assembler. The GNU assembler used
|
||||
to encode previous-stack-pointer-relative offsets incorrectly.
|
||||
This bug was fixed on 21-Sep-2004 so any later assembler will be
|
||||
fine.
|
||||
|
||||
### Expected results on x86 Linux
|
||||
|
||||
The following tests are expected to fail on x86 Linux:
|
||||
@ -172,10 +144,6 @@ The following tests are expected to fail on x86-64 Linux:
|
||||
|
||||
### Expected results on PARISC Linux
|
||||
|
||||
Caveat: GCC v3.4 or newer is needed on PA-RISC Linux. Earlier
|
||||
versions of the compiler failed to generate the exception-handling
|
||||
program header (`GNU_EH_FRAME`) needed for unwinding.
|
||||
|
||||
The following tests are expected to fail on x86-64 Linux:
|
||||
|
||||
* `Gtest-bt` (backtrace truncated at `kill()` due to lack of unwind-info)
|
||||
@ -232,10 +200,5 @@ commands:
|
||||
|
||||
## Contacting the Developers
|
||||
|
||||
Please direct all questions regarding this library to <libunwind-devel@nongnu.org>.
|
||||
|
||||
You can do this by sending an email to <libunwind-request@nongnu.org> with
|
||||
a body of "subscribe libunwind-devel", or you can subscribe and manage your
|
||||
subscription via the web-interface at <https://savannah.nongnu.org/mail/?group=libunwind>.
|
||||
|
||||
You can also interact on our GitHub page: <https://github.com/libunwind/libunwind>.
|
||||
Please raise issues and pull requests through the GitHub repository:
|
||||
<https://github.com/libunwind/libunwind>.
|
||||
|
||||
1
src/third_party/unwind/dist/acinclude.m4
vendored
1
src/third_party/unwind/dist/acinclude.m4
vendored
@ -1 +0,0 @@
|
||||
|
||||
9283
src/third_party/unwind/dist/aclocal.m4
vendored
9283
src/third_party/unwind/dist/aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
19
src/third_party/unwind/dist/config/ar-lib
vendored
19
src/third_party/unwind/dist/config/ar-lib
vendored
@ -2,9 +2,9 @@
|
||||
# Wrapper for Microsoft lib.exe
|
||||
|
||||
me=ar-lib
|
||||
scriptversion=2012-03-01.08; # UTC
|
||||
scriptversion=2019-07-04.01; # UTC
|
||||
|
||||
# Copyright (C) 2010-2017 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2010-2021 Free Software Foundation, Inc.
|
||||
# Written by Peter Rosin <peda@lysator.liu.se>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@ -18,7 +18,7 @@ scriptversion=2012-03-01.08; # UTC
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@ -53,7 +53,7 @@ func_file_conv ()
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
CYGWIN* | MSYS*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
@ -65,7 +65,7 @@ func_file_conv ()
|
||||
mingw)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin)
|
||||
cygwin | msys)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine)
|
||||
@ -224,10 +224,11 @@ elif test -n "$extract"; then
|
||||
esac
|
||||
done
|
||||
else
|
||||
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
$AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
|
||||
| while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
fi
|
||||
|
||||
elif test -n "$quick$replace"; then
|
||||
|
||||
17
src/third_party/unwind/dist/config/compile
vendored
17
src/third_party/unwind/dist/config/compile
vendored
@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@ -53,7 +53,7 @@ func_file_conv ()
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
CYGWIN* | MSYS*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
@ -67,7 +67,7 @@ func_file_conv ()
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
cygwin/* | msys/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
@ -255,7 +255,8 @@ EOF
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
@ -339,9 +340,9 @@ exit $ret
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
1500
src/third_party/unwind/dist/config/config.guess
vendored
1500
src/third_party/unwind/dist/config/config.guess
vendored
File diff suppressed because it is too large
Load Diff
2855
src/third_party/unwind/dist/config/config.sub
vendored
2855
src/third_party/unwind/dist/config/config.sub
vendored
File diff suppressed because it is too large
Load Diff
8
src/third_party/unwind/dist/config/depcomp
vendored
8
src/third_party/unwind/dist/config/depcomp
vendored
@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2016-01-11.22; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -16,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@ -783,7 +783,7 @@ exit 0
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
|
||||
179
src/third_party/unwind/dist/config/install-sh
vendored
179
src/third_party/unwind/dist/config/install-sh
vendored
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2014-09-12.12; # UTC
|
||||
scriptversion=2020-11-14.01; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
@ -69,6 +69,11 @@ posix_mkdir=
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
@ -99,18 +104,28 @@ Options:
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-C install only if different (preserve data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
|
||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
||||
it's up to you to specify -f if you want it.
|
||||
|
||||
If -S is not specified, no backups are attempted.
|
||||
|
||||
Email bug reports to bug-automake@gnu.org.
|
||||
Automake home page: https://www.gnu.org/software/automake/
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
@ -137,8 +152,13 @@ while test $# -ne 0; do
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
@ -255,6 +275,10 @@ do
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
@ -271,15 +295,18 @@ do
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
@ -288,27 +315,16 @@ do
|
||||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
@ -318,50 +334,49 @@ do
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
# $RANDOM is not portable (e.g. dash); use it when possible to
|
||||
# lower collision chance
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
# As "mkdir -p" follows symlinks and we work in /tmp possibly; so
|
||||
# create the $tmpdir first (and fail if unsuccessful) to make sure
|
||||
# that nobody tries to guess the $tmpdir name.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
trap '
|
||||
ret=$?
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
|
||||
exit $ret
|
||||
' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p'.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac
|
||||
|
||||
if
|
||||
@ -372,7 +387,7 @@ do
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
@ -401,7 +416,7 @@ do
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
(umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
@ -434,14 +449,25 @@ do
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
(umask $cp_umask &&
|
||||
{ test -z "$stripcmd" || {
|
||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
||||
# which would cause strip to fail.
|
||||
if test -z "$doit"; then
|
||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
||||
else
|
||||
$doit touch "$dsttmp"
|
||||
fi
|
||||
}
|
||||
} &&
|
||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
@ -467,6 +493,13 @@ do
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# If $backupsuffix is set, and the file being installed
|
||||
# already exists, attempt a backup. Don't worry if it fails,
|
||||
# e.g., if mv doesn't support -f.
|
||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
@ -481,9 +514,9 @@ do
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
@ -500,9 +533,9 @@ do
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
217
src/third_party/unwind/dist/config/ltmain.sh
vendored
Normal file → Executable file
217
src/third_party/unwind/dist/config/ltmain.sh
vendored
Normal file → Executable file
@ -31,7 +31,7 @@
|
||||
|
||||
PROGRAM=libtool
|
||||
PACKAGE=libtool
|
||||
VERSION="2.4.6 Debian-2.4.6-2"
|
||||
VERSION="2.4.6 Debian-2.4.6-15build2"
|
||||
package_revision=2.4.6
|
||||
|
||||
|
||||
@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
|
||||
# putting '$debug_cmd' at the start of all your functions, you can get
|
||||
# bash to show function call trace with:
|
||||
#
|
||||
# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
|
||||
# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
|
||||
debug_cmd=${debug_cmd-":"}
|
||||
exit_cmd=:
|
||||
|
||||
@ -1370,7 +1370,7 @@ func_lt_ver ()
|
||||
#! /bin/sh
|
||||
|
||||
# Set a version string for this script.
|
||||
scriptversion=2014-01-07.03; # UTC
|
||||
scriptversion=2015-10-07.11; # UTC
|
||||
|
||||
# A portable, pluggable option parser for Bourne shell.
|
||||
# Written by Gary V. Vaughan, 2010
|
||||
@ -1530,6 +1530,8 @@ func_run_hooks ()
|
||||
{
|
||||
$debug_cmd
|
||||
|
||||
_G_rc_run_hooks=false
|
||||
|
||||
case " $hookable_fns " in
|
||||
*" $1 "*) ;;
|
||||
*) func_fatal_error "'$1' does not support hook funcions.n" ;;
|
||||
@ -1538,16 +1540,16 @@ func_run_hooks ()
|
||||
eval _G_hook_fns=\$$1_hooks; shift
|
||||
|
||||
for _G_hook in $_G_hook_fns; do
|
||||
eval $_G_hook '"$@"'
|
||||
|
||||
# store returned options list back into positional
|
||||
# parameters for next 'cmd' execution.
|
||||
eval _G_hook_result=\$${_G_hook}_result
|
||||
eval set dummy "$_G_hook_result"; shift
|
||||
if eval $_G_hook '"$@"'; then
|
||||
# store returned options list back into positional
|
||||
# parameters for next 'cmd' execution.
|
||||
eval _G_hook_result=\$${_G_hook}_result
|
||||
eval set dummy "$_G_hook_result"; shift
|
||||
_G_rc_run_hooks=:
|
||||
fi
|
||||
done
|
||||
|
||||
func_quote_for_eval ${1+"$@"}
|
||||
func_run_hooks_result=$func_quote_for_eval_result
|
||||
$_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
|
||||
}
|
||||
|
||||
|
||||
@ -1557,10 +1559,16 @@ func_run_hooks ()
|
||||
## --------------- ##
|
||||
|
||||
# In order to add your own option parsing hooks, you must accept the
|
||||
# full positional parameter list in your hook function, remove any
|
||||
# options that you action, and then pass back the remaining unprocessed
|
||||
# full positional parameter list in your hook function, you may remove/edit
|
||||
# any options that you action, and then pass back the remaining unprocessed
|
||||
# options in '<hooked_function_name>_result', escaped suitably for
|
||||
# 'eval'. Like this:
|
||||
# 'eval'. In this case you also must return $EXIT_SUCCESS to let the
|
||||
# hook's caller know that it should pay attention to
|
||||
# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
|
||||
# arguments are left untouched by the hook and therefore caller will ignore the
|
||||
# result variable.
|
||||
#
|
||||
# Like this:
|
||||
#
|
||||
# my_options_prep ()
|
||||
# {
|
||||
@ -1570,9 +1578,11 @@ func_run_hooks ()
|
||||
# usage_message=$usage_message'
|
||||
# -s, --silent don'\''t print informational messages
|
||||
# '
|
||||
#
|
||||
# func_quote_for_eval ${1+"$@"}
|
||||
# my_options_prep_result=$func_quote_for_eval_result
|
||||
# # No change in '$@' (ignored completely by this hook). There is
|
||||
# # no need to do the equivalent (but slower) action:
|
||||
# # func_quote_for_eval ${1+"$@"}
|
||||
# # my_options_prep_result=$func_quote_for_eval_result
|
||||
# false
|
||||
# }
|
||||
# func_add_hook func_options_prep my_options_prep
|
||||
#
|
||||
@ -1581,25 +1591,37 @@ func_run_hooks ()
|
||||
# {
|
||||
# $debug_cmd
|
||||
#
|
||||
# args_changed=false
|
||||
#
|
||||
# # Note that for efficiency, we parse as many options as we can
|
||||
# # recognise in a loop before passing the remainder back to the
|
||||
# # caller on the first unrecognised argument we encounter.
|
||||
# while test $# -gt 0; do
|
||||
# opt=$1; shift
|
||||
# case $opt in
|
||||
# --silent|-s) opt_silent=: ;;
|
||||
# --silent|-s) opt_silent=:
|
||||
# args_changed=:
|
||||
# ;;
|
||||
# # Separate non-argument short options:
|
||||
# -s*) func_split_short_opt "$_G_opt"
|
||||
# set dummy "$func_split_short_opt_name" \
|
||||
# "-$func_split_short_opt_arg" ${1+"$@"}
|
||||
# shift
|
||||
# args_changed=:
|
||||
# ;;
|
||||
# *) set dummy "$_G_opt" "$*"; shift; break ;;
|
||||
# *) # Make sure the first unrecognised option "$_G_opt"
|
||||
# # is added back to "$@", we could need that later
|
||||
# # if $args_changed is true.
|
||||
# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
|
||||
# esac
|
||||
# done
|
||||
#
|
||||
# func_quote_for_eval ${1+"$@"}
|
||||
# my_silent_option_result=$func_quote_for_eval_result
|
||||
# if $args_changed; then
|
||||
# func_quote_for_eval ${1+"$@"}
|
||||
# my_silent_option_result=$func_quote_for_eval_result
|
||||
# fi
|
||||
#
|
||||
# $args_changed
|
||||
# }
|
||||
# func_add_hook func_parse_options my_silent_option
|
||||
#
|
||||
@ -1611,16 +1633,32 @@ func_run_hooks ()
|
||||
# $opt_silent && $opt_verbose && func_fatal_help "\
|
||||
# '--silent' and '--verbose' options are mutually exclusive."
|
||||
#
|
||||
# func_quote_for_eval ${1+"$@"}
|
||||
# my_option_validation_result=$func_quote_for_eval_result
|
||||
# false
|
||||
# }
|
||||
# func_add_hook func_validate_options my_option_validation
|
||||
#
|
||||
# You'll alse need to manually amend $usage_message to reflect the extra
|
||||
# You'll also need to manually amend $usage_message to reflect the extra
|
||||
# options you parse. It's preferable to append if you can, so that
|
||||
# multiple option parsing hooks can be added safely.
|
||||
|
||||
|
||||
# func_options_finish [ARG]...
|
||||
# ----------------------------
|
||||
# Finishing the option parse loop (call 'func_options' hooks ATM).
|
||||
func_options_finish ()
|
||||
{
|
||||
$debug_cmd
|
||||
|
||||
_G_func_options_finish_exit=false
|
||||
if func_run_hooks func_options ${1+"$@"}; then
|
||||
func_options_finish_result=$func_run_hooks_result
|
||||
_G_func_options_finish_exit=:
|
||||
fi
|
||||
|
||||
$_G_func_options_finish_exit
|
||||
}
|
||||
|
||||
|
||||
# func_options [ARG]...
|
||||
# ---------------------
|
||||
# All the functions called inside func_options are hookable. See the
|
||||
@ -1630,17 +1668,28 @@ func_options ()
|
||||
{
|
||||
$debug_cmd
|
||||
|
||||
func_options_prep ${1+"$@"}
|
||||
eval func_parse_options \
|
||||
${func_options_prep_result+"$func_options_prep_result"}
|
||||
eval func_validate_options \
|
||||
${func_parse_options_result+"$func_parse_options_result"}
|
||||
_G_rc_options=false
|
||||
|
||||
eval func_run_hooks func_options \
|
||||
${func_validate_options_result+"$func_validate_options_result"}
|
||||
for my_func in options_prep parse_options validate_options options_finish
|
||||
do
|
||||
if eval func_$my_func '${1+"$@"}'; then
|
||||
eval _G_res_var='$'"func_${my_func}_result"
|
||||
eval set dummy "$_G_res_var" ; shift
|
||||
_G_rc_options=:
|
||||
fi
|
||||
done
|
||||
|
||||
# save modified positional parameters for caller
|
||||
func_options_result=$func_run_hooks_result
|
||||
# Save modified positional parameters for caller. As a top-level
|
||||
# options-parser function we always need to set the 'func_options_result'
|
||||
# variable (regardless the $_G_rc_options value).
|
||||
if $_G_rc_options; then
|
||||
func_options_result=$_G_res_var
|
||||
else
|
||||
func_quote_for_eval ${1+"$@"}
|
||||
func_options_result=$func_quote_for_eval_result
|
||||
fi
|
||||
|
||||
$_G_rc_options
|
||||
}
|
||||
|
||||
|
||||
@ -1649,9 +1698,9 @@ func_options ()
|
||||
# All initialisations required before starting the option parse loop.
|
||||
# Note that when calling hook functions, we pass through the list of
|
||||
# positional parameters. If a hook function modifies that list, and
|
||||
# needs to propogate that back to rest of this script, then the complete
|
||||
# needs to propagate that back to rest of this script, then the complete
|
||||
# modified list must be put in 'func_run_hooks_result' before
|
||||
# returning.
|
||||
# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
|
||||
func_hookable func_options_prep
|
||||
func_options_prep ()
|
||||
{
|
||||
@ -1661,10 +1710,14 @@ func_options_prep ()
|
||||
opt_verbose=false
|
||||
opt_warning_types=
|
||||
|
||||
func_run_hooks func_options_prep ${1+"$@"}
|
||||
_G_rc_options_prep=false
|
||||
if func_run_hooks func_options_prep ${1+"$@"}; then
|
||||
_G_rc_options_prep=:
|
||||
# save modified positional parameters for caller
|
||||
func_options_prep_result=$func_run_hooks_result
|
||||
fi
|
||||
|
||||
# save modified positional parameters for caller
|
||||
func_options_prep_result=$func_run_hooks_result
|
||||
$_G_rc_options_prep
|
||||
}
|
||||
|
||||
|
||||
@ -1678,18 +1731,20 @@ func_parse_options ()
|
||||
|
||||
func_parse_options_result=
|
||||
|
||||
_G_rc_parse_options=false
|
||||
# this just eases exit handling
|
||||
while test $# -gt 0; do
|
||||
# Defer to hook functions for initial option parsing, so they
|
||||
# get priority in the event of reusing an option name.
|
||||
func_run_hooks func_parse_options ${1+"$@"}
|
||||
|
||||
# Adjust func_parse_options positional parameters to match
|
||||
eval set dummy "$func_run_hooks_result"; shift
|
||||
if func_run_hooks func_parse_options ${1+"$@"}; then
|
||||
eval set dummy "$func_run_hooks_result"; shift
|
||||
_G_rc_parse_options=:
|
||||
fi
|
||||
|
||||
# Break out of the loop if we already parsed every option.
|
||||
test $# -gt 0 || break
|
||||
|
||||
_G_match_parse_options=:
|
||||
_G_opt=$1
|
||||
shift
|
||||
case $_G_opt in
|
||||
@ -1704,7 +1759,10 @@ func_parse_options ()
|
||||
;;
|
||||
|
||||
--warnings|--warning|-W)
|
||||
test $# = 0 && func_missing_arg $_G_opt && break
|
||||
if test $# = 0 && func_missing_arg $_G_opt; then
|
||||
_G_rc_parse_options=:
|
||||
break
|
||||
fi
|
||||
case " $warning_categories $1" in
|
||||
*" $1 "*)
|
||||
# trailing space prevents matching last $1 above
|
||||
@ -1757,15 +1815,25 @@ func_parse_options ()
|
||||
shift
|
||||
;;
|
||||
|
||||
--) break ;;
|
||||
--) _G_rc_parse_options=: ; break ;;
|
||||
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
|
||||
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
|
||||
*) set dummy "$_G_opt" ${1+"$@"}; shift
|
||||
_G_match_parse_options=false
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
$_G_match_parse_options && _G_rc_parse_options=:
|
||||
done
|
||||
|
||||
# save modified positional parameters for caller
|
||||
func_quote_for_eval ${1+"$@"}
|
||||
func_parse_options_result=$func_quote_for_eval_result
|
||||
|
||||
if $_G_rc_parse_options; then
|
||||
# save modified positional parameters for caller
|
||||
func_quote_for_eval ${1+"$@"}
|
||||
func_parse_options_result=$func_quote_for_eval_result
|
||||
fi
|
||||
|
||||
$_G_rc_parse_options
|
||||
}
|
||||
|
||||
|
||||
@ -1778,16 +1846,21 @@ func_validate_options ()
|
||||
{
|
||||
$debug_cmd
|
||||
|
||||
_G_rc_validate_options=false
|
||||
|
||||
# Display all warnings if -W was not given.
|
||||
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
|
||||
|
||||
func_run_hooks func_validate_options ${1+"$@"}
|
||||
if func_run_hooks func_validate_options ${1+"$@"}; then
|
||||
# save modified positional parameters for caller
|
||||
func_validate_options_result=$func_run_hooks_result
|
||||
_G_rc_validate_options=:
|
||||
fi
|
||||
|
||||
# Bail if the options were screwed!
|
||||
$exit_cmd $EXIT_FAILURE
|
||||
|
||||
# save modified positional parameters for caller
|
||||
func_validate_options_result=$func_run_hooks_result
|
||||
$_G_rc_validate_options
|
||||
}
|
||||
|
||||
|
||||
@ -2068,7 +2141,7 @@ include the following information:
|
||||
compiler: $LTCC
|
||||
compiler flags: $LTCFLAGS
|
||||
linker: $LD (gnu? $with_gnu_ld)
|
||||
version: $progname $scriptversion Debian-2.4.6-2
|
||||
version: $progname $scriptversion Debian-2.4.6-15build2
|
||||
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
|
||||
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
|
||||
|
||||
@ -2270,6 +2343,8 @@ libtool_options_prep ()
|
||||
nonopt=
|
||||
preserve_args=
|
||||
|
||||
_G_rc_lt_options_prep=:
|
||||
|
||||
# Shorthand for --mode=foo, only valid as the first argument
|
||||
case $1 in
|
||||
clean|clea|cle|cl)
|
||||
@ -2293,11 +2368,18 @@ libtool_options_prep ()
|
||||
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
|
||||
shift; set dummy --mode uninstall ${1+"$@"}; shift
|
||||
;;
|
||||
*)
|
||||
_G_rc_lt_options_prep=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# Pass back the list of options.
|
||||
func_quote_for_eval ${1+"$@"}
|
||||
libtool_options_prep_result=$func_quote_for_eval_result
|
||||
if $_G_rc_lt_options_prep; then
|
||||
# Pass back the list of options.
|
||||
func_quote_for_eval ${1+"$@"}
|
||||
libtool_options_prep_result=$func_quote_for_eval_result
|
||||
fi
|
||||
|
||||
$_G_rc_lt_options_prep
|
||||
}
|
||||
func_add_hook func_options_prep libtool_options_prep
|
||||
|
||||
@ -2309,9 +2391,12 @@ libtool_parse_options ()
|
||||
{
|
||||
$debug_cmd
|
||||
|
||||
_G_rc_lt_parse_options=false
|
||||
|
||||
# Perform our own loop to consume as many options as possible in
|
||||
# each iteration.
|
||||
while test $# -gt 0; do
|
||||
_G_match_lt_parse_options=:
|
||||
_G_opt=$1
|
||||
shift
|
||||
case $_G_opt in
|
||||
@ -2386,15 +2471,22 @@ libtool_parse_options ()
|
||||
func_append preserve_args " $_G_opt"
|
||||
;;
|
||||
|
||||
# An option not handled by this hook function:
|
||||
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
|
||||
# An option not handled by this hook function:
|
||||
*) set dummy "$_G_opt" ${1+"$@"} ; shift
|
||||
_G_match_lt_parse_options=false
|
||||
break
|
||||
;;
|
||||
esac
|
||||
$_G_match_lt_parse_options && _G_rc_lt_parse_options=:
|
||||
done
|
||||
|
||||
if $_G_rc_lt_parse_options; then
|
||||
# save modified positional parameters for caller
|
||||
func_quote_for_eval ${1+"$@"}
|
||||
libtool_parse_options_result=$func_quote_for_eval_result
|
||||
fi
|
||||
|
||||
# save modified positional parameters for caller
|
||||
func_quote_for_eval ${1+"$@"}
|
||||
libtool_parse_options_result=$func_quote_for_eval_result
|
||||
$_G_rc_lt_parse_options
|
||||
}
|
||||
func_add_hook func_parse_options libtool_parse_options
|
||||
|
||||
@ -7275,10 +7367,13 @@ func_mode_link ()
|
||||
# -specs=* GCC specs files
|
||||
# -stdlib=* select c++ std lib with clang
|
||||
# -fsanitize=* Clang/GCC memory and address sanitizer
|
||||
# -fuse-ld=* Linker select flags for GCC
|
||||
# -static-* direct GCC to link specific libraries statically
|
||||
# -fcilkplus Cilk Plus language extension features for C/C++
|
||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
||||
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
|
||||
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
|
||||
-specs=*|-fsanitize=*)
|
||||
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
|
||||
func_quote_for_eval "$arg"
|
||||
arg=$func_quote_for_eval_result
|
||||
func_append compile_command " $arg"
|
||||
|
||||
16
src/third_party/unwind/dist/config/missing
vendored
16
src/third_party/unwind/dist/config/missing
vendored
@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@ -101,9 +101,9 @@ else
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
perl_URL=https://www.perl.org/
|
||||
flex_URL=https://github.com/westes/flex
|
||||
gnu_software_URL=https://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
27
src/third_party/unwind/dist/config/test-driver
vendored
27
src/third_party/unwind/dist/config/test-driver
vendored
@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2013-07-13.22; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2011-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -16,7 +16,7 @@ scriptversion=2013-07-13.22; # UTC
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@ -42,11 +42,13 @@ print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--]
|
||||
test-driver --test-name NAME --log-file PATH --trs-file PATH
|
||||
[--expect-failure {yes|no}] [--color-tests {yes|no}]
|
||||
[--enable-hard-errors {yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
See the GNU Automake documentation for information.
|
||||
END
|
||||
}
|
||||
|
||||
@ -103,8 +105,11 @@ trap "st=130; $do_exit" 2
|
||||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
# Test script is run here. We create the file first, then append to it,
|
||||
# to ameliorate tests themselves also writing to the log file. Our tests
|
||||
# don't, but others can (automake bug#35762).
|
||||
: >"$log_file"
|
||||
"$@" >>"$log_file" 2>&1
|
||||
estatus=$?
|
||||
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
@ -126,7 +131,7 @@ esac
|
||||
# know whether the test passed or failed simply by looking at the '.log'
|
||||
# file, without the need of also peaking into the corresponding '.trs'
|
||||
# file (automake bug#11814).
|
||||
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
||||
echo "$res $test_name (exit status: $estatus)" >>"$log_file"
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
@ -140,9 +145,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
8777
src/third_party/unwind/dist/configure
vendored
8777
src/third_party/unwind/dist/configure
vendored
File diff suppressed because it is too large
Load Diff
431
src/third_party/unwind/dist/configure.ac
vendored
431
src/third_party/unwind/dist/configure.ac
vendored
@ -1,14 +1,42 @@
|
||||
#
|
||||
# configure.ac
|
||||
#
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_COPYRIGHT([
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
])
|
||||
|
||||
|
||||
define(pkg_major, 1)
|
||||
define(pkg_minor, 6)
|
||||
define(pkg_extra, 2)
|
||||
define(pkg_maintainer, libunwind-devel@nongnu.org)
|
||||
define(pkg_minor, 8)
|
||||
define(pkg_extra, 1)
|
||||
define(pkg_maintainer, https://github.com/libunwind/libunwind)
|
||||
define(mkvers, $1.$2.$3)
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT([libunwind],[mkvers(pkg_major, pkg_minor, pkg_extra)],[pkg_maintainer])
|
||||
AC_CONFIG_SRCDIR(src/mi/backtrace.c)
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AC_CONFIG_MACRO_DIRS([m4])
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE([1.6 subdir-objects])
|
||||
AM_INIT_AUTOMAKE([1.7 subdir-objects -Wall])
|
||||
AM_SILENT_RULES([yes])
|
||||
AM_MAINTAINER_MODE
|
||||
AC_CONFIG_HEADERS([include/config.h])
|
||||
|
||||
@ -22,54 +50,48 @@ LT_INIT
|
||||
AM_PROG_AS
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
dnl Checks for libraries.
|
||||
AC_CHECK_LIB(uca, __uc_get_grs)
|
||||
OLD_LIBS=${LIBS}
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
LIBS=${OLD_LIBS}
|
||||
case "$ac_cv_search_dlopen" in
|
||||
-l*) DLLIB=$ac_cv_search_dlopen;;
|
||||
*) DLLIB="";;
|
||||
esac
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(asm/ptrace_offsets.h asm/ptrace.h endian.h sys/endian.h sys/param.h \
|
||||
execinfo.h ia64intrin.h sys/uc_access.h unistd.h signal.h sys/types.h \
|
||||
sys/procfs.h sys/ptrace.h sys/syscall.h byteswap.h elf.h sys/elf.h \
|
||||
link.h sys/link.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_CHECK_SIZEOF(off_t)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_MSG_NOTICE([--- Checking for header files ---])
|
||||
AC_CHECK_HEADERS(asm/ptrace_offsets.h asm/ptrace.h asm/vsyscall.h endian.h sys/endian.h \
|
||||
sys/param.h execinfo.h ia64intrin.h sys/uc_access.h unistd.h signal.h \
|
||||
sys/types.h sys/procfs.h sys/ptrace.h sys/syscall.h byteswap.h elf.h \
|
||||
sys/elf.h link.h sys/link.h)
|
||||
|
||||
CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
|
||||
|
||||
AC_MSG_NOTICE([--- Checking for available types ---])
|
||||
AC_CHECK_MEMBERS([struct dl_phdr_info.dlpi_subs],,,[#include <link.h>])
|
||||
AC_CHECK_TYPES([struct elf_prstatus, struct prstatus], [], [],
|
||||
AC_CHECK_TYPES([struct elf_prstatus, struct prstatus, procfs_status, elf_fpregset_t], [], [],
|
||||
[$ac_includes_default
|
||||
#if HAVE_SYS_PROCFS_H
|
||||
# include <sys/procfs.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_CHECK_DECLS([PTRACE_POKEUSER, PTRACE_POKEDATA, PTRACE_SETREGSET,
|
||||
PTRACE_TRACEME, PTRACE_CONT, PTRACE_SINGLESTEP,
|
||||
PTRACE_SYSCALL, PT_IO, PT_GETREGS,
|
||||
PT_GETFPREGS, PT_CONTINUE, PT_TRACE_ME,
|
||||
PT_STEP, PT_SYSCALL], [], [],
|
||||
[$ac_includes_default
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ptrace.h>
|
||||
])
|
||||
dnl Checks for libraries.
|
||||
AC_MSG_NOTICE([--- Checking for libraries ---])
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
LDFLAGS="${LDFLAGS} -nostdlib"
|
||||
AC_SEARCH_LIBS([_Unwind_Resume], [gcc_s gcc],
|
||||
[AS_IF([test "$ac_cv_search__Unwind_Resume" != "none required"],
|
||||
[AC_SUBST([LIBCRTS], ["$ac_cv_search__Unwind_Resume"])])],
|
||||
[],
|
||||
[-lc]
|
||||
)
|
||||
LIBS="$save_LIBS"
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
AC_SEARCH_LIBS([__uc_get_grs], [uca])
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(dl_iterate_phdr dl_phdr_removals_counter dlmodinfo getunwind \
|
||||
ttrace mincore pipe2)
|
||||
ttrace mincore pipe2 sigaltstack execvpe)
|
||||
|
||||
AC_MSG_CHECKING([if building with AltiVec])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
@ -96,8 +118,8 @@ AC_DEFUN([SET_ARCH],[
|
||||
[powerpc*],[$2=ppc$ppc_bits],
|
||||
[sh*],[$2=sh],
|
||||
[amd64],[$2=x86_64],
|
||||
[tile*],[$2=tilegx],
|
||||
[riscv*],[$2=riscv],
|
||||
[loongarch64*],[$2=loongarch64],
|
||||
[$2=$1])
|
||||
]) dnl SET_ARCH
|
||||
|
||||
@ -105,61 +127,213 @@ SET_ARCH([$build_cpu],[build_arch])
|
||||
SET_ARCH([$host_cpu],[host_arch])
|
||||
SET_ARCH([$target_cpu],[target_arch])
|
||||
|
||||
# Check for Android
|
||||
AC_MSG_CHECKING([for Android])
|
||||
android="no"
|
||||
case "$host_os" in
|
||||
*android*)
|
||||
android="yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(coredump,
|
||||
AS_HELP_STRING([--enable-coredump],[building libunwind-coredump library]),,
|
||||
[AS_CASE([$host_arch], [aarch64*|arm*|mips*|sh*|x86*|tile*|riscv*], [enable_coredump=yes], [enable_coredump=no])]
|
||||
AC_MSG_CHECKING([if libunwind-coredump should be built])
|
||||
AC_ARG_ENABLE([coredump],
|
||||
[AS_HELP_STRING([--enable-coredump],
|
||||
[build libunwind-coredump library
|
||||
@<:@default=autodetect@:>@])],
|
||||
[],
|
||||
[enable_coredump="check"]
|
||||
)
|
||||
AS_IF([test "$enable_coredump" = "check"],
|
||||
[AS_CASE([$host_arch],
|
||||
[aarch64*|arm*|mips*|sh*|x86*|riscv*|loongarch64], [enable_coredump=yes],
|
||||
[enable_coredump=no])]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([if we should build libunwind-coredump])
|
||||
AC_MSG_RESULT([$enable_coredump])
|
||||
AM_CONDITIONAL(BUILD_COREDUMP, test x$enable_coredump = xyes)
|
||||
|
||||
AC_ARG_ENABLE(ptrace,
|
||||
AS_HELP_STRING([--enable-ptrace],[building libunwind-ptrace library]),,
|
||||
[AC_CHECK_HEADER([sys/ptrace.h], [enable_ptrace=yes], [enable_ptrace=no])]
|
||||
AC_MSG_CHECKING([if libunwind-ptrace should be built])
|
||||
AC_ARG_ENABLE([ptrace],
|
||||
[AS_HELP_STRING([--enable-ptrace],
|
||||
[build libunwind-ptrace library
|
||||
@<:@default=autodetect@:>@])],
|
||||
[],
|
||||
[enable_ptrace="check"]
|
||||
)
|
||||
AS_IF([test "$enable_ptrace" != "no"],
|
||||
[AS_IF([test "$ac_cv_header_sys_ptrace_h" = "yes"], [enable_ptrace=yes],
|
||||
[test "$enable_ptrace" != "check"], [AC_MSG_FAILURE([--enable-ptrace given but
|
||||
ptrace not supported on target])],
|
||||
[enable_ptrace="no"]
|
||||
)]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([if we should build libunwind-ptrace])
|
||||
AC_MSG_RESULT([$enable_ptrace])
|
||||
AM_CONDITIONAL([BUILD_PTRACE], [test x$enable_ptrace = xyes])
|
||||
AM_COND_IF([BUILD_PTRACE], [
|
||||
AC_MSG_NOTICE([--- Checking for ptrace symbols ---])
|
||||
AC_CHECK_DECLS([PTRACE_POKEUSER, PTRACE_POKEDATA, PTRACE_SETREGSET,
|
||||
PTRACE_TRACEME, PTRACE_CONT, PTRACE_SINGLESTEP,
|
||||
PTRACE_SYSCALL, PT_IO, PT_GETREGS,
|
||||
PT_GETFPREGS, PT_CONTINUE, PT_TRACE_ME,
|
||||
PT_STEP, PT_SYSCALL],
|
||||
[],
|
||||
[],
|
||||
[$ac_includes_default
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ptrace.h>
|
||||
])
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(setjmp,
|
||||
AS_HELP_STRING([--enable-setjmp],[building libunwind-setjmp library]),,
|
||||
[AS_IF([test x$target_arch = x$host_arch], [enable_setjmp=yes], [enable_setjmp=no])]
|
||||
AC_MSG_CHECKING([if libunwind-nto should be built])
|
||||
AC_ARG_ENABLE(nto,
|
||||
[AS_HELP_STRING([--enable-nto],
|
||||
[build libunwind-nto library
|
||||
@<:@default=autodetect@:>@])],
|
||||
[],
|
||||
[enable_nto="check"]
|
||||
)
|
||||
AS_IF([test "$enable_nto" != "no"],
|
||||
[AC_CHECK_HEADER([sys/neutrino.h], [enable_nto=yes], [enable_nto=no])]
|
||||
)
|
||||
AC_MSG_RESULT([$enable_nto])
|
||||
AM_CONDITIONAL([BUILD_NTO], [test x$enable_nto = xyes])
|
||||
|
||||
AC_MSG_CHECKING([if libunwind-setjmp should be built])
|
||||
AC_ARG_ENABLE([setjmp],
|
||||
[AS_HELP_STRING([--enable-setjmp],
|
||||
[build libunwind-setjmp library
|
||||
@<:@default=autodetect@:>@])],
|
||||
[],
|
||||
[enable_setjmp=check]
|
||||
)
|
||||
AS_IF([test "$enable_setjmp" = check],
|
||||
[AS_IF([test x$target_arch = x$host_arch],
|
||||
[enable_setjmp=yes],
|
||||
[enable_setjmp=no])]
|
||||
[AS_IF([expr x$target_os : xnto-qnx >/dev/null],
|
||||
[enable_setjmp=no])]
|
||||
)
|
||||
AC_MSG_RESULT([$enable_setjmp])
|
||||
AM_CONDITIONAL(BUILD_SETJMP, test x$enable_setjmp = xyes)
|
||||
|
||||
AC_MSG_CHECKING([if weak-backtrace is enabled])
|
||||
AC_ARG_ENABLE([weak-backtrace],
|
||||
[AS_HELP_STRING([--disable-weak-backtrace],
|
||||
[do not provide the weak 'backtrace' symbol
|
||||
@<:@default=no@:>@])],
|
||||
[],
|
||||
[enable_weak_backtrace=yes]
|
||||
)
|
||||
AC_MSG_RESULT([$enable_weak_backtrace])
|
||||
AM_CONDITIONAL([CONFIG_WEAK_BACKTRACE], [test "x$enable_weak_backtrace" = xyes])
|
||||
AM_COND_IF([CONFIG_WEAK_BACKTRACE], [
|
||||
AC_DEFINE([CONFIG_WEAK_BACKTRACE], [1], [Define if the weak 'backtrace' symbol is provided.])
|
||||
])
|
||||
|
||||
|
||||
AC_MSG_CHECKING([if unwind.h should be exported])
|
||||
AC_ARG_ENABLE([unwind-header],
|
||||
[AS_HELP_STRING([--disable-unwind-header],
|
||||
[do not export the 'unwind.h' header
|
||||
@<:@default=no@:>@])],
|
||||
[],
|
||||
[enable_unwind_header=yes]
|
||||
)
|
||||
AC_MSG_RESULT([$enable_unwind_header])
|
||||
AM_CONDITIONAL(BUILD_UNWIND_HEADER, test "x$enable_unwind_header" = xyes)
|
||||
|
||||
AC_MSG_CHECKING([whether to support UNW_CACHE_PER_THREAD])
|
||||
AC_ARG_ENABLE([per-thread-cache],
|
||||
[AS_HELP_STRING([--enable-per-thread-cache],
|
||||
[build with support for UNW_CACHE_PER_THREAD
|
||||
(which imposes a high TLS memory usage)
|
||||
@<:@default=no@:>@])],
|
||||
[],
|
||||
[enable_per_thread_cache=no]
|
||||
)
|
||||
AC_MSG_RESULT([$enable_per_thread_cache])
|
||||
AS_IF([test x$enable_per_thread_cache = xyes],
|
||||
[AC_DEFINE([HAVE___CACHE_PER_THREAD], 1, [Define to 1 if --enable-per-thread-cache])]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(documentation,
|
||||
AS_HELP_STRING([--disable-documentation],[Disable generating the man pages]),,
|
||||
[enable_documentation=yes])
|
||||
AC_MSG_CHECKING([if testsuite should be built])
|
||||
AC_ARG_ENABLE([tests],
|
||||
[AS_HELP_STRING([--disable-tests],
|
||||
[disable building tests @<:@default=no@:>@])],
|
||||
[],
|
||||
[enable_tests=yes]
|
||||
)
|
||||
AC_MSG_RESULT([$enable_tests])
|
||||
AM_CONDITIONAL([CONFIG_TESTS], [test x$enable_tests = xyes])
|
||||
AM_COND_IF([CONFIG_TESTS], [
|
||||
old_LIBS="$LIBS"
|
||||
AC_MSG_NOTICE([--- Checking for extra libraries linked to tests ---])
|
||||
AC_SEARCH_LIBS([dlopen], [dl],
|
||||
[AS_IF([test "$ac_cv_search_dlopen" != "none required"],
|
||||
[AC_SUBST([DLLIB], ["$ac_cv_search_dlopen"])])])
|
||||
AC_SEARCH_LIBS([pthread_create], [pthread],
|
||||
[AS_IF([test "$ac_cv_search_pthread_create" != "none required"],
|
||||
[AC_SUBST([PTHREADS_LIB],["$ac_cv_search_pthread_create"])])])
|
||||
AC_SEARCH_LIBS([backtrace], [execinfo],
|
||||
[AS_IF([test "$ac_cv_search_backtrace" != "none required"],
|
||||
[AC_SUBST([BACKTRACELIB],["$ac_cv_search_backtrace"])])])
|
||||
LIBS="$old_LIBS"
|
||||
AC_CONFIG_FILES([tests/Makefile])
|
||||
AC_CONFIG_FILES([tests/check-namespace.sh], [chmod +x tests/check-namespace.sh])
|
||||
])
|
||||
AC_ARG_WITH([testdriver],
|
||||
[AS_HELP_STRING([--with-testdriver],
|
||||
[use designated test driver instead of default LOG_DRIVER])],
|
||||
[],
|
||||
[with_testdriver=\$\(top_srcdir\)/config/test-driver])
|
||||
AC_SUBST([UNW_TESTDRIVER], $with_testdriver)
|
||||
|
||||
AC_ARG_ENABLE(tests,
|
||||
AS_HELP_STRING([--disable-tests],[Disable tests build]),,
|
||||
[enable_tests=yes])
|
||||
|
||||
AC_ARG_ENABLE(weak-backtrace,
|
||||
AS_HELP_STRING([--disable-weak-backtrace],[Do not provide the weak 'backtrace' symbol.]),,
|
||||
[enable_weak_backtrace=yes])
|
||||
AC_MSG_CHECKING([if debug support should be built])
|
||||
AC_ARG_ENABLE([debug],
|
||||
[AS_HELP_STRING([--enable-debug],
|
||||
[enable debug support (slows down execution)
|
||||
@<:@default=no@:>@])],
|
||||
[],
|
||||
[enable_debug=no]
|
||||
)
|
||||
AC_MSG_RESULT([$enable_debug])
|
||||
AS_IF([test x$enable_debug = xyes],
|
||||
[CPPFLAGS="${CPPFLAGS} -DDEBUG"],
|
||||
[CPPFLAGS="${CPPFLAGS} -DNDEBUG"]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(unwind-header,
|
||||
AS_HELP_STRING([--disable-unwind-header],[Do not export the 'unwind.h' header]),,
|
||||
[enable_unwind_header=yes])
|
||||
AC_MSG_CHECKING([if C++ exception support should be built])
|
||||
AC_ARG_ENABLE([cxx_exceptions],
|
||||
[AS_HELP_STRING([--enable-cxx-exceptions],
|
||||
[use libunwind to handle C++ exceptions
|
||||
@<:@default=autodetect@:>@])],
|
||||
[],
|
||||
[enable_cxx_exceptions=check]
|
||||
)
|
||||
AS_IF([test $enable_cxx_exceptions = check],
|
||||
[AS_CASE([$target_arch],
|
||||
[aarch64*|arm*|mips*|x86*|s390x*|loongarch64], [enable_cxx_exceptions=no],
|
||||
[enable_cxx_exceptions=yes])]
|
||||
)
|
||||
AC_MSG_RESULT([$enable_cxx_exceptions])
|
||||
AM_CONDITIONAL([SUPPORT_CXX_EXCEPTIONS], [test x$enable_cxx_exceptions = xyes])
|
||||
|
||||
AC_MSG_CHECKING([if we should export unwind.h])
|
||||
AC_MSG_RESULT([$enable_unwind_header])
|
||||
AC_MSG_CHECKING([if documentation should be built])
|
||||
AC_ARG_ENABLE([documentation],
|
||||
[AS_HELP_STRING([--enable-documentation],
|
||||
[enable generating the man pages @<:@default=yes@:>@])],
|
||||
[],
|
||||
[enable_documentation=yes])
|
||||
AC_MSG_RESULT([$enable_documentation])
|
||||
AC_PATH_PROG([LATEX2MAN],[latex2man])
|
||||
AS_IF([test "x$LATEX2MAN" = "x" && test "x$enable_documentation" != "xno"], [
|
||||
AC_MSG_WARN([latex2man not found. Install latex2man. Disabling docs.])
|
||||
enable_documentation="no";
|
||||
])
|
||||
AM_CONDITIONAL([CONFIG_DOCS], [test x$enable_documentation != xno])
|
||||
AM_COND_IF([CONFIG_DOCS], [AC_CONFIG_FILES([doc/Makefile doc/common.tex])])
|
||||
|
||||
AC_MSG_CHECKING([if we should build libunwind-setjmp])
|
||||
AC_MSG_RESULT([$enable_setjmp])
|
||||
# Enable tests built around unw_resume, which is not supported on all targets
|
||||
AC_MSG_CHECKING([if we should enable unw_resume tests])
|
||||
AS_CASE([$target_os],
|
||||
[nto-qnx*], [enable_unw_resume_tests=no],
|
||||
[enable_unw_resume_tests=yes])
|
||||
AC_MSG_RESULT([$enable_unw_resume_tests])
|
||||
AM_CONDITIONAL([ENABLE_UNW_RESUME_TESTS], [test x$enable_unw_resume_tests = xyes])
|
||||
|
||||
AC_MSG_CHECKING([for build architecture])
|
||||
AC_MSG_RESULT([$build_arch])
|
||||
@ -170,11 +344,8 @@ AC_MSG_RESULT([$target_arch])
|
||||
AC_MSG_CHECKING([for target operating system])
|
||||
AC_MSG_RESULT([$target_os])
|
||||
|
||||
AM_CONDITIONAL(BUILD_COREDUMP, test x$enable_coredump = xyes)
|
||||
AM_CONDITIONAL(BUILD_PTRACE, test x$enable_ptrace = xyes)
|
||||
AM_CONDITIONAL(BUILD_SETJMP, test x$enable_setjmp = xyes)
|
||||
AM_CONDITIONAL(BUILD_UNWIND_HEADER, test "x$enable_unwind_header" = xyes)
|
||||
AM_CONDITIONAL(NO_PTRACE_TEST, test x$build_arch != x$host_arch)
|
||||
AM_CONDITIONAL([XFAIL_PTRACE_TEST], [echo $CFLAGS | grep -q '\-m32\>'])
|
||||
AM_CONDITIONAL([CROSS_BUILD], [test x$build_arch != x$host_arch])
|
||||
AM_CONDITIONAL(REMOTE_ONLY, test x$target_arch != x$host_arch)
|
||||
AM_CONDITIONAL(ARCH_AARCH64, test x$target_arch = xaarch64)
|
||||
AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm)
|
||||
@ -186,9 +357,9 @@ AM_CONDITIONAL(ARCH_X86_64, test x$target_arch = xx86_64)
|
||||
AM_CONDITIONAL(ARCH_PPC32, test x$target_arch = xppc32)
|
||||
AM_CONDITIONAL(ARCH_PPC64, test x$target_arch = xppc64)
|
||||
AM_CONDITIONAL(ARCH_SH, test x$target_arch = xsh)
|
||||
AM_CONDITIONAL(ARCH_TILEGX, test x$target_arch = xtilegx)
|
||||
AM_CONDITIONAL(ARCH_S390X, test x$target_arch = xs390x)
|
||||
AM_CONDITIONAL(ARCH_RISCV, test x$target_arch = xriscv)
|
||||
AM_CONDITIONAL(ARCH_LOONGARCH64, test x$target_arch = xloongarch64)
|
||||
AM_CONDITIONAL(OS_LINUX, expr x$target_os : xlinux >/dev/null)
|
||||
AM_CONDITIONAL(OS_HPUX, expr x$target_os : xhpux >/dev/null)
|
||||
AM_CONDITIONAL(OS_FREEBSD, expr x$target_os : xfreebsd >/dev/null)
|
||||
@ -196,12 +367,12 @@ AM_CONDITIONAL(OS_QNX, expr x$target_os : xnto-qnx >/dev/null)
|
||||
AM_CONDITIONAL(OS_SOLARIS, expr x$target_os : xsolaris >/dev/null)
|
||||
|
||||
AC_MSG_CHECKING([for ELF helper width])
|
||||
case "${target_arch}" in
|
||||
(arm|hppa|ppc32|x86|sh) use_elf32=yes; AC_MSG_RESULT([32]);;
|
||||
(aarch64|ia64|ppc64|x86_64|s390x|tilegx) use_elf64=yes; AC_MSG_RESULT([64]);;
|
||||
(mips|riscv) use_elfxx=yes; AC_MSG_RESULT([xx]);;
|
||||
*) AC_MSG_ERROR([Unknown ELF target: ${target_arch}])
|
||||
esac
|
||||
AS_CASE([${target_arch}],
|
||||
[arm|hppa|ppc32|x86|sh], [use_elf32=yes; AC_MSG_RESULT([32])],
|
||||
[aarch64|ia64|ppc64|x86_64|s390x], [use_elf64=yes; AC_MSG_RESULT([64])],
|
||||
[mips|riscv|loongarch64], [use_elfxx=yes; AC_MSG_RESULT([xx])],
|
||||
[AC_MSG_ERROR([Unknown ELF target: ${target_arch}])]
|
||||
)
|
||||
AM_CONDITIONAL(USE_ELF32, [test x$use_elf32 = xyes])
|
||||
AM_CONDITIONAL(USE_ELF64, [test x$use_elf64 = xyes])
|
||||
AM_CONDITIONAL(USE_ELFXX, [test x$use_elfxx = xyes])
|
||||
@ -224,35 +395,6 @@ else
|
||||
fi
|
||||
AC_MSG_RESULT([$remote_only])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable debug support])
|
||||
AC_ARG_ENABLE(debug,
|
||||
AS_HELP_STRING([--enable-debug],[turn on debug support (slows down execution)]))
|
||||
if test x$enable_debug = xyes; then
|
||||
CPPFLAGS="${CPPFLAGS} -DDEBUG"
|
||||
else
|
||||
CPPFLAGS="${CPPFLAGS} -DNDEBUG"
|
||||
fi
|
||||
AC_MSG_RESULT([$enable_debug])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable C++ exception support])
|
||||
AC_ARG_ENABLE(cxx_exceptions,
|
||||
AS_HELP_STRING([--enable-cxx-exceptions],[use libunwind to handle C++ exceptions]),,
|
||||
[
|
||||
# C++ exception handling doesn't work too well on x86
|
||||
case $target_arch in
|
||||
x86*) enable_cxx_exceptions=no;;
|
||||
aarch64*) enable_cxx_exceptions=no;;
|
||||
arm*) enable_cxx_exceptions=no;;
|
||||
mips*) enable_cxx_exceptions=no;;
|
||||
tile*) enable_cxx_exceptions=no;;
|
||||
s390x*) enable_cxx_exceptions=no;;
|
||||
*) enable_cxx_exceptions=yes;;
|
||||
esac
|
||||
])
|
||||
|
||||
AM_CONDITIONAL([SUPPORT_CXX_EXCEPTIONS], [test x$enable_cxx_exceptions = xyes])
|
||||
AC_MSG_RESULT([$enable_cxx_exceptions])
|
||||
|
||||
AC_MSG_CHECKING([whether to load .debug_frame sections])
|
||||
AC_ARG_ENABLE(debug_frame,
|
||||
AS_HELP_STRING([--enable-debug-frame],[Load the ".debug_frame" section if available]),, [
|
||||
@ -330,15 +472,6 @@ fi
|
||||
AC_SUBST([LIBZ])
|
||||
AM_CONDITIONAL(HAVE_ZLIB, test x$enable_zlibdebuginfo = xyes)
|
||||
|
||||
AC_MSG_CHECKING([whether to support UNW_CACHE_PER_THREAD])
|
||||
AC_ARG_ENABLE([per-thread-cache],
|
||||
AS_HELP_STRING([--enable-per-thread-cache], [build with support for UNW_CACHE_PER_THREAD (which imposes a hight TLS memory usage) (default: disabled)]))
|
||||
AC_MSG_RESULT([$enable_per_thread_cache])
|
||||
AS_IF([test x$enable_per_thread_cache = xyes], [
|
||||
AC_DEFINE(HAVE___CACHE_PER_THREAD, 1,
|
||||
[Define to 1 if --enable-per-thread-cache])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([for Intel compiler])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __INTEL_COMPILER
|
||||
#error choke me
|
||||
@ -379,9 +512,13 @@ else
|
||||
LDFLAGS_NOSTARTFILES="-XCClinker -nostartfiles"
|
||||
fi
|
||||
|
||||
if test x$GCC = xyes -a x$intel_compiler != xyes -a x$qcc_compiler != xyes -a x$android != xyes; then
|
||||
LIBCRTS="-lgcc_s"
|
||||
fi
|
||||
OLD_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} -march=armv8-a+sve"
|
||||
AC_MSG_CHECKING([if compiler supports -march=armv8-a+sve])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [supports_march_armv8_a_sve=yes],[supports_march_armv8_a_sve=no])
|
||||
AM_CONDITIONAL(COMPILER_SUPPORTS_MARCH_ARMV8_A_SVE, [test x$supports_march_armv8_a_sve = xyes])
|
||||
AC_MSG_RESULT([$supports_march_armv8_a_sve])
|
||||
CFLAGS="${OLD_CFLAGS}"
|
||||
|
||||
AC_MSG_CHECKING([for __builtin___clear_cache])
|
||||
AC_LINK_IFELSE(
|
||||
@ -416,15 +553,6 @@ PKG_MINOR=pkg_minor
|
||||
PKG_EXTRA=pkg_extra
|
||||
PKG_MAINTAINER=pkg_maintainer
|
||||
|
||||
old_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
AC_SEARCH_LIBS(backtrace, execinfo)
|
||||
LIBS="$old_LIBS"
|
||||
case "$ac_cv_search_backtrace" in
|
||||
-l*) BACKTRACELIB=$ac_cv_search_backtrace;;
|
||||
*) BACKTRACELIB="";;
|
||||
esac
|
||||
|
||||
|
||||
AC_SUBST(build_arch)
|
||||
AC_SUBST(target_os)
|
||||
@ -432,36 +560,13 @@ AC_SUBST(arch)
|
||||
AC_SUBST(ARCH)
|
||||
AC_SUBST(LDFLAGS_STATIC_LIBCXA)
|
||||
AC_SUBST(LDFLAGS_NOSTARTFILES)
|
||||
AC_SUBST(LIBCRTS)
|
||||
AC_SUBST(PKG_MAJOR)
|
||||
AC_SUBST(PKG_MINOR)
|
||||
AC_SUBST(PKG_EXTRA)
|
||||
AC_SUBST(PKG_MAINTAINER)
|
||||
AC_SUBST(enable_cxx_exceptions)
|
||||
AC_SUBST(enable_debug_frame)
|
||||
AC_SUBST(DLLIB)
|
||||
AC_SUBST(BACKTRACELIB)
|
||||
|
||||
AC_PATH_PROG([LATEX2MAN],[latex2man])
|
||||
if test "x$LATEX2MAN" = "x"; then
|
||||
AC_MSG_WARN([latex2man not found. Install latex2man. Disabling docs.])
|
||||
enable_documentation="no";
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([CONFIG_DOCS], [test x$enable_documentation = xyes])
|
||||
if test "x$enable_documentation" = "xyes"; then
|
||||
AC_CONFIG_FILES(doc/Makefile doc/common.tex)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([CONFIG_TESTS], [test x$enable_tests = xyes])
|
||||
if test "x$enable_tests" = "xyes"; then
|
||||
AC_CONFIG_FILES(tests/Makefile tests/check-namespace.sh)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([CONFIG_WEAK_BACKTRACE], [test "x$enable_weak_backtrace" = xyes])
|
||||
AM_COND_IF([CONFIG_WEAK_BACKTRACE], [
|
||||
AC_DEFINE([CONFIG_WEAK_BACKTRACE], [1], [Define if the weak 'backtrace' symbol is provided.])
|
||||
])
|
||||
|
||||
AC_CONFIG_FILES(Makefile src/Makefile
|
||||
include/libunwind-common.h
|
||||
|
||||
80
src/third_party/unwind/dist/doc/Makefile.am
vendored
80
src/third_party/unwind/dist/doc/Makefile.am
vendored
@ -1,80 +0,0 @@
|
||||
# man pages that go into section 3:
|
||||
man3_MANS = libunwind.man libunwind-dynamic.man libunwind-ia64.man \
|
||||
libunwind-ptrace.man libunwind-setjmp.man \
|
||||
unw_apply_reg_state.man \
|
||||
unw_backtrace.man \
|
||||
unw_flush_cache.man \
|
||||
unw_get_accessors.man \
|
||||
unw_get_proc_info.man \
|
||||
unw_get_proc_info_by_ip.man \
|
||||
unw_get_proc_name.man \
|
||||
unw_get_fpreg.man \
|
||||
unw_get_reg.man \
|
||||
unw_getcontext.man \
|
||||
unw_init_local.man unw_init_remote.man \
|
||||
unw_init_local2.man \
|
||||
unw_is_fpreg.man \
|
||||
unw_is_signal_frame.man \
|
||||
unw_create_addr_space.man \
|
||||
unw_destroy_addr_space.man \
|
||||
unw_regname.man unw_resume.man \
|
||||
unw_reg_states_iterate.man \
|
||||
unw_set_caching_policy.man \
|
||||
unw_set_cache_size.man \
|
||||
unw_set_fpreg.man \
|
||||
unw_set_reg.man \
|
||||
unw_step.man \
|
||||
unw_strerror.man \
|
||||
_U_dyn_register.man \
|
||||
_U_dyn_cancel.man
|
||||
|
||||
EXTRA_DIST = NOTES libunwind.trans \
|
||||
libunwind.tex libunwind-dynamic.tex libunwind-ia64.tex \
|
||||
libunwind-ptrace.tex libunwind-setjmp.tex \
|
||||
unw_apply_reg_state.tex \
|
||||
unw_backtrace.tex \
|
||||
unw_flush_cache.tex \
|
||||
unw_get_accessors.tex \
|
||||
unw_get_proc_info.tex \
|
||||
unw_get_proc_info_by_ip.tex \
|
||||
unw_get_proc_name.tex \
|
||||
unw_get_fpreg.tex \
|
||||
unw_get_reg.tex \
|
||||
unw_getcontext.tex \
|
||||
unw_init_local.tex unw_init_remote.tex \
|
||||
unw_is_fpreg.tex \
|
||||
unw_is_signal_frame.tex \
|
||||
unw_create_addr_space.tex unw_destroy_addr_space.tex \
|
||||
unw_regname.tex unw_resume.tex unw_set_caching_policy.tex \
|
||||
unw_reg_states_iterate.tex \
|
||||
unw_set_cache_size.tex \
|
||||
unw_set_fpreg.tex \
|
||||
unw_set_reg.tex \
|
||||
unw_step.tex \
|
||||
unw_strerror.tex \
|
||||
_U_dyn_register.tex \
|
||||
_U_dyn_cancel.tex \
|
||||
$(man3_MANS)
|
||||
|
||||
L2M = latex2man
|
||||
L2P = pdflatex
|
||||
L2M_CMD = $(L2M) -t $(srcdir)/libunwind.trans
|
||||
L2H_CMD = $(L2M) -H -t $(srcdir)/libunwind.trans
|
||||
|
||||
.tex.man:
|
||||
$(L2M_CMD) $< $@
|
||||
-cp $@ $(srcdir)/$@
|
||||
|
||||
html:
|
||||
for n in $(man3_MANS); do \
|
||||
page=`basename $$n .man`; \
|
||||
$(L2H_CMD) $(srcdir)/$$page.tex "$$page(3).raw"; \
|
||||
done
|
||||
|
||||
pdf:
|
||||
for n in $(man3_MANS); do \
|
||||
page=`basename $$n .man`; \
|
||||
$(L2P) $(srcdir)/$$page.tex "$$page(3).pdf"; \
|
||||
done
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
622
src/third_party/unwind/dist/doc/Makefile.in
vendored
622
src/third_party/unwind/dist/doc/Makefile.in
vendored
@ -1,622 +0,0 @@
|
||||
# Makefile.in generated by automake 1.15.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = doc
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||
CONFIG_CLEAN_FILES = common.tex
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
man3dir = $(mandir)/man3
|
||||
am__installdirs = "$(DESTDIR)$(man3dir)"
|
||||
NROFF = nroff
|
||||
MANS = $(man3_MANS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/common.tex.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
ARCH = @ARCH@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BACKTRACELIB = @BACKTRACELIB@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLIB = @DLLIB@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LATEX2MAN = @LATEX2MAN@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LDFLAGS_NOSTARTFILES = @LDFLAGS_NOSTARTFILES@
|
||||
LDFLAGS_STATIC_LIBCXA = @LDFLAGS_STATIC_LIBCXA@
|
||||
LIBCRTS = @LIBCRTS@
|
||||
LIBLZMA = @LIBLZMA@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBZ = @LIBZ@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_EXTRA = @PKG_EXTRA@
|
||||
PKG_MAINTAINER = @PKG_MAINTAINER@
|
||||
PKG_MAJOR = @PKG_MAJOR@
|
||||
PKG_MINOR = @PKG_MINOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
arch = @arch@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_arch = @build_arch@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
enable_cxx_exceptions = @enable_cxx_exceptions@
|
||||
enable_debug_frame = @enable_debug_frame@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
# man pages that go into section 3:
|
||||
man3_MANS = libunwind.man libunwind-dynamic.man libunwind-ia64.man \
|
||||
libunwind-ptrace.man libunwind-setjmp.man \
|
||||
unw_apply_reg_state.man \
|
||||
unw_backtrace.man \
|
||||
unw_flush_cache.man \
|
||||
unw_get_accessors.man \
|
||||
unw_get_proc_info.man \
|
||||
unw_get_proc_info_by_ip.man \
|
||||
unw_get_proc_name.man \
|
||||
unw_get_fpreg.man \
|
||||
unw_get_reg.man \
|
||||
unw_getcontext.man \
|
||||
unw_init_local.man unw_init_remote.man \
|
||||
unw_init_local2.man \
|
||||
unw_is_fpreg.man \
|
||||
unw_is_signal_frame.man \
|
||||
unw_create_addr_space.man \
|
||||
unw_destroy_addr_space.man \
|
||||
unw_regname.man unw_resume.man \
|
||||
unw_reg_states_iterate.man \
|
||||
unw_set_caching_policy.man \
|
||||
unw_set_cache_size.man \
|
||||
unw_set_fpreg.man \
|
||||
unw_set_reg.man \
|
||||
unw_step.man \
|
||||
unw_strerror.man \
|
||||
_U_dyn_register.man \
|
||||
_U_dyn_cancel.man
|
||||
|
||||
EXTRA_DIST = NOTES libunwind.trans \
|
||||
libunwind.tex libunwind-dynamic.tex libunwind-ia64.tex \
|
||||
libunwind-ptrace.tex libunwind-setjmp.tex \
|
||||
unw_apply_reg_state.tex \
|
||||
unw_backtrace.tex \
|
||||
unw_flush_cache.tex \
|
||||
unw_get_accessors.tex \
|
||||
unw_get_proc_info.tex \
|
||||
unw_get_proc_info_by_ip.tex \
|
||||
unw_get_proc_name.tex \
|
||||
unw_get_fpreg.tex \
|
||||
unw_get_reg.tex \
|
||||
unw_getcontext.tex \
|
||||
unw_init_local.tex unw_init_remote.tex \
|
||||
unw_is_fpreg.tex \
|
||||
unw_is_signal_frame.tex \
|
||||
unw_create_addr_space.tex unw_destroy_addr_space.tex \
|
||||
unw_regname.tex unw_resume.tex unw_set_caching_policy.tex \
|
||||
unw_reg_states_iterate.tex \
|
||||
unw_set_cache_size.tex \
|
||||
unw_set_fpreg.tex \
|
||||
unw_set_reg.tex \
|
||||
unw_step.tex \
|
||||
unw_strerror.tex \
|
||||
_U_dyn_register.tex \
|
||||
_U_dyn_cancel.tex \
|
||||
$(man3_MANS)
|
||||
|
||||
L2M = latex2man
|
||||
L2P = pdflatex
|
||||
L2M_CMD = $(L2M) -t $(srcdir)/libunwind.trans
|
||||
L2H_CMD = $(L2M) -H -t $(srcdir)/libunwind.trans
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .man .tex
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
common.tex: $(top_builddir)/config.status $(srcdir)/common.tex.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-man3: $(man3_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1='$(man3_MANS)'; \
|
||||
list2=''; \
|
||||
test -n "$(man3dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.3[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man3:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man3dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man3
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man3
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-man3 install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags-am uninstall uninstall-am uninstall-man \
|
||||
uninstall-man3
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
.tex.man:
|
||||
$(L2M_CMD) $< $@
|
||||
-cp $@ $(srcdir)/$@
|
||||
|
||||
html:
|
||||
for n in $(man3_MANS); do \
|
||||
page=`basename $$n .man`; \
|
||||
$(L2H_CMD) $(srcdir)/$$page.tex "$$page(3).raw"; \
|
||||
done
|
||||
|
||||
pdf:
|
||||
for n in $(man3_MANS); do \
|
||||
page=`basename $$n .man`; \
|
||||
$(L2P) $(srcdir)/$$page.tex "$$page(3).pdf"; \
|
||||
done
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
127
src/third_party/unwind/dist/doc/NOTES
vendored
127
src/third_party/unwind/dist/doc/NOTES
vendored
@ -1,127 +0,0 @@
|
||||
The central data structure of the unwind API is the unwind cursor.
|
||||
This structure tracks the register contents. The unwind API defines a
|
||||
handful of well-known frame "registers":
|
||||
|
||||
- ip: the instruction pointer (pc)
|
||||
- rp: the return pointer (rp, aka "return address" or "return link")
|
||||
- sp: the stack pointer (memory stack pointer, in the case of ia64)
|
||||
- fp: the frame pointer
|
||||
- first_ip: the starting address of the current "procedure"
|
||||
- handler: a pointer to an architecture & language-specific
|
||||
"personality" routine
|
||||
- lsda: a pointer to an architecture & language-specific
|
||||
data-area
|
||||
|
||||
The API defines no well-known preserved registers. Each architecture
|
||||
can define additional registers as needed. Of course, a portable
|
||||
application may only rely on well-known registers. The names for
|
||||
preserved registers are defined in the architecture-specific header
|
||||
file <unwind-ARCH.h>. For example, to get the IA-64-specific register
|
||||
names, an application would do:
|
||||
|
||||
#include <unwind-ia64.h>
|
||||
|
||||
The API is designed to handle two primary cases: unwinding within the
|
||||
current (local) process and unwinding of another ("remote") process
|
||||
(e.g., through ptrace()). In the local case, the initial machine
|
||||
state is captured by an unwind context (currently the same as
|
||||
ucontext_t). In the remote case, the initial machine state is
|
||||
captured by an unwind accessor structure, which provides callback
|
||||
routines for reading/writing memory and registers and for obtaining
|
||||
unwind information.
|
||||
|
||||
Once a cursor has been initialized, you can step through the call
|
||||
chain with the unw_step() routine. The frame registers and the
|
||||
preserved state can then be accessed with unw_get_reg() or modified
|
||||
with unw_set_reg(). For floating-point registers, there are separate
|
||||
unw_get_fpreg() and unw_set_fpreg() routines (on some arches, e.g.,
|
||||
Alpha, these could be just aliases for unw_{g,s}et_reg()). The
|
||||
unw_resume() routine can be used to resume execution at an arbitrary
|
||||
point in the call-chain (as identified by an unwind cursor). This is
|
||||
intended for exception handling and, at least for now, the intention
|
||||
is to support this routine only for the local case. Kevin, if you
|
||||
feel gdb could benefit from such a routine, I'd be interested to hear
|
||||
about it.
|
||||
|
||||
Note that it is perfectly legal to make copies of the unwind cursor.
|
||||
This makes it possible, e.g., to obtain an unwind context, modify the
|
||||
state in an earlier call frame, and then resume execution at the point
|
||||
at which the unwind context was captured.
|
||||
|
||||
Here is a quick example of how to use the unwind API to do a simple
|
||||
stack trace:
|
||||
|
||||
unw_cursor_t cursor;
|
||||
unw_word_t ip, sp;
|
||||
unw_context_t uc;
|
||||
|
||||
unw_getcontext(&uc);
|
||||
unw_init_local(&cursor, &uc);
|
||||
do
|
||||
{
|
||||
unw_get_reg(&cursor, UNW_REG_IP, &ip);
|
||||
unw_get_reg(&cursor, UNW_REG_SP, &sp);
|
||||
printf ("ip=%016lx sp=%016lx\n", ip, sp);
|
||||
}
|
||||
while (unw_step (&cursor) > 0);
|
||||
|
||||
Note that this particular example should work on pretty much any
|
||||
architecture, as it doesn't rely on any arch-specific registers.
|
||||
|
||||
* Multiarchitecture support
|
||||
|
||||
If libunwind is configured for a target other than the local (native)
|
||||
host, the library is installed as libunwind-$ARCH, where $ARCH is
|
||||
the target architecture name (e.g., ia32, ia64, or alpha). Similarly,
|
||||
the header file is installed as libunwind-$ARCH.
|
||||
|
||||
With this setup, an application should:
|
||||
|
||||
- include <libunwind.h>, and
|
||||
- link against -lunwind
|
||||
|
||||
if the application needs to use the unwinder of the host. An
|
||||
application wanting to use the unwinder for a different target (e.g.,
|
||||
a cross-debugger) should:
|
||||
|
||||
- include <libunwind-$ARCH.h>, and
|
||||
- link against -lunwind-$ARCH
|
||||
|
||||
The global symbols exported by -lunwind-$ARCH are unique such that the
|
||||
same application can be linked against the separate unwind libraries
|
||||
of multiple targets. However, a single compilation unit can include
|
||||
the header file for only one target. For example, foo.c might include
|
||||
<libunwind-ia64.h> and bar.c might include <libunwind.h> and the
|
||||
entire application would have to be linked against both -lunwind and
|
||||
-lunwind-ia64.
|
||||
|
||||
Note: the unwind header files of all targets have a common dependency
|
||||
on libunwind-common.h. To avoid version conflicts, it is necessary to
|
||||
ensure that the unwind libraries for all targets were derived from the
|
||||
same release of libunwind. That is, if the unwind library for one
|
||||
target is upgraded to a newer version, the libraries for all other
|
||||
targets also need to be upgraded.
|
||||
|
||||
Note 2: The assumption is that a cross-unwinder can handle all
|
||||
interesting flavors of a target. For example, the unwinder for the
|
||||
ia64 target is expected to be able to handle both Linux and HP-UX.
|
||||
|
||||
* IA-64 Specific Information
|
||||
|
||||
Apart from the normal frame-registers, the IA-64 implementation of
|
||||
libunwind provides the means to access the current value of the
|
||||
register backing store pointer (bsp). One quirk with this
|
||||
frame-register is that it corresponds to the address that would be in
|
||||
register ar.bsp after flushing the current register stack to the
|
||||
backing store (i.e., as if a "flushrs" instruction had been executed).
|
||||
Of course, given this value and the contents of the current frame
|
||||
marker (CFM), it's easy to calculate the original value of ar.bsp:
|
||||
|
||||
unw_word_t cfm, bsp, bsp_after_flushrs, sof;
|
||||
|
||||
unw_get_reg (&cursor, UNW_IA64_BSP, &bsp_after_flushrs);
|
||||
unw_get_reg (&cursor, UNW_IA64_CFM, &cfm);
|
||||
bsp = ia64_rse_skip_regs (bsp_after_flushrs, -(cfm & 0x7f));
|
||||
|
||||
** Dynamic Unwind Info
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "\\_U\\_DYN\\_CANCEL" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
_U_dyn_cancel
|
||||
\-\- cancel unwind\-info for dynamically generated code
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
void
|
||||
_U_dyn_cancel(unw_dyn_info_t *di);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The _U_dyn_cancel()
|
||||
routine cancels the registration of the
|
||||
unwind\-info for a dynamically generated procedure. Argument di
|
||||
is the pointer to the unw_dyn_info_t
|
||||
structure that
|
||||
describes the procedure\&'s unwind\-info.
|
||||
.PP
|
||||
The _U_dyn_cancel()
|
||||
routine is guaranteed to execute in
|
||||
constant time (in the absence of contention from concurrent calls to
|
||||
_U_dyn_register()
|
||||
or _U_dyn_cancel()).
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
_U_dyn_cancel()
|
||||
is thread\-safe but \fInot\fP
|
||||
safe to use
|
||||
from a signal handler.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind\-dynamic(3),
|
||||
_U_dyn_register(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,46 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{\_U\_dyn\_cancel}{David Mosberger-Tang}{Programming Library}{\_U\_dyn\_cancel}\_U\_dyn\_cancel -- cancel unwind-info for dynamically generated code
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{void} \Func{\_U\_dyn\_cancel}(\Type{unw\_dyn\_info\_t~*}\Var{di});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{\_U\_dyn\_cancel}() routine cancels the registration of the
|
||||
unwind-info for a dynamically generated procedure. Argument \Var{di}
|
||||
is the pointer to the \Type{unw\_dyn\_info\_t} structure that
|
||||
describes the procedure's unwind-info.
|
||||
|
||||
The \Func{\_U\_dyn\_cancel}() routine is guaranteed to execute in
|
||||
constant time (in the absence of contention from concurrent calls to
|
||||
\Func{\_U\_dyn\_register}() or \Func{\_U\_dyn\_cancel}()).
|
||||
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{\_U\_dyn\_cancel}() is thread-safe but \emph{not} safe to use
|
||||
from a signal handler.
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind-dynamic(3)}, \SeeAlso{\_U\_dyn\_register(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,68 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "\\_U\\_DYN\\_REGISTER" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
_U_dyn_register
|
||||
\-\- register unwind\-info for dynamically generated code
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
void
|
||||
_U_dyn_register(unw_dyn_info_t *di);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The _U_dyn_register()
|
||||
routine registers unwind\-info for a
|
||||
dynamically generated procedure. The procedure\&'s unwind\-info is
|
||||
described by a structure of type unw_dyn_info_t
|
||||
(see
|
||||
libunwind\-dynamic(3)).
|
||||
A pointer to this structure is
|
||||
passed in argument di\&.
|
||||
.PP
|
||||
The _U_dyn_register()
|
||||
routine is guaranteed to execute in
|
||||
constant time (in the absence of contention from concurrent calls to
|
||||
_U_dyn_register()
|
||||
or _U_dyn_cancel()).
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
_U_dyn_register()
|
||||
is thread\-safe but \fInot\fP
|
||||
safe to use
|
||||
from a signal handler.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind\-dynamic(3),
|
||||
_U_dyn_cancel(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,47 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{\_U\_dyn\_register}{David Mosberger-Tang}{Programming Library}{\_U\_dyn\_register}\_U\_dyn\_register -- register unwind-info for dynamically generated code
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{void} \Func{\_U\_dyn\_register}(\Type{unw\_dyn\_info\_t~*}\Var{di});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{\_U\_dyn\_register}() routine registers unwind-info for a
|
||||
dynamically generated procedure. The procedure's unwind-info is
|
||||
described by a structure of type \Type{unw\_dyn\_info\_t} (see
|
||||
\SeeAlso{libunwind-dynamic(3)}). A pointer to this structure is
|
||||
passed in argument \Var{di}.
|
||||
|
||||
The \Func{\_U\_dyn\_register}() routine is guaranteed to execute in
|
||||
constant time (in the absence of contention from concurrent calls to
|
||||
\Func{\_U\_dyn\_register}() or \Func{\_U\_dyn\_cancel}()).
|
||||
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{\_U\_dyn\_register}() is thread-safe but \emph{not} safe to use
|
||||
from a signal handler.
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind-dynamic(3)}, \SeeAlso{\_U\_dyn\_cancel(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
11
src/third_party/unwind/dist/doc/common.tex.in
vendored
11
src/third_party/unwind/dist/doc/common.tex.in
vendored
@ -1,11 +0,0 @@
|
||||
\setVersion{@VERSION@}
|
||||
|
||||
\sloppy
|
||||
|
||||
\newcommand{\Lt}{\symbol{"3C}}
|
||||
\newcommand{\Gt}{\symbol{"3E}}
|
||||
\newcommand{\Type}[1]{\File{#1}} % see libunwind.trans
|
||||
\newcommand{\Func}[1]{\Prog{#1}} % see libunwind.trans
|
||||
\newcommand{\Var}[1]{\Prog{#1}} % see libunwind.trans
|
||||
\newcommand{\Const}[1]{\File{#1}} % see libunwind.trans
|
||||
\newcommand{\SeeAlso}[2]{\File{#1}} % see libunwind.trans
|
||||
@ -1,538 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:44 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "LIBUNWIND\-DYNAMIC" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
libunwind\-dynamic
|
||||
\-\- libunwind\-support for runtime\-generated code
|
||||
.PP
|
||||
.SH INTRODUCTION
|
||||
|
||||
.PP
|
||||
For libunwind
|
||||
to do its job, it needs to be able to reconstruct
|
||||
the \fIframe state\fP
|
||||
of each frame in a call\-chain. The frame state
|
||||
describes the subset of the machine\-state that consists of the
|
||||
\fIframe registers\fP
|
||||
(typically the instruction\-pointer and the
|
||||
stack\-pointer) and all callee\-saved registers (preserved registers).
|
||||
The frame state describes each register either by providing its
|
||||
current value (for frame registers) or by providing the location at
|
||||
which the current value is stored (callee\-saved registers).
|
||||
.PP
|
||||
For statically generated code, the compiler normally takes care of
|
||||
emitting \fIunwind\-info\fP
|
||||
which provides the minimum amount of
|
||||
information needed to reconstruct the frame\-state for each instruction
|
||||
in a procedure. For dynamically generated code, the runtime code
|
||||
generator must use the dynamic unwind\-info interface provided by
|
||||
libunwind
|
||||
to supply the equivalent information. This manual
|
||||
page describes the format of this information in detail.
|
||||
.PP
|
||||
For the purpose of this discussion, a \fIprocedure\fP
|
||||
is defined to
|
||||
be an arbitrary piece of \fIcontiguous\fP
|
||||
code. Normally, each
|
||||
procedure directly corresponds to a function in the source\-language
|
||||
but this is not strictly required. For example, a runtime
|
||||
code\-generator could translate a given function into two separate
|
||||
(discontiguous) procedures: one for frequently\-executed (hot) code and
|
||||
one for rarely\-executed (cold) code. Similarly, simple
|
||||
source\-language functions (usually leaf functions) may get translated
|
||||
into code for which the default unwind\-conventions apply and for such
|
||||
code, it is not strictly necessary to register dynamic unwind\-info.
|
||||
.PP
|
||||
A procedure logically consists of a sequence of \fIregions\fP\&.
|
||||
Regions are nested in the sense that the frame state at the end of one
|
||||
region is, by default, assumed to be the frame state for the next
|
||||
region. Each region is thought of as being divided into a
|
||||
\fIprologue\fP,
|
||||
a \fIbody\fP,
|
||||
and an \fIepilogue\fP\&.
|
||||
Each of them
|
||||
can be empty. If non\-empty, the prologue sets up the frame state for
|
||||
the body. For example, the prologue may need to allocate some space
|
||||
on the stack and save certain callee\-saved registers. The body
|
||||
performs the actual work of the procedure but does not change the
|
||||
frame state in any way. If non\-empty, the epilogue restores the
|
||||
previous frame state and as such it undoes or cancels the effect of
|
||||
the prologue. In fact, a single epilogue may undo the effect of the
|
||||
prologues of several (nested) regions.
|
||||
.PP
|
||||
We should point out that even though the prologue, body, and epilogue
|
||||
are logically separate entities, optimizing code\-generators will
|
||||
generally interleave instructions from all three entities. For this
|
||||
reason, the dynamic unwind\-info interface of libunwind
|
||||
makes no
|
||||
distinction whatsoever between prologue and body. Similarly, the
|
||||
exact set of instructions that make up an epilogue is also irrelevant.
|
||||
The only point in the epilogue that needs to be described explicitly
|
||||
by the dynamic unwind\-info is the point at which the stack\-pointer
|
||||
gets restored. The reason this point needs to be described is that
|
||||
once the stack\-pointer is restored, all values saved in the
|
||||
deallocated portion of the stack frame become invalid and hence
|
||||
libunwind
|
||||
needs to know about it. The portion of the frame
|
||||
state not saved on the stack is assume to remain valid through the end
|
||||
of the region. For this reason, there is usually no need to describe
|
||||
instructions which restore the contents of callee\-saved registers.
|
||||
.PP
|
||||
Within a region, each instruction that affects the frame state in some
|
||||
fashion needs to be described with an operation descriptor. For this
|
||||
purpose, each instruction in the region is assigned a unique index.
|
||||
Exactly how this index is derived depends on the architecture. For
|
||||
example, on RISC and EPIC\-style architecture, instructions have a
|
||||
fixed size so it\&'s possible to simply number the instructions. In
|
||||
contrast, most CISC use variable\-length instruction encodings, so it
|
||||
is usually necessary to use a byte\-offset as the index. Given the
|
||||
instruction index, the operation descriptor specifies the effect of
|
||||
the instruction in an abstract manner. For example, it might express
|
||||
that the instruction stores calle\-saved register r1
|
||||
at offset 16
|
||||
in the stack frame.
|
||||
.PP
|
||||
.SH PROCEDURES
|
||||
|
||||
.PP
|
||||
A runtime code\-generator registers the dynamic unwind\-info of a
|
||||
procedure by setting up a structure of type unw_dyn_info_t
|
||||
and calling _U_dyn_register(),
|
||||
passing the address of the
|
||||
structure as the sole argument. The members of the
|
||||
unw_dyn_info_t
|
||||
structure are described below:
|
||||
.TP
|
||||
void *next
|
||||
Private to libunwind\&.
|
||||
Must not be used
|
||||
by the application.
|
||||
.TP
|
||||
void *prev
|
||||
Private to libunwind\&.
|
||||
Must not be used
|
||||
by the application.
|
||||
.TP
|
||||
unw_word_t start_ip
|
||||
The start\-address of the
|
||||
instructions of the procedure (remember: procedure are defined to be
|
||||
contiguous pieces of code, so a single code\-range is sufficient).
|
||||
.TP
|
||||
unw_word_t end_ip
|
||||
The end\-address of the
|
||||
instructions of the procedure (non\-inclusive, that is,
|
||||
end_ip\-start_ip
|
||||
is the size of the procedure in
|
||||
bytes).
|
||||
.TP
|
||||
unw_word_t gp
|
||||
The global\-pointer value in use
|
||||
for this procedure. The exact meaing of the global\-pointer is
|
||||
architecture\-specific and on some architecture, it is not used at
|
||||
all.
|
||||
.TP
|
||||
int32_t format
|
||||
The format of the unwind\-info.
|
||||
This member can be one of UNW_INFO_FORMAT_DYNAMIC,
|
||||
UNW_INFO_FORMAT_TABLE,
|
||||
or
|
||||
UNW_INFO_FORMAT_REMOTE_TABLE\&.
|
||||
.TP
|
||||
union u
|
||||
This union contains one sub\-member
|
||||
structure for every possible unwind\-info format:
|
||||
.RS
|
||||
.TP
|
||||
unw_dyn_proc_info_t pi
|
||||
This member is used
|
||||
for format UNW_INFO_FORMAT_DYNAMIC\&.
|
||||
.TP
|
||||
unw_dyn_table_info_t ti
|
||||
This member is used
|
||||
for format UNW_INFO_FORMAT_TABLE\&.
|
||||
.TP
|
||||
unw_dyn_remote_table_info_t rti
|
||||
This member
|
||||
is used for format UNW_INFO_FORMAT_REMOTE_TABLE\&.
|
||||
.RE
|
||||
.RS
|
||||
.PP
|
||||
The format of these sub\-members is described in detail below.
|
||||
.RE
|
||||
.PP
|
||||
.SS PROC\-INFO FORMAT
|
||||
.PP
|
||||
This is the preferred dynamic unwind\-info format and it is generally
|
||||
the one used by full\-blown runtime code\-generators. In this format,
|
||||
the details of a procedure are described by a structure of type
|
||||
unw_dyn_proc_info_t\&.
|
||||
This structure contains the following
|
||||
members:
|
||||
.PP
|
||||
.RE
|
||||
.TP
|
||||
unw_word_t name_ptr
|
||||
The address of a
|
||||
(human\-readable) name of the procedure or 0 if no such name is
|
||||
available. If non\-zero, The string stored at this address must be
|
||||
ASCII NUL terminated. For source languages that use name\-mangling
|
||||
(such as C++ or Java) the string stored at this address should be
|
||||
the \fIdemangled\fP
|
||||
version of the name.
|
||||
.PP
|
||||
.TP
|
||||
unw_word_t handler
|
||||
The address of the
|
||||
personality\-routine for this procedure. Personality\-routines are
|
||||
used in conjunction with exception handling. See the C++ ABI draft
|
||||
(http://www.codesourcery.com/cxx\-abi/) for an overview and a
|
||||
description of the personality routine. If the procedure has no
|
||||
personality routine, handler
|
||||
must be set to 0.
|
||||
.PP
|
||||
.TP
|
||||
uint32_t flags
|
||||
A bitmask of flags. At the
|
||||
moment, no flags have been defined and this member must be
|
||||
set to 0.
|
||||
.PP
|
||||
.TP
|
||||
unw_dyn_region_info_t *regions
|
||||
A NULL\-terminated
|
||||
linked list of region\-descriptors. See section ``Region
|
||||
descriptors\&'' below for more details.
|
||||
.PP
|
||||
.SS TABLE\-INFO FORMAT
|
||||
.PP
|
||||
This format is generally used when the dynamically generated code was
|
||||
derived from static code and the unwind\-info for the dynamic and the
|
||||
static versions is identical. For example, this format can be useful
|
||||
when loading statically\-generated code into an address\-space in a
|
||||
non\-standard fashion (i.e., through some means other than
|
||||
dlopen()).
|
||||
In this format, the details of a group of procedures
|
||||
is described by a structure of type unw_dyn_table_info\&.
|
||||
This structure contains the following members:
|
||||
.PP
|
||||
.TP
|
||||
unw_word_t name_ptr
|
||||
The address of a
|
||||
(human\-readable) name of the procedure or 0 if no such name is
|
||||
available. If non\-zero, The string stored at this address must be
|
||||
ASCII NUL terminated. For source languages that use name\-mangling
|
||||
(such as C++ or Java) the string stored at this address should be
|
||||
the \fIdemangled\fP
|
||||
version of the name.
|
||||
.PP
|
||||
.TP
|
||||
unw_word_t segbase
|
||||
The segment\-base value
|
||||
that needs to be added to the segment\-relative values stored in the
|
||||
unwind\-info. The exact meaning of this value is
|
||||
architecture\-specific.
|
||||
.PP
|
||||
.TP
|
||||
unw_word_t table_len
|
||||
The length of the
|
||||
unwind\-info (table_data)
|
||||
counted in units of words
|
||||
(unw_word_t).
|
||||
.PP
|
||||
.TP
|
||||
unw_word_t table_data
|
||||
A pointer to the actual
|
||||
data encoding the unwind\-info. The exact format is
|
||||
architecture\-specific (see architecture\-specific sections below).
|
||||
.PP
|
||||
.SS REMOTE TABLE\-INFO FORMAT
|
||||
.PP
|
||||
The remote table\-info format has the same basic purpose as the regular
|
||||
table\-info format. The only difference is that when libunwind
|
||||
uses the unwind\-info, it will keep the table data in the target
|
||||
address\-space (which may be remote). Consequently, the type of the
|
||||
table_data
|
||||
member is unw_word_t
|
||||
rather than a pointer.
|
||||
This implies that libunwind
|
||||
will have to access the table\-data
|
||||
via the address\-space\&'s access_mem()
|
||||
call\-back, rather than
|
||||
through a direct memory reference.
|
||||
.PP
|
||||
From the point of view of a runtime\-code generator, the remote
|
||||
table\-info format offers no advantage and it is expected that such
|
||||
generators will describe their procedures either with the proc\-info
|
||||
format or the normal table\-info format. The main reason that the
|
||||
remote table\-info format exists is to enable the
|
||||
address\-space\-specific find_proc_info()
|
||||
callback (see
|
||||
unw_create_addr_space(3))
|
||||
to return unwind tables whose
|
||||
data remains in remote memory. This can speed up unwinding (e.g., for
|
||||
a debugger) because it reduces the amount of data that needs to be
|
||||
loaded from remote memory.
|
||||
.PP
|
||||
.SH REGIONS DESCRIPTORS
|
||||
|
||||
.PP
|
||||
A region descriptor is a variable length structure that describes how
|
||||
each instruction in the region affects the frame state. Of course,
|
||||
most instructions in a region usualy do not change the frame state and
|
||||
for those, nothing needs to be recorded in the region descriptor. A
|
||||
region descriptor is a structure of type
|
||||
unw_dyn_region_info_t
|
||||
and has the following members:
|
||||
.TP
|
||||
unw_dyn_region_info_t *next
|
||||
A pointer to the
|
||||
next region. If this is the last region, next
|
||||
is NULL\&.
|
||||
.TP
|
||||
int32_t insn_count
|
||||
The length of the region in
|
||||
instructions. Each instruction is assumed to have a fixed size (see
|
||||
architecture\-specific sections for details). The value of
|
||||
insn_count
|
||||
may be negative in the last region of a procedure
|
||||
(i.e., it may be negative only if next
|
||||
is NULL).
|
||||
A
|
||||
negative value indicates that the region covers the last \fIN\fP
|
||||
instructions of the procedure, where \fIN\fP
|
||||
is the absolute value
|
||||
of insn_count\&.
|
||||
.TP
|
||||
uint32_t op_count
|
||||
The (allocated) length of
|
||||
the op_count
|
||||
array.
|
||||
.TP
|
||||
unw_dyn_op_t op
|
||||
An array of dynamic unwind
|
||||
directives. See Section ``Dynamic unwind directives\&'' for a
|
||||
description of the directives.
|
||||
.PP
|
||||
A region descriptor with an insn_count
|
||||
of zero is an
|
||||
\fIempty region\fP
|
||||
and such regions are perfectly legal. In fact,
|
||||
empty regions can be useful to establish a particular frame state
|
||||
before the start of another region.
|
||||
.PP
|
||||
A single region list can be shared across multiple procedures provided
|
||||
those procedures share a common prologue and epilogue (their bodies
|
||||
may differ, of course). Normally, such procedures consist of a canned
|
||||
prologue, the body, and a canned epilogue. This could be described by
|
||||
two regions: one covering the prologue and one covering the epilogue.
|
||||
Since the body length is variable, the latter region would need to
|
||||
specify a negative value in insn_count
|
||||
such that
|
||||
libunwind
|
||||
knows that the region covers the end of the procedure
|
||||
(up to the address specified by end_ip).
|
||||
.PP
|
||||
The region descriptor is a variable length structure to make it
|
||||
possible to allocate all the necessary memory with a single
|
||||
memory\-allocation request. To facilitate the allocation of a region
|
||||
descriptors libunwind
|
||||
provides a helper routine with the
|
||||
following synopsis:
|
||||
.PP
|
||||
size_t
|
||||
_U_dyn_region_size(int
|
||||
op_count);
|
||||
.PP
|
||||
This routine returns the number of bytes needed to hold a region
|
||||
descriptor with space for op_count
|
||||
unwind directives. Note
|
||||
that the length of the op
|
||||
array does not have to match exactly
|
||||
with the number of directives in a region. Instead, it is sufficient
|
||||
if the op
|
||||
array contains at least as many entries as there are
|
||||
directives, since the end of the directives can always be indicated
|
||||
with the UNW_DYN_STOP
|
||||
directive.
|
||||
.PP
|
||||
.SH DYNAMIC UNWIND DIRECTIVES
|
||||
|
||||
.PP
|
||||
A dynamic unwind directive describes how the frame state changes
|
||||
at a particular point within a region. The description is in
|
||||
the form of a structure of type unw_dyn_op_t\&.
|
||||
This
|
||||
structure has the following members:
|
||||
.TP
|
||||
int8_t tag
|
||||
The operation tag. Must be one
|
||||
of the unw_dyn_operation_t
|
||||
values described below.
|
||||
.TP
|
||||
int8_t qp
|
||||
The qualifying predicate that controls
|
||||
whether or not this directive is active. This is useful for
|
||||
predicated architecturs such as IA\-64 or ARM, where the contents of
|
||||
another (callee\-saved) register determines whether or not an
|
||||
instruction is executed (takes effect). If the directive is always
|
||||
active, this member should be set to the manifest constant
|
||||
_U_QP_TRUE
|
||||
(this constant is defined for all
|
||||
architectures, predicated or not).
|
||||
.TP
|
||||
int16_t reg
|
||||
The number of the register affected
|
||||
by the instruction.
|
||||
.TP
|
||||
int32_t when
|
||||
The region\-relative number of
|
||||
the instruction to which this directive applies. For example,
|
||||
a value of 0 means that the effect described by this directive
|
||||
has taken place once the first instruction in the region has
|
||||
executed.
|
||||
.TP
|
||||
unw_word_t val
|
||||
The value to be applied by the
|
||||
operation tag. The exact meaning of this value varies by tag. See
|
||||
Section ``Operation tags\&'' below.
|
||||
.PP
|
||||
It is perfectly legitimate to specify multiple dynamic unwind
|
||||
directives with the same when
|
||||
value, if a particular instruction
|
||||
has a complex effect on the frame state.
|
||||
.PP
|
||||
Empty regions by definition contain no actual instructions and as such
|
||||
the directives are not tied to a particular instruction. By
|
||||
convention, the when
|
||||
member should be set to 0, however.
|
||||
.PP
|
||||
There is no need for the dynamic unwind directives to appear
|
||||
in order of increasing when
|
||||
values. If the directives happen to
|
||||
be sorted in that order, it may result in slightly faster execution,
|
||||
but a runtime code\-generator should not go to extra lengths just to
|
||||
ensure that the directives are sorted.
|
||||
.PP
|
||||
IMPLEMENTATION NOTE: should libunwind
|
||||
implementations for
|
||||
certain architectures prefer the list of unwind directives to be
|
||||
sorted, it is recommended that such implementations first check
|
||||
whether the list happens to be sorted already and, if not, sort the
|
||||
directives explicitly before the first use. With this approach, the
|
||||
overhead of explicit sorting is only paid when there is a real benefit
|
||||
and if the runtime code\-generator happens to generated sorted lists
|
||||
naturally, the performance penalty is limited to a simple O(N) check.
|
||||
.PP
|
||||
.SS OPERATIONS TAGS
|
||||
.PP
|
||||
The possible operation tags are defined by enumeration type
|
||||
unw_dyn_operation_t
|
||||
which defines the following
|
||||
values:
|
||||
.PP
|
||||
.TP
|
||||
UNW_DYN_STOP
|
||||
Marks the end of the dynamic unwind
|
||||
directive list. All remaining entries in the op
|
||||
array of the
|
||||
region\-descriptor are ignored. This tag is guaranteed to have a
|
||||
value of 0.
|
||||
.PP
|
||||
.TP
|
||||
UNW_DYN_SAVE_REG
|
||||
Marks an instruction which saves
|
||||
register reg
|
||||
to register val\&.
|
||||
.PP
|
||||
.TP
|
||||
UNW_DYN_SPILL_FP_REL
|
||||
Marks an instruction which
|
||||
spills register reg
|
||||
to a frame\-pointer\-relative location. The
|
||||
frame\-pointer\-relative offset is given by the value stored in member
|
||||
val\&.
|
||||
See the architecture\-specific sections for a description
|
||||
of the stack frame layout.
|
||||
.PP
|
||||
.TP
|
||||
UNW_DYN_SPILL_SP_REL
|
||||
Marks an instruction which
|
||||
spills register reg
|
||||
to a stack\-pointer\-relative location. The
|
||||
stack\-pointer\-relative offset is given by the value stored in member
|
||||
val\&.
|
||||
See the architecture\-specific sections for a description
|
||||
of the stack frame layout.
|
||||
.PP
|
||||
.TP
|
||||
UNW_DYN_ADD
|
||||
Marks an instruction which adds
|
||||
the constant value val
|
||||
to register reg\&.
|
||||
To add subtract
|
||||
a constant value, store the two\&'s\-complement of the value in
|
||||
val\&.
|
||||
The set of registers that can be specified for this tag
|
||||
is described in the architecture\-specific sections below.
|
||||
.PP
|
||||
.TP
|
||||
UNW_DYN_POP_FRAMES
|
||||
.PP
|
||||
.TP
|
||||
UNW_DYN_LABEL_STATE
|
||||
.PP
|
||||
.TP
|
||||
UNW_DYN_COPY_STATE
|
||||
.PP
|
||||
.TP
|
||||
UNW_DYN_ALIAS
|
||||
.PP
|
||||
unw_dyn_op_t
|
||||
.PP
|
||||
_U_dyn_op_save_reg();
|
||||
_U_dyn_op_spill_fp_rel();
|
||||
_U_dyn_op_spill_sp_rel();
|
||||
_U_dyn_op_add();
|
||||
_U_dyn_op_pop_frames();
|
||||
_U_dyn_op_label_state();
|
||||
_U_dyn_op_copy_state();
|
||||
_U_dyn_op_alias();
|
||||
_U_dyn_op_stop();
|
||||
.PP
|
||||
.SH IA\-64 SPECIFICS
|
||||
|
||||
.PP
|
||||
\- meaning of segbase member in table\-info/table\-remote\-info format
|
||||
\- format of table_data in table\-info/table\-remote\-info format
|
||||
\- instruction size: each bundle is counted as 3 instructions, regardless
|
||||
of template (MLX)
|
||||
\- describe stack\-frame layout, especially with regards to sp\-relative
|
||||
and fp\-relative addressing
|
||||
\- UNW_DYN_ADD can only add to ``sp\&'' (always a negative value); use
|
||||
POP_FRAMES otherwise
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
_U_dyn_register(3),
|
||||
_U_dyn_cancel(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,401 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{libunwind-dynamic}{David Mosberger-Tang}{Programming Library}{Introduction to dynamic unwind-info}libunwind-dynamic -- libunwind-support for runtime-generated code
|
||||
\end{Name}
|
||||
|
||||
\section{Introduction}
|
||||
|
||||
For \Prog{libunwind} to do its job, it needs to be able to reconstruct
|
||||
the \emph{frame state} of each frame in a call-chain. The frame state
|
||||
describes the subset of the machine-state that consists of the
|
||||
\emph{frame registers} (typically the instruction-pointer and the
|
||||
stack-pointer) and all callee-saved registers (preserved registers).
|
||||
The frame state describes each register either by providing its
|
||||
current value (for frame registers) or by providing the location at
|
||||
which the current value is stored (callee-saved registers).
|
||||
|
||||
For statically generated code, the compiler normally takes care of
|
||||
emitting \emph{unwind-info} which provides the minimum amount of
|
||||
information needed to reconstruct the frame-state for each instruction
|
||||
in a procedure. For dynamically generated code, the runtime code
|
||||
generator must use the dynamic unwind-info interface provided by
|
||||
\Prog{libunwind} to supply the equivalent information. This manual
|
||||
page describes the format of this information in detail.
|
||||
|
||||
For the purpose of this discussion, a \emph{procedure} is defined to
|
||||
be an arbitrary piece of \emph{contiguous} code. Normally, each
|
||||
procedure directly corresponds to a function in the source-language
|
||||
but this is not strictly required. For example, a runtime
|
||||
code-generator could translate a given function into two separate
|
||||
(discontiguous) procedures: one for frequently-executed (hot) code and
|
||||
one for rarely-executed (cold) code. Similarly, simple
|
||||
source-language functions (usually leaf functions) may get translated
|
||||
into code for which the default unwind-conventions apply and for such
|
||||
code, it is not strictly necessary to register dynamic unwind-info.
|
||||
|
||||
A procedure logically consists of a sequence of \emph{regions}.
|
||||
Regions are nested in the sense that the frame state at the end of one
|
||||
region is, by default, assumed to be the frame state for the next
|
||||
region. Each region is thought of as being divided into a
|
||||
\emph{prologue}, a \emph{body}, and an \emph{epilogue}. Each of them
|
||||
can be empty. If non-empty, the prologue sets up the frame state for
|
||||
the body. For example, the prologue may need to allocate some space
|
||||
on the stack and save certain callee-saved registers. The body
|
||||
performs the actual work of the procedure but does not change the
|
||||
frame state in any way. If non-empty, the epilogue restores the
|
||||
previous frame state and as such it undoes or cancels the effect of
|
||||
the prologue. In fact, a single epilogue may undo the effect of the
|
||||
prologues of several (nested) regions.
|
||||
|
||||
We should point out that even though the prologue, body, and epilogue
|
||||
are logically separate entities, optimizing code-generators will
|
||||
generally interleave instructions from all three entities. For this
|
||||
reason, the dynamic unwind-info interface of \Prog{libunwind} makes no
|
||||
distinction whatsoever between prologue and body. Similarly, the
|
||||
exact set of instructions that make up an epilogue is also irrelevant.
|
||||
The only point in the epilogue that needs to be described explicitly
|
||||
by the dynamic unwind-info is the point at which the stack-pointer
|
||||
gets restored. The reason this point needs to be described is that
|
||||
once the stack-pointer is restored, all values saved in the
|
||||
deallocated portion of the stack frame become invalid and hence
|
||||
\Prog{libunwind} needs to know about it. The portion of the frame
|
||||
state not saved on the stack is assume to remain valid through the end
|
||||
of the region. For this reason, there is usually no need to describe
|
||||
instructions which restore the contents of callee-saved registers.
|
||||
|
||||
Within a region, each instruction that affects the frame state in some
|
||||
fashion needs to be described with an operation descriptor. For this
|
||||
purpose, each instruction in the region is assigned a unique index.
|
||||
Exactly how this index is derived depends on the architecture. For
|
||||
example, on RISC and EPIC-style architecture, instructions have a
|
||||
fixed size so it's possible to simply number the instructions. In
|
||||
contrast, most CISC use variable-length instruction encodings, so it
|
||||
is usually necessary to use a byte-offset as the index. Given the
|
||||
instruction index, the operation descriptor specifies the effect of
|
||||
the instruction in an abstract manner. For example, it might express
|
||||
that the instruction stores calle-saved register \Var{r1} at offset 16
|
||||
in the stack frame.
|
||||
|
||||
\section{Procedures}
|
||||
|
||||
A runtime code-generator registers the dynamic unwind-info of a
|
||||
procedure by setting up a structure of type \Type{unw\_dyn\_info\_t}
|
||||
and calling \Func{\_U\_dyn\_register}(), passing the address of the
|
||||
structure as the sole argument. The members of the
|
||||
\Type{unw\_dyn\_info\_t} structure are described below:
|
||||
\begin{itemize}
|
||||
\item[\Type{void~*}next] Private to \Prog{libunwind}. Must not be used
|
||||
by the application.
|
||||
\item[\Type{void~*}prev] Private to \Prog{libunwind}. Must not be used
|
||||
by the application.
|
||||
\item[\Type{unw\_word\_t} \Var{start\_ip}] The start-address of the
|
||||
instructions of the procedure (remember: procedure are defined to be
|
||||
contiguous pieces of code, so a single code-range is sufficient).
|
||||
\item[\Type{unw\_word\_t} \Var{end\_ip}] The end-address of the
|
||||
instructions of the procedure (non-inclusive, that is,
|
||||
\Var{end\_ip}-\Var{start\_ip} is the size of the procedure in
|
||||
bytes).
|
||||
\item[\Type{unw\_word\_t} \Var{gp}] The global-pointer value in use
|
||||
for this procedure. The exact meaing of the global-pointer is
|
||||
architecture-specific and on some architecture, it is not used at
|
||||
all.
|
||||
\item[\Type{int32\_t} \Var{format}] The format of the unwind-info.
|
||||
This member can be one of \Const{UNW\_INFO\_FORMAT\_DYNAMIC},
|
||||
\Const{UNW\_INFO\_FORMAT\_TABLE}, or
|
||||
\Const{UNW\_INFO\_FORMAT\_REMOTE\_TABLE}.
|
||||
\item[\Type{union} \Var{u}] This union contains one sub-member
|
||||
structure for every possible unwind-info format:
|
||||
\begin{description}
|
||||
\item[\Type{unw\_dyn\_proc\_info\_t} \Var{pi}] This member is used
|
||||
for format \Const{UNW\_INFO\_FORMAT\_DYNAMIC}.
|
||||
\item[\Type{unw\_dyn\_table\_info\_t} \Var{ti}] This member is used
|
||||
for format \Const{UNW\_INFO\_FORMAT\_TABLE}.
|
||||
\item[\Type{unw\_dyn\_remote\_table\_info\_t} \Var{rti}] This member
|
||||
is used for format \Const{UNW\_INFO\_FORMAT\_REMOTE\_TABLE}.
|
||||
\end{description}\
|
||||
The format of these sub-members is described in detail below.
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Proc-info format}
|
||||
|
||||
This is the preferred dynamic unwind-info format and it is generally
|
||||
the one used by full-blown runtime code-generators. In this format,
|
||||
the details of a procedure are described by a structure of type
|
||||
\Type{unw\_dyn\_proc\_info\_t}. This structure contains the following
|
||||
members:
|
||||
\begin{description}
|
||||
|
||||
\item[\Type{unw\_word\_t} \Var{name\_ptr}] The address of a
|
||||
(human-readable) name of the procedure or 0 if no such name is
|
||||
available. If non-zero, The string stored at this address must be
|
||||
ASCII NUL terminated. For source languages that use name-mangling
|
||||
(such as C++ or Java) the string stored at this address should be
|
||||
the \emph{demangled} version of the name.
|
||||
|
||||
\item[\Type{unw\_word\_t} \Var{handler}] The address of the
|
||||
personality-routine for this procedure. Personality-routines are
|
||||
used in conjunction with exception handling. See the C++ ABI draft
|
||||
(http://www.codesourcery.com/cxx-abi/) for an overview and a
|
||||
description of the personality routine. If the procedure has no
|
||||
personality routine, \Var{handler} must be set to 0.
|
||||
|
||||
\item[\Type{uint32\_t} \Var{flags}] A bitmask of flags. At the
|
||||
moment, no flags have been defined and this member must be
|
||||
set to 0.
|
||||
|
||||
\item[\Type{unw\_dyn\_region\_info\_t~*}\Var{regions}] A NULL-terminated
|
||||
linked list of region-descriptors. See section ``Region
|
||||
descriptors'' below for more details.
|
||||
|
||||
\end{description}
|
||||
|
||||
\subsection{Table-info format}
|
||||
|
||||
This format is generally used when the dynamically generated code was
|
||||
derived from static code and the unwind-info for the dynamic and the
|
||||
static versions is identical. For example, this format can be useful
|
||||
when loading statically-generated code into an address-space in a
|
||||
non-standard fashion (i.e., through some means other than
|
||||
\Func{dlopen}()). In this format, the details of a group of procedures
|
||||
is described by a structure of type \Type{unw\_dyn\_table\_info}.
|
||||
This structure contains the following members:
|
||||
\begin{description}
|
||||
|
||||
\item[\Type{unw\_word\_t} \Var{name\_ptr}] The address of a
|
||||
(human-readable) name of the procedure or 0 if no such name is
|
||||
available. If non-zero, The string stored at this address must be
|
||||
ASCII NUL terminated. For source languages that use name-mangling
|
||||
(such as C++ or Java) the string stored at this address should be
|
||||
the \emph{demangled} version of the name.
|
||||
|
||||
\item[\Type{unw\_word\_t} \Var{segbase}] The segment-base value
|
||||
that needs to be added to the segment-relative values stored in the
|
||||
unwind-info. The exact meaning of this value is
|
||||
architecture-specific.
|
||||
|
||||
\item[\Type{unw\_word\_t} \Var{table\_len}] The length of the
|
||||
unwind-info (\Var{table\_data}) counted in units of words
|
||||
(\Type{unw\_word\_t}).
|
||||
|
||||
\item[\Type{unw\_word\_t} \Var{table\_data}] A pointer to the actual
|
||||
data encoding the unwind-info. The exact format is
|
||||
architecture-specific (see architecture-specific sections below).
|
||||
|
||||
\end{description}
|
||||
|
||||
\subsection{Remote table-info format}
|
||||
|
||||
The remote table-info format has the same basic purpose as the regular
|
||||
table-info format. The only difference is that when \Prog{libunwind}
|
||||
uses the unwind-info, it will keep the table data in the target
|
||||
address-space (which may be remote). Consequently, the type of the
|
||||
\Var{table\_data} member is \Type{unw\_word\_t} rather than a pointer.
|
||||
This implies that \Prog{libunwind} will have to access the table-data
|
||||
via the address-space's \Func{access\_mem}() call-back, rather than
|
||||
through a direct memory reference.
|
||||
|
||||
From the point of view of a runtime-code generator, the remote
|
||||
table-info format offers no advantage and it is expected that such
|
||||
generators will describe their procedures either with the proc-info
|
||||
format or the normal table-info format. The main reason that the
|
||||
remote table-info format exists is to enable the
|
||||
address-space-specific \Func{find\_proc\_info}() callback (see
|
||||
\SeeAlso{unw\_create\_addr\_space}(3)) to return unwind tables whose
|
||||
data remains in remote memory. This can speed up unwinding (e.g., for
|
||||
a debugger) because it reduces the amount of data that needs to be
|
||||
loaded from remote memory.
|
||||
|
||||
\section{Regions descriptors}
|
||||
|
||||
A region descriptor is a variable length structure that describes how
|
||||
each instruction in the region affects the frame state. Of course,
|
||||
most instructions in a region usualy do not change the frame state and
|
||||
for those, nothing needs to be recorded in the region descriptor. A
|
||||
region descriptor is a structure of type
|
||||
\Type{unw\_dyn\_region\_info\_t} and has the following members:
|
||||
\begin{description}
|
||||
\item[\Type{unw\_dyn\_region\_info\_t~*}\Var{next}] A pointer to the
|
||||
next region. If this is the last region, \Var{next} is \Const{NULL}.
|
||||
\item[\Type{int32\_t} \Var{insn\_count}] The length of the region in
|
||||
instructions. Each instruction is assumed to have a fixed size (see
|
||||
architecture-specific sections for details). The value of
|
||||
\Var{insn\_count} may be negative in the last region of a procedure
|
||||
(i.e., it may be negative only if \Var{next} is \Const{NULL}). A
|
||||
negative value indicates that the region covers the last \emph{N}
|
||||
instructions of the procedure, where \emph{N} is the absolute value
|
||||
of \Var{insn\_count}.
|
||||
\item[\Type{uint32\_t} \Var{op\_count}] The (allocated) length of
|
||||
the \Var{op\_count} array.
|
||||
\item[\Type{unw\_dyn\_op\_t} \Var{op}] An array of dynamic unwind
|
||||
directives. See Section ``Dynamic unwind directives'' for a
|
||||
description of the directives.
|
||||
\end{description}
|
||||
A region descriptor with an \Var{insn\_count} of zero is an
|
||||
\emph{empty region} and such regions are perfectly legal. In fact,
|
||||
empty regions can be useful to establish a particular frame state
|
||||
before the start of another region.
|
||||
|
||||
A single region list can be shared across multiple procedures provided
|
||||
those procedures share a common prologue and epilogue (their bodies
|
||||
may differ, of course). Normally, such procedures consist of a canned
|
||||
prologue, the body, and a canned epilogue. This could be described by
|
||||
two regions: one covering the prologue and one covering the epilogue.
|
||||
Since the body length is variable, the latter region would need to
|
||||
specify a negative value in \Var{insn\_count} such that
|
||||
\Prog{libunwind} knows that the region covers the end of the procedure
|
||||
(up to the address specified by \Var{end\_ip}).
|
||||
|
||||
The region descriptor is a variable length structure to make it
|
||||
possible to allocate all the necessary memory with a single
|
||||
memory-allocation request. To facilitate the allocation of a region
|
||||
descriptors \Prog{libunwind} provides a helper routine with the
|
||||
following synopsis:
|
||||
|
||||
\noindent
|
||||
\Type{size\_t} \Func{\_U\_dyn\_region\_size}(\Type{int} \Var{op\_count});
|
||||
|
||||
This routine returns the number of bytes needed to hold a region
|
||||
descriptor with space for \Var{op\_count} unwind directives. Note
|
||||
that the length of the \Var{op} array does not have to match exactly
|
||||
with the number of directives in a region. Instead, it is sufficient
|
||||
if the \Var{op} array contains at least as many entries as there are
|
||||
directives, since the end of the directives can always be indicated
|
||||
with the \Const{UNW\_DYN\_STOP} directive.
|
||||
|
||||
\section{Dynamic unwind directives}
|
||||
|
||||
A dynamic unwind directive describes how the frame state changes
|
||||
at a particular point within a region. The description is in
|
||||
the form of a structure of type \Type{unw\_dyn\_op\_t}. This
|
||||
structure has the following members:
|
||||
\begin{description}
|
||||
\item[\Type{int8\_t} \Var{tag}] The operation tag. Must be one
|
||||
of the \Type{unw\_dyn\_operation\_t} values described below.
|
||||
\item[\Type{int8\_t} \Var{qp}] The qualifying predicate that controls
|
||||
whether or not this directive is active. This is useful for
|
||||
predicated architecturs such as IA-64 or ARM, where the contents of
|
||||
another (callee-saved) register determines whether or not an
|
||||
instruction is executed (takes effect). If the directive is always
|
||||
active, this member should be set to the manifest constant
|
||||
\Const{\_U\_QP\_TRUE} (this constant is defined for all
|
||||
architectures, predicated or not).
|
||||
\item[\Type{int16\_t} \Var{reg}] The number of the register affected
|
||||
by the instruction.
|
||||
\item[\Type{int32\_t} \Var{when}] The region-relative number of
|
||||
the instruction to which this directive applies. For example,
|
||||
a value of 0 means that the effect described by this directive
|
||||
has taken place once the first instruction in the region has
|
||||
executed.
|
||||
\item[\Type{unw\_word\_t} \Var{val}] The value to be applied by the
|
||||
operation tag. The exact meaning of this value varies by tag. See
|
||||
Section ``Operation tags'' below.
|
||||
\end{description}
|
||||
It is perfectly legitimate to specify multiple dynamic unwind
|
||||
directives with the same \Var{when} value, if a particular instruction
|
||||
has a complex effect on the frame state.
|
||||
|
||||
Empty regions by definition contain no actual instructions and as such
|
||||
the directives are not tied to a particular instruction. By
|
||||
convention, the \Var{when} member should be set to 0, however.
|
||||
|
||||
There is no need for the dynamic unwind directives to appear
|
||||
in order of increasing \Var{when} values. If the directives happen to
|
||||
be sorted in that order, it may result in slightly faster execution,
|
||||
but a runtime code-generator should not go to extra lengths just to
|
||||
ensure that the directives are sorted.
|
||||
|
||||
IMPLEMENTATION NOTE: should \Prog{libunwind} implementations for
|
||||
certain architectures prefer the list of unwind directives to be
|
||||
sorted, it is recommended that such implementations first check
|
||||
whether the list happens to be sorted already and, if not, sort the
|
||||
directives explicitly before the first use. With this approach, the
|
||||
overhead of explicit sorting is only paid when there is a real benefit
|
||||
and if the runtime code-generator happens to generated sorted lists
|
||||
naturally, the performance penalty is limited to a simple O(N) check.
|
||||
|
||||
\subsection{Operations tags}
|
||||
|
||||
The possible operation tags are defined by enumeration type
|
||||
\Type{unw\_dyn\_operation\_t} which defines the following
|
||||
values:
|
||||
\begin{description}
|
||||
|
||||
\item[\Const{UNW\_DYN\_STOP}] Marks the end of the dynamic unwind
|
||||
directive list. All remaining entries in the \Var{op} array of the
|
||||
region-descriptor are ignored. This tag is guaranteed to have a
|
||||
value of 0.
|
||||
|
||||
\item[\Const{UNW\_DYN\_SAVE\_REG}] Marks an instruction which saves
|
||||
register \Var{reg} to register \Var{val}.
|
||||
|
||||
\item[\Const{UNW\_DYN\_SPILL\_FP\_REL}] Marks an instruction which
|
||||
spills register \Var{reg} to a frame-pointer-relative location. The
|
||||
frame-pointer-relative offset is given by the value stored in member
|
||||
\Var{val}. See the architecture-specific sections for a description
|
||||
of the stack frame layout.
|
||||
|
||||
\item[\Const{UNW\_DYN\_SPILL\_SP\_REL}] Marks an instruction which
|
||||
spills register \Var{reg} to a stack-pointer-relative location. The
|
||||
stack-pointer-relative offset is given by the value stored in member
|
||||
\Var{val}. See the architecture-specific sections for a description
|
||||
of the stack frame layout.
|
||||
|
||||
\item[\Const{UNW\_DYN\_ADD}] Marks an instruction which adds
|
||||
the constant value \Var{val} to register \Var{reg}. To add subtract
|
||||
a constant value, store the two's-complement of the value in
|
||||
\Var{val}. The set of registers that can be specified for this tag
|
||||
is described in the architecture-specific sections below.
|
||||
|
||||
\item[\Const{UNW\_DYN\_POP\_FRAMES}]
|
||||
|
||||
\item[\Const{UNW\_DYN\_LABEL\_STATE}]
|
||||
|
||||
\item[\Const{UNW\_DYN\_COPY\_STATE}]
|
||||
|
||||
\item[\Const{UNW\_DYN\_ALIAS}]
|
||||
|
||||
\end{description}
|
||||
|
||||
unw\_dyn\_op\_t
|
||||
|
||||
\_U\_dyn\_op\_save\_reg();
|
||||
\_U\_dyn\_op\_spill\_fp\_rel();
|
||||
\_U\_dyn\_op\_spill\_sp\_rel();
|
||||
\_U\_dyn\_op\_add();
|
||||
\_U\_dyn\_op\_pop\_frames();
|
||||
\_U\_dyn\_op\_label\_state();
|
||||
\_U\_dyn\_op\_copy\_state();
|
||||
\_U\_dyn\_op\_alias();
|
||||
\_U\_dyn\_op\_stop();
|
||||
|
||||
\section{IA-64 specifics}
|
||||
|
||||
- meaning of segbase member in table-info/table-remote-info format
|
||||
- format of table\_data in table-info/table-remote-info format
|
||||
- instruction size: each bundle is counted as 3 instructions, regardless
|
||||
of template (MLX)
|
||||
- describe stack-frame layout, especially with regards to sp-relative
|
||||
and fp-relative addressing
|
||||
- UNW\_DYN\_ADD can only add to ``sp'' (always a negative value); use
|
||||
POP\_FRAMES otherwise
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{\_U\_dyn\_register(3)},
|
||||
\SeeAlso{\_U\_dyn\_cancel(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
314
src/third_party/unwind/dist/doc/libunwind-ia64.man
vendored
314
src/third_party/unwind/dist/doc/libunwind-ia64.man
vendored
@ -1,314 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:44 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "LIBUNWIND\-IA64" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
libunwind\-ia64
|
||||
\-\- IA\-64\-specific support in libunwind
|
||||
.PP
|
||||
.SH INTRODUCTION
|
||||
|
||||
.PP
|
||||
The IA\-64 version of libunwind
|
||||
uses a platform\-string of
|
||||
ia64
|
||||
and, at least in theory, should be able to support all
|
||||
operating systems adhering to the processor\-specific ABI defined for
|
||||
the Itanium Processor Family. This includes both little\-endian Linux
|
||||
and big\-endian HP\-UX. Furthermore, to make it possible for a single
|
||||
library to unwind both 32\- and 64\-bit targets, the type
|
||||
unw_word_t
|
||||
is always defined to be 64 bits wide (independent
|
||||
of the natural word\-size of the host). Having said that, the current
|
||||
implementation has been tested only with IA\-64 Linux.
|
||||
.PP
|
||||
When targeting IA\-64, the libunwind
|
||||
header file defines the
|
||||
macro UNW_TARGET_IA64
|
||||
as 1 and the macro UNW_TARGET
|
||||
as ``ia64\&'' (without the quotation marks). The former makes it
|
||||
possible for platform\-dependent unwind code to use
|
||||
conditional\-compilation to select an appropriate implementation. The
|
||||
latter is useful for stringification purposes and to construct
|
||||
target\-platform\-specific symbols.
|
||||
.PP
|
||||
One special feature of IA\-64 is the use of NaT bits to support
|
||||
speculative execution. Often, NaT bits are thought of as the ``65\-th
|
||||
bit\&'' of a general register. However, to make everything fit into
|
||||
64\-bit wide unw_word_t
|
||||
values, libunwind
|
||||
treats the
|
||||
NaT\-bits like separate boolean registers, whose 64\-bit value is either
|
||||
TRUE (non\-zero) or FALSE (zero).
|
||||
.PP
|
||||
.SH MACHINE\-STATE
|
||||
|
||||
.PP
|
||||
The machine\-state (set of registers) that is accessible through
|
||||
libunwind
|
||||
depends on the type of stack frame that a cursor
|
||||
points to. For normal frames, all ``preserved\&'' (callee\-saved)
|
||||
registers are accessible. For signal\-trampoline frames, all registers
|
||||
(including ``scratch\&'' (caller\-saved) registers) are accessible. Most
|
||||
applications do not have to worry a\-priori about which registers are
|
||||
accessible when. In case of doubt, it is always safe to \fItry\fP
|
||||
to
|
||||
access a register (via unw_get_reg()
|
||||
or
|
||||
unw_get_fpreg())
|
||||
and if the register isn\&'t accessible, the
|
||||
call will fail with a return\-value of \-UNW_EBADREG\&.
|
||||
.PP
|
||||
As a special exception to the above general rule, scratch registers
|
||||
r15\-r18
|
||||
are always accessible, even in normal
|
||||
frames. This makes it possible to pass arguments, e.g., to exception
|
||||
handlers.
|
||||
.PP
|
||||
For a detailed description of the IA\-64 register usage convention,
|
||||
please see the ``Itanium Software Conventions and Runtime Architecture
|
||||
Guide\&'', available at:
|
||||
.ce 100
|
||||
\fBhttp://www.intel.com/design/itanium/downloads/245358.htm\fP
|
||||
.ce 0
|
||||
|
||||
.PP
|
||||
.SH REGISTER NAMES
|
||||
|
||||
.PP
|
||||
The IA\-64\-version of libunwind
|
||||
defines three kinds of register
|
||||
name macros: frame\-register macros, normal register macros, and
|
||||
convenience macros. Below, we describe each kind in turn:
|
||||
.PP
|
||||
.SS FRAME\-REGISTER MACROS
|
||||
.PP
|
||||
Frame\-registers are special (pseudo) registers because they always
|
||||
have a valid value, even though sometimes they do not get saved
|
||||
explicitly (e.g., if a memory stack frame is 16 bytes in size, the
|
||||
previous stack\-pointer value can be calculated simply as
|
||||
sp+16,
|
||||
so there is no need to save the stack\-pointer
|
||||
explicitly). Moreover, the set of frame register values uniquely
|
||||
identifies a stack frame. The IA\-64 architecture defines two stacks
|
||||
(a memory and a register stack). Including the instruction\-pointer
|
||||
(IP), this means there are three frame registers:
|
||||
.TP
|
||||
UNW_IA64_IP:
|
||||
Contains the instruction pointer (IP, or
|
||||
``program counter\&'') of the current stack frame. Given this value,
|
||||
the remaining machine\-state corresponds to the register\-values that
|
||||
were present in the CPU when it was just about to execute the
|
||||
instruction pointed to by UNW_IA64_IP\&.
|
||||
Bits 0 and 1 of
|
||||
this frame\-register encode the slot number of the instruction.
|
||||
\fBNote:\fP
|
||||
Due to the way the call instruction works on IA\-64,
|
||||
the slot number is usually zero, but can be non\-zero, e.g., in the
|
||||
stack\-frame of a signal\-handler trampoline.
|
||||
.TP
|
||||
UNW_IA64_SP:
|
||||
Contains the (memory) stack\-pointer
|
||||
value (SP).
|
||||
.TP
|
||||
UNW_IA64_BSP:
|
||||
Contains the register backing\-store
|
||||
pointer (BSP). \fBNote:\fP
|
||||
the value in this register is equal
|
||||
to the contents of register ar.bsp
|
||||
at the time the
|
||||
instruction at UNW_IA64_IP
|
||||
was about to begin execution.
|
||||
.PP
|
||||
.SS NORMAL REGISTER MACROS
|
||||
.PP
|
||||
The following normal register name macros are available:
|
||||
.TP
|
||||
UNW_IA64_GR:
|
||||
The base\-index for general (integer)
|
||||
registers. Add an index in the range from 0..127 to get a
|
||||
particular general register. For example, to access r4,
|
||||
the index UNW_IA64_GR+4
|
||||
should be used.
|
||||
Registers r0
|
||||
and r1
|
||||
(gp)
|
||||
are read\-only,
|
||||
and any attempt to write them will result in an error
|
||||
(\-UNW_EREADONLYREG).
|
||||
Even though r1
|
||||
is
|
||||
read\-only, libunwind
|
||||
will automatically adjust its value if
|
||||
the instruction\-pointer (UNW_IA64_IP)
|
||||
is modified. For
|
||||
example, if UNW_IA64_IP
|
||||
is set to a value inside a
|
||||
function func(),
|
||||
then reading
|
||||
UNW_IA64_GR+1
|
||||
will return the global\-pointer
|
||||
value for this function.
|
||||
.TP
|
||||
UNW_IA64_NAT:
|
||||
The base\-index for the NaT bits of the
|
||||
general (integer) registers. A non\-zero value in these registers
|
||||
corresponds to a set NaT\-bit. Add an index in the range from 0..127
|
||||
to get a particular NaT\-bit register. For example, to access the
|
||||
NaT bit of r4,
|
||||
the index UNW_IA64_NAT+4
|
||||
should be used.
|
||||
.TP
|
||||
UNW_IA64_FR:
|
||||
The base\-index for floating\-point
|
||||
registers. Add an index in the range from 0..127 to get a
|
||||
particular floating\-point register. For example, to access
|
||||
f2,
|
||||
the index UNW_IA64_FR+2
|
||||
should be
|
||||
used. Registers f0
|
||||
and f1
|
||||
are read\-only, and any
|
||||
attempt to write to indices UNW_IA64_FR+0
|
||||
or
|
||||
UNW_IA64_FR+1
|
||||
will result in an error
|
||||
(\-UNW_EREADONLYREG).
|
||||
.TP
|
||||
UNW_IA64_AR:
|
||||
The base\-index for application
|
||||
registers. Add an index in the range from 0..127 to get a
|
||||
particular application register. For example, to access
|
||||
ar40,
|
||||
the index UNW_IA64_AR+40
|
||||
should be
|
||||
used. The IA\-64 architecture defines several application registers
|
||||
as ``reserved for future use\&''\&. Attempting to access such registers
|
||||
results in an error (\-UNW_EBADREG).
|
||||
.TP
|
||||
UNW_IA64_BR:
|
||||
The base\-index for branch registers.
|
||||
Add an index in the range from 0..7 to get a particular branch
|
||||
register. For example, to access b6,
|
||||
the index
|
||||
UNW_IA64_BR+6
|
||||
should be used.
|
||||
.TP
|
||||
UNW_IA64_PR:
|
||||
Contains the set of predicate registers.
|
||||
This 64\-bit wide register contains registers p0
|
||||
through
|
||||
p63
|
||||
in the ``broad\-side\&'' format. Just like with the
|
||||
``move predicates\&'' instruction, the registers are mapped as if
|
||||
CFM.rrb.pr
|
||||
were set to 0. Thus, in general the value of
|
||||
predicate register pN
|
||||
with N>=16 can be found
|
||||
in bit 16 + ((N\-16)+CFM.rrb.pr) % 48\&.
|
||||
.TP
|
||||
UNW_IA64_CFM:
|
||||
Contains the current\-frame\-mask
|
||||
register.
|
||||
.PP
|
||||
.SS CONVENIENCE MACROS
|
||||
.PP
|
||||
Convenience macros are simply aliases for certain frequently used
|
||||
registers:
|
||||
.TP
|
||||
UNW_IA64_GP:
|
||||
Alias for UNW_IA64_GR+1,
|
||||
the global\-pointer register.
|
||||
.TP
|
||||
UNW_IA64_TP:
|
||||
Alias for UNW_IA64_GR+13,
|
||||
the thread\-pointer register.
|
||||
.TP
|
||||
UNW_IA64_AR_RSC:
|
||||
Alias for UNW_IA64_GR+16,
|
||||
the register\-stack configuration register.
|
||||
.TP
|
||||
UNW_IA64_AR_BSP:
|
||||
Alias for
|
||||
UNW_IA64_GR+17\&.
|
||||
This register index accesses the
|
||||
value of register ar.bsp
|
||||
as of the time it was last saved
|
||||
explicitly. This is rarely what you want. Normally, you\&'ll want to
|
||||
use UNW_IA64_BSP
|
||||
instead.
|
||||
.TP
|
||||
UNW_IA64_AR_BSPSTORE:
|
||||
Alias for UNW_IA64_GR+18,
|
||||
the register\-backing store write pointer.
|
||||
.TP
|
||||
UNW_IA64_AR_RNAT:
|
||||
Alias for UNW_IA64_GR+19,
|
||||
the register\-backing store NaT\-collection register.
|
||||
.TP
|
||||
UNW_IA64_AR_CCV:
|
||||
Alias for UNW_IA64_GR+32,
|
||||
the compare\-and\-swap value register.
|
||||
.TP
|
||||
UNW_IA64_AR_CSD:
|
||||
Alias for UNW_IA64_GR+25,
|
||||
the compare\-and\-swap\-data register (used by 16\-byte atomic operations).
|
||||
.TP
|
||||
UNW_IA64_AR_UNAT:
|
||||
Alias for UNW_IA64_GR+36,
|
||||
the user NaT\-collection register.
|
||||
.TP
|
||||
UNW_IA64_AR_FPSR:
|
||||
Alias for UNW_IA64_GR+40,
|
||||
the floating\-point status (and control) register.
|
||||
.TP
|
||||
UNW_IA64_AR_PFS:
|
||||
Alias for UNW_IA64_GR+64,
|
||||
the previous frame\-state register.
|
||||
.TP
|
||||
UNW_IA64_AR_LC:
|
||||
Alias for UNW_IA64_GR+65
|
||||
the loop\-count register.
|
||||
.TP
|
||||
UNW_IA64_AR_EC:
|
||||
Alias for UNW_IA64_GR+66,
|
||||
the epilogue\-count register.
|
||||
.PP
|
||||
.SH THE UNWIND\-CONTEXT TYPE
|
||||
|
||||
.PP
|
||||
On IA\-64, unw_context_t
|
||||
is simply an alias for
|
||||
ucontext_t
|
||||
(as defined by the Single UNIX Spec). This implies
|
||||
that it is possible to initialize a value of this type not just with
|
||||
unw_getcontext(),
|
||||
but also with getcontext(),
|
||||
for
|
||||
example. However, since this is an IA\-64\-specific extension to
|
||||
libunwind,
|
||||
portable code should not rely on this equivalence.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
216
src/third_party/unwind/dist/doc/libunwind-ia64.tex
vendored
216
src/third_party/unwind/dist/doc/libunwind-ia64.tex
vendored
@ -1,216 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{libunwind-ia64}{David Mosberger-Tang}{Programming Library}{IA-64-specific support in libunwind}libunwind-ia64 -- IA-64-specific support in libunwind
|
||||
\end{Name}
|
||||
|
||||
|
||||
\section{Introduction}
|
||||
|
||||
The IA-64 version of \Prog{libunwind} uses a platform-string of
|
||||
\texttt{ia64} and, at least in theory, should be able to support all
|
||||
operating systems adhering to the processor-specific ABI defined for
|
||||
the Itanium Processor Family. This includes both little-endian Linux
|
||||
and big-endian HP-UX. Furthermore, to make it possible for a single
|
||||
library to unwind both 32- and 64-bit targets, the type
|
||||
\Type{unw\_word\_t} is always defined to be 64 bits wide (independent
|
||||
of the natural word-size of the host). Having said that, the current
|
||||
implementation has been tested only with IA-64 Linux.
|
||||
|
||||
When targeting IA-64, the \Prog{libunwind} header file defines the
|
||||
macro \Const{UNW\_TARGET\_IA64} as 1 and the macro \Const{UNW\_TARGET}
|
||||
as ``ia64'' (without the quotation marks). The former makes it
|
||||
possible for platform-dependent unwind code to use
|
||||
conditional-compilation to select an appropriate implementation. The
|
||||
latter is useful for stringification purposes and to construct
|
||||
target-platform-specific symbols.
|
||||
|
||||
One special feature of IA-64 is the use of NaT bits to support
|
||||
speculative execution. Often, NaT bits are thought of as the ``65-th
|
||||
bit'' of a general register. However, to make everything fit into
|
||||
64-bit wide \Type{unw\_word\_t} values, \Prog{libunwind} treats the
|
||||
NaT-bits like separate boolean registers, whose 64-bit value is either
|
||||
TRUE (non-zero) or FALSE (zero).
|
||||
|
||||
|
||||
\section{Machine-State}
|
||||
|
||||
The machine-state (set of registers) that is accessible through
|
||||
\Prog{libunwind} depends on the type of stack frame that a cursor
|
||||
points to. For normal frames, all ``preserved'' (callee-saved)
|
||||
registers are accessible. For signal-trampoline frames, all registers
|
||||
(including ``scratch'' (caller-saved) registers) are accessible. Most
|
||||
applications do not have to worry a-priori about which registers are
|
||||
accessible when. In case of doubt, it is always safe to \emph{try} to
|
||||
access a register (via \Func{unw\_get\_reg}() or
|
||||
\Func{unw\_get\_fpreg}()) and if the register isn't accessible, the
|
||||
call will fail with a return-value of \texttt{-}\Const{UNW\_EBADREG}.
|
||||
|
||||
As a special exception to the above general rule, scratch registers
|
||||
\texttt{r15}-\texttt{r18} are always accessible, even in normal
|
||||
frames. This makes it possible to pass arguments, e.g., to exception
|
||||
handlers.
|
||||
|
||||
For a detailed description of the IA-64 register usage convention,
|
||||
please see the ``Itanium Software Conventions and Runtime Architecture
|
||||
Guide'', available at:
|
||||
\begin{center}
|
||||
\URL{http://www.intel.com/design/itanium/downloads/245358.htm}
|
||||
\end{center}
|
||||
|
||||
|
||||
\section{Register Names}
|
||||
|
||||
The IA-64-version of \Prog{libunwind} defines three kinds of register
|
||||
name macros: frame-register macros, normal register macros, and
|
||||
convenience macros. Below, we describe each kind in turn:
|
||||
|
||||
|
||||
\subsection{Frame-register Macros}
|
||||
|
||||
Frame-registers are special (pseudo) registers because they always
|
||||
have a valid value, even though sometimes they do not get saved
|
||||
explicitly (e.g., if a memory stack frame is 16 bytes in size, the
|
||||
previous stack-pointer value can be calculated simply as
|
||||
\texttt{sp+16}, so there is no need to save the stack-pointer
|
||||
explicitly). Moreover, the set of frame register values uniquely
|
||||
identifies a stack frame. The IA-64 architecture defines two stacks
|
||||
(a memory and a register stack). Including the instruction-pointer
|
||||
(IP), this means there are three frame registers:
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_IA64\_IP}:] Contains the instruction pointer (IP, or
|
||||
``program counter'') of the current stack frame. Given this value,
|
||||
the remaining machine-state corresponds to the register-values that
|
||||
were present in the CPU when it was just about to execute the
|
||||
instruction pointed to by \Const{UNW\_IA64\_IP}. Bits 0 and 1 of
|
||||
this frame-register encode the slot number of the instruction.
|
||||
\textbf{Note:} Due to the way the call instruction works on IA-64,
|
||||
the slot number is usually zero, but can be non-zero, e.g., in the
|
||||
stack-frame of a signal-handler trampoline.
|
||||
\item[\Const{UNW\_IA64\_SP}:] Contains the (memory) stack-pointer
|
||||
value (SP).
|
||||
\item[\Const{UNW\_IA64\_BSP}:] Contains the register backing-store
|
||||
pointer (BSP). \textbf{Note:} the value in this register is equal
|
||||
to the contents of register \texttt{ar.bsp} at the time the
|
||||
instruction at \Const{UNW\_IA64\_IP} was about to begin execution.
|
||||
\end{Description}
|
||||
|
||||
|
||||
\subsection{Normal Register Macros}
|
||||
|
||||
The following normal register name macros are available:
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_IA64\_GR}:] The base-index for general (integer)
|
||||
registers. Add an index in the range from 0..127 to get a
|
||||
particular general register. For example, to access \texttt{r4},
|
||||
the index \Const{UNW\_IA64\_GR}\texttt{+4} should be used.
|
||||
Registers \texttt{r0} and \texttt{r1} (\texttt{gp}) are read-only,
|
||||
and any attempt to write them will result in an error
|
||||
(\texttt{-}\Const{UNW\_EREADONLYREG}). Even though \texttt{r1} is
|
||||
read-only, \Prog{libunwind} will automatically adjust its value if
|
||||
the instruction-pointer (\Const{UNW\_IA64\_IP}) is modified. For
|
||||
example, if \Const{UNW\_IA64\_IP} is set to a value inside a
|
||||
function \Func{func}(), then reading
|
||||
\Const{UNW\_IA64\_GR}\texttt{+1} will return the global-pointer
|
||||
value for this function.
|
||||
\item[\Const{UNW\_IA64\_NAT}:] The base-index for the NaT bits of the
|
||||
general (integer) registers. A non-zero value in these registers
|
||||
corresponds to a set NaT-bit. Add an index in the range from 0..127
|
||||
to get a particular NaT-bit register. For example, to access the
|
||||
NaT bit of \texttt{r4}, the index \Const{UNW\_IA64\_NAT}\texttt{+4}
|
||||
should be used.
|
||||
\item[\Const{UNW\_IA64\_FR}:] The base-index for floating-point
|
||||
registers. Add an index in the range from 0..127 to get a
|
||||
particular floating-point register. For example, to access
|
||||
\texttt{f2}, the index \Const{UNW\_IA64\_FR}\texttt{+2} should be
|
||||
used. Registers \texttt{f0} and \texttt{f1} are read-only, and any
|
||||
attempt to write to indices \Const{UNW\_IA64\_FR}\texttt{+0} or
|
||||
\Const{UNW\_IA64\_FR}\texttt{+1} will result in an error
|
||||
(\texttt{-}\Const{UNW\_EREADONLYREG}).
|
||||
\item[\Const{UNW\_IA64\_AR}:] The base-index for application
|
||||
registers. Add an index in the range from 0..127 to get a
|
||||
particular application register. For example, to access
|
||||
\texttt{ar40}, the index \Const{UNW\_IA64\_AR}\texttt{+40} should be
|
||||
used. The IA-64 architecture defines several application registers
|
||||
as ``reserved for future use''. Attempting to access such registers
|
||||
results in an error (\texttt{-}\Const{UNW\_EBADREG}).
|
||||
\item[\Const{UNW\_IA64\_BR}:] The base-index for branch registers.
|
||||
Add an index in the range from 0..7 to get a particular branch
|
||||
register. For example, to access \texttt{b6}, the index
|
||||
\Const{UNW\_IA64\_BR}\texttt{+6} should be used.
|
||||
\item[\Const{UNW\_IA64\_PR}:] Contains the set of predicate registers.
|
||||
This 64-bit wide register contains registers \texttt{p0} through
|
||||
\texttt{p63} in the ``broad-side'' format. Just like with the
|
||||
``move predicates'' instruction, the registers are mapped as if
|
||||
\texttt{CFM.rrb.pr} were set to 0. Thus, in general the value of
|
||||
predicate register \texttt{p}$N$ with $N$>=16 can be found
|
||||
in bit \texttt{16 + (($N$-16)+CFM.rrb.pr) \% 48}.
|
||||
\item[\Const{UNW\_IA64\_CFM}:] Contains the current-frame-mask
|
||||
register.
|
||||
\end{Description}
|
||||
|
||||
|
||||
\subsection{Convenience Macros}
|
||||
|
||||
Convenience macros are simply aliases for certain frequently used
|
||||
registers:
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_IA64\_GP}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+1},
|
||||
the global-pointer register.
|
||||
\item[\Const{UNW\_IA64\_TP}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+13},
|
||||
the thread-pointer register.
|
||||
\item[\Const{UNW\_IA64\_AR\_RSC}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+16},
|
||||
the register-stack configuration register.
|
||||
\item[\Const{UNW\_IA64\_AR\_BSP}:] Alias for
|
||||
\Const{UNW\_IA64\_GR}\texttt{+17}. This register index accesses the
|
||||
value of register \texttt{ar.bsp} as of the time it was last saved
|
||||
explicitly. This is rarely what you want. Normally, you'll want to
|
||||
use \Const{UNW\_IA64\_BSP} instead.
|
||||
\item[\Const{UNW\_IA64\_AR\_BSPSTORE}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+18},
|
||||
the register-backing store write pointer.
|
||||
\item[\Const{UNW\_IA64\_AR\_RNAT}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+19},
|
||||
the register-backing store NaT-collection register.
|
||||
\item[\Const{UNW\_IA64\_AR\_CCV}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+32},
|
||||
the compare-and-swap value register.
|
||||
\item[\Const{UNW\_IA64\_AR\_CSD}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+25},
|
||||
the compare-and-swap-data register (used by 16-byte atomic operations).
|
||||
\item[\Const{UNW\_IA64\_AR\_UNAT}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+36},
|
||||
the user NaT-collection register.
|
||||
\item[\Const{UNW\_IA64\_AR\_FPSR}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+40},
|
||||
the floating-point status (and control) register.
|
||||
\item[\Const{UNW\_IA64\_AR\_PFS}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+64},
|
||||
the previous frame-state register.
|
||||
\item[\Const{UNW\_IA64\_AR\_LC}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+65}
|
||||
the loop-count register.
|
||||
\item[\Const{UNW\_IA64\_AR\_EC}:] Alias for \Const{UNW\_IA64\_GR}\texttt{+66},
|
||||
the epilogue-count register.
|
||||
\end{Description}
|
||||
|
||||
|
||||
\section{The Unwind-Context Type}
|
||||
|
||||
On IA-64, \Type{unw\_context\_t} is simply an alias for
|
||||
\Type{ucontext\_t} (as defined by the Single UNIX Spec). This implies
|
||||
that it is possible to initialize a value of this type not just with
|
||||
\Func{unw\_getcontext}(), but also with \Func{getcontext}(), for
|
||||
example. However, since this is an IA-64-specific extension to
|
||||
\Prog{libunwind}, portable code should not rely on this equivalence.
|
||||
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
220
src/third_party/unwind/dist/doc/libunwind-ptrace.man
vendored
220
src/third_party/unwind/dist/doc/libunwind-ptrace.man
vendored
@ -1,220 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:44 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "LIBUNWIND\-PTRACE" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
libunwind\-ptrace
|
||||
\-\- ptrace() support in libunwind
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind\-ptrace.h>
|
||||
.br
|
||||
.PP
|
||||
unw_accessors_t
|
||||
_UPT_accessors;
|
||||
.br
|
||||
.PP
|
||||
void *_UPT_create(pid_t);
|
||||
.br
|
||||
void
|
||||
_UPT_destroy(void *);
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
_UPT_find_proc_info(unw_addr_space_t,
|
||||
unw_word_t,
|
||||
unw_proc_info_t *,
|
||||
int,
|
||||
void *);
|
||||
.br
|
||||
void
|
||||
_UPT_put_unwind_info(unw_addr_space_t,
|
||||
unw_proc_info_t *,
|
||||
void *);
|
||||
.br
|
||||
int
|
||||
_UPT_get_dyn_info_list_addr(unw_addr_space_t,
|
||||
unw_word_t *,
|
||||
void *);
|
||||
.br
|
||||
int
|
||||
_UPT_access_mem(unw_addr_space_t,
|
||||
unw_word_t,
|
||||
unw_word_t *,
|
||||
int,
|
||||
void *);
|
||||
.br
|
||||
int
|
||||
_UPT_access_reg(unw_addr_space_t,
|
||||
unw_regnum_t,
|
||||
unw_word_t *,
|
||||
int,
|
||||
void *);
|
||||
.br
|
||||
int
|
||||
_UPT_access_fpreg(unw_addr_space_t,
|
||||
unw_regnum_t,
|
||||
unw_fpreg_t *,
|
||||
int,
|
||||
void *);
|
||||
.br
|
||||
int
|
||||
_UPT_get_proc_name(unw_addr_space_t,
|
||||
unw_word_t,
|
||||
char *,
|
||||
size_t,
|
||||
unw_word_t *,
|
||||
void *);
|
||||
.br
|
||||
int
|
||||
_UPT_resume(unw_addr_space_t,
|
||||
unw_cursor_t *,
|
||||
void *);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The ptrace(2)
|
||||
system\-call makes it possible for a process to
|
||||
gain access to the machine\-state and virtual memory of \fIanother\fP
|
||||
process. With the right set of call\-back routines, it is therefore
|
||||
possible to hook up libunwind
|
||||
to another process via
|
||||
ptrace(2).
|
||||
While it\&'s not very difficult to do so directly,
|
||||
libunwind
|
||||
further facilitates this task by providing
|
||||
ready\-to\-use callbacks for this purpose. The routines and variables
|
||||
implementing this facility use a name\-prefix of _UPT,
|
||||
which is
|
||||
stands for ``unwind\-via\-ptrace\&''\&.
|
||||
.PP
|
||||
An application that wants to use the _UPT\-facility
|
||||
first needs
|
||||
to create a new libunwind
|
||||
address\-space that represents the
|
||||
target process. This is done by calling
|
||||
unw_create_addr_space().
|
||||
In many cases, the application
|
||||
will simply want to pass the address of _UPT_accessors
|
||||
as the
|
||||
first argument to this routine. Doing so will ensure that
|
||||
libunwind
|
||||
will be able to properly unwind the target process.
|
||||
However, in special circumstances, an application may prefer to use
|
||||
only portions of the _UPT\-facility.
|
||||
For this reason, the
|
||||
individual callback routines (_UPT_find_proc_info(),
|
||||
_UPT_put_unwind_info(),
|
||||
etc.) are also available for direct
|
||||
use. Of course, the addresses of these routines could also be picked
|
||||
up from _UPT_accessors,
|
||||
but doing so would prevent static
|
||||
initialization. Also, when using _UPT_accessors,
|
||||
\fIall\fP
|
||||
the callback routines will be linked into the application, even if
|
||||
they are never actually called.
|
||||
.PP
|
||||
Next, the application can turn on ptrace\-mode on the target process,
|
||||
either by forking a new process, invoking PTRACE_TRACEME,
|
||||
and
|
||||
then starting the target program (via execve(2)),
|
||||
or by
|
||||
directly attaching to an already running process (via
|
||||
PTRACE_ATTACH).
|
||||
Either way, once the process\-ID (pid) of the
|
||||
target process is known, a _UPT\-info\-structure
|
||||
can be created
|
||||
by calling _UPT_create(),
|
||||
passing the pid of the target process
|
||||
as the only argument. The returned void\-pointer then needs to be
|
||||
passed as the ``argument\&'' pointer (third argument) to
|
||||
unw_init_remote().
|
||||
.PP
|
||||
The _UPT_resume()
|
||||
routine can be used to resume execution of
|
||||
the target process. It simply invokes ptrace(2)
|
||||
with a command
|
||||
value of PTRACE_CONT\&.
|
||||
.PP
|
||||
When the application is done using libunwind
|
||||
on the target
|
||||
process, _UPT_destroy()
|
||||
needs to be called, passing it the
|
||||
void\-pointer that was returned by the corresponding call to
|
||||
_UPT_create().
|
||||
This ensures that all memory and other
|
||||
resources are freed up.
|
||||
.PP
|
||||
.SH AVAILABILITY
|
||||
|
||||
.PP
|
||||
Since ptrace(2)
|
||||
works within a single machine only, the
|
||||
_UPT\-facility
|
||||
by definition is not available in
|
||||
libunwind\-versions
|
||||
configured for cross\-unwinding.
|
||||
.PP
|
||||
.SH THREAD SAFETY
|
||||
|
||||
.PP
|
||||
The _UPT\-facility
|
||||
assumes that a single _UPT\-info
|
||||
structure is never shared between threads. Because of this, no
|
||||
explicit locking is used. As long as only one thread uses
|
||||
a _UPT\-info
|
||||
structure at any given time, this facility
|
||||
is thread\-safe.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
_UPT_create()
|
||||
may return a NULL
|
||||
pointer if it fails
|
||||
to create the _UPT\-info\-structure
|
||||
for any reason. For the
|
||||
current implementation, the only reason this call may fail is when the
|
||||
system is out of memory.
|
||||
.PP
|
||||
.SH FILES
|
||||
|
||||
.PP
|
||||
.TP
|
||||
libunwind\-ptrace.h
|
||||
Headerfile to include when using the
|
||||
interface defined by this library.
|
||||
.TP
|
||||
\fB\-l\fPunwind\-ptrace \fB\-l\fPunwind\-generic
|
||||
Linker\-switches to add when building a program that uses the
|
||||
functions defined by this library.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
execve(2),
|
||||
libunwind(3),
|
||||
ptrace(2)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
134
src/third_party/unwind/dist/doc/libunwind-ptrace.tex
vendored
134
src/third_party/unwind/dist/doc/libunwind-ptrace.tex
vendored
@ -1,134 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{libunwind-ptrace}{David Mosberger-Tang}{Programming Library}{ptrace() support in libunwind}libunwind-ptrace -- ptrace() support in libunwind
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind-ptrace.h$>$}\\
|
||||
|
||||
\noindent
|
||||
\Type{unw\_accessors\_t} \Var{\_UPT\_accessors};\\
|
||||
|
||||
\Type{void~*}\Func{\_UPT\_create}(\Type{pid\_t});\\
|
||||
\noindent
|
||||
\Type{void} \Func{\_UPT\_destroy}(\Type{void~*});\\
|
||||
|
||||
\noindent
|
||||
\Type{int} \Func{\_UPT\_find\_proc\_info}(\Type{unw\_addr\_space\_t}, \Type{unw\_word\_t}, \Type{unw\_proc\_info\_t~*}, \Type{int}, \Type{void~*});\\
|
||||
\noindent
|
||||
\Type{void} \Func{\_UPT\_put\_unwind\_info}(\Type{unw\_addr\_space\_t}, \Type{unw\_proc\_info\_t~*}, \Type{void~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{\_UPT\_get\_dyn\_info\_list\_addr}(\Type{unw\_addr\_space\_t}, \Type{unw\_word\_t~*}, \Type{void~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{\_UPT\_access\_mem}(\Type{unw\_addr\_space\_t}, \Type{unw\_word\_t}, \Type{unw\_word\_t~*}, \Type{int}, \Type{void~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{\_UPT\_access\_reg}(\Type{unw\_addr\_space\_t}, \Type{unw\_regnum\_t}, \Type{unw\_word\_t~*}, \Type{int}, \Type{void~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{\_UPT\_access\_fpreg}(\Type{unw\_addr\_space\_t}, \Type{unw\_regnum\_t}, \Type{unw\_fpreg\_t~*}, \Type{int}, \Type{void~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{\_UPT\_get\_proc\_name}(\Type{unw\_addr\_space\_t}, \Type{unw\_word\_t}, \Type{char~*}, \Type{size\_t}, \Type{unw\_word\_t~*}, \Type{void~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{\_UPT\_resume}(\Type{unw\_addr\_space\_t}, \Type{unw\_cursor\_t~*}, \Type{void~*});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{ptrace}(2) system-call makes it possible for a process to
|
||||
gain access to the machine-state and virtual memory of \emph{another}
|
||||
process. With the right set of call-back routines, it is therefore
|
||||
possible to hook up \Prog{libunwind} to another process via
|
||||
\Func{ptrace}(2). While it's not very difficult to do so directly,
|
||||
\Prog{libunwind} further facilitates this task by providing
|
||||
ready-to-use callbacks for this purpose. The routines and variables
|
||||
implementing this facility use a name-prefix of \Func{\_UPT}, which is
|
||||
stands for ``unwind-via-ptrace''.
|
||||
|
||||
An application that wants to use the \Func{\_UPT}-facility first needs
|
||||
to create a new \Prog{libunwind} address-space that represents the
|
||||
target process. This is done by calling
|
||||
\Func{unw\_create\_addr\_space}(). In many cases, the application
|
||||
will simply want to pass the address of \Var{\_UPT\_accessors} as the
|
||||
first argument to this routine. Doing so will ensure that
|
||||
\Prog{libunwind} will be able to properly unwind the target process.
|
||||
However, in special circumstances, an application may prefer to use
|
||||
only portions of the \Prog{\_UPT}-facility. For this reason, the
|
||||
individual callback routines (\Func{\_UPT\_find\_proc\_info}(),
|
||||
\Func{\_UPT\_put\_unwind\_info}(), etc.) are also available for direct
|
||||
use. Of course, the addresses of these routines could also be picked
|
||||
up from \Var{\_UPT\_accessors}, but doing so would prevent static
|
||||
initialization. Also, when using \Var{\_UPT\_accessors}, \emph{all}
|
||||
the callback routines will be linked into the application, even if
|
||||
they are never actually called.
|
||||
|
||||
Next, the application can turn on ptrace-mode on the target process,
|
||||
either by forking a new process, invoking \Const{PTRACE\_TRACEME}, and
|
||||
then starting the target program (via \Func{execve}(2)), or by
|
||||
directly attaching to an already running process (via
|
||||
\Const{PTRACE\_ATTACH}). Either way, once the process-ID (pid) of the
|
||||
target process is known, a \Prog{\_UPT}-info-structure can be created
|
||||
by calling \Func{\_UPT\_create}(), passing the pid of the target process
|
||||
as the only argument. The returned void-pointer then needs to be
|
||||
passed as the ``argument'' pointer (third argument) to
|
||||
\Func{unw\_init\_remote}().
|
||||
|
||||
The \Func{\_UPT\_resume}() routine can be used to resume execution of
|
||||
the target process. It simply invokes \Func{ptrace}(2) with a command
|
||||
value of \Const{PTRACE\_CONT}.
|
||||
|
||||
When the application is done using \Prog{libunwind} on the target
|
||||
process, \Func{\_UPT\_destroy}() needs to be called, passing it the
|
||||
void-pointer that was returned by the corresponding call to
|
||||
\Func{\_UPT\_create}(). This ensures that all memory and other
|
||||
resources are freed up.
|
||||
|
||||
\section{Availability}
|
||||
|
||||
Since \Func{ptrace}(2) works within a single machine only, the
|
||||
\Prog{\_UPT}-facility by definition is not available in
|
||||
\Prog{libunwind}-versions configured for cross-unwinding.
|
||||
|
||||
\section{Thread Safety}
|
||||
|
||||
The \Prog{\_UPT}-facility assumes that a single \Prog{\_UPT}-info
|
||||
structure is never shared between threads. Because of this, no
|
||||
explicit locking is used. As long as only one thread uses
|
||||
a \Prog{\_UPT}-info structure at any given time, this facility
|
||||
is thread-safe.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
\Func{\_UPT\_create}() may return a \Const{NULL} pointer if it fails
|
||||
to create the \Prog{\_UPT}-info-structure for any reason. For the
|
||||
current implementation, the only reason this call may fail is when the
|
||||
system is out of memory.
|
||||
|
||||
\section{Files}
|
||||
|
||||
\begin{Description}
|
||||
\item[\File{libunwind-ptrace.h}] Headerfile to include when using the
|
||||
interface defined by this library.
|
||||
\item[\Opt{-l}\File{unwind-ptrace} \Opt{-l}\File{unwind-generic}]
|
||||
Linker-switches to add when building a program that uses the
|
||||
functions defined by this library.
|
||||
\end{Description}
|
||||
|
||||
\section{See Also}
|
||||
|
||||
execve(2),
|
||||
\SeeAlso{libunwind(3)},
|
||||
ptrace(2)
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
132
src/third_party/unwind/dist/doc/libunwind-setjmp.man
vendored
132
src/third_party/unwind/dist/doc/libunwind-setjmp.man
vendored
@ -1,132 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:44 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "LIBUNWIND\-SETJMP" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
libunwind\-setjmp
|
||||
\-\- libunwind\-based non\-local gotos
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <setjmp.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
setjmp(jmp_buf env);
|
||||
.br
|
||||
void
|
||||
longjmp(jmp_buf env,
|
||||
int val);
|
||||
.br
|
||||
int
|
||||
_setjmp(jmp_buf env);
|
||||
.br
|
||||
void
|
||||
_longjmp(jmp_buf env,
|
||||
int val);
|
||||
.br
|
||||
int
|
||||
sigsetjmp(sigjmp_buf env,
|
||||
int savemask);
|
||||
.br
|
||||
void
|
||||
siglongjmp(sigjmp_buf env,
|
||||
int val);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unwind\-setjmp
|
||||
library offers a libunwind\-based
|
||||
implementation of non\-local gotos. This implementation is intended to
|
||||
be a drop\-in replacement for the normal, system\-provided routines of
|
||||
the same name. The main advantage of using the unwind\-setjmp
|
||||
library is that setting up a non\-local goto via one of the
|
||||
setjmp()
|
||||
routines is very fast. Typically, just 2 or 3 words
|
||||
need to be saved in the jump\-buffer (plus one call to
|
||||
sigprocmask(2),
|
||||
in the case of sigsetjmp).
|
||||
On the
|
||||
other hand, executing a non\-local goto by calling one of the
|
||||
longjmp()
|
||||
routines tends to be much slower than with the
|
||||
system\-provided routines. In fact, the time spent on a
|
||||
longjmp()
|
||||
will be proportional to the number of call frames
|
||||
that exist between the points where setjmp()
|
||||
and
|
||||
longjmp()
|
||||
were called. For this reason, the
|
||||
unwind\-setjmp
|
||||
library is beneficial primarily in applications
|
||||
that frequently call setjmp()
|
||||
but only rarely call
|
||||
longjmp().
|
||||
.PP
|
||||
.SH CAVEATS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
.B *
|
||||
The correct operation of this library depends on the presence of
|
||||
correct unwind information. On newer platforms, this is rarely an
|
||||
issue. On older platforms, care needs to be taken to
|
||||
ensure that each of the functions whose stack frames may have to be
|
||||
unwound during a longjmp()
|
||||
have correct unwind information
|
||||
(on those platforms, there is usually a compiler\-switch, such as
|
||||
\fB\-funwind\-tables\fP,
|
||||
to request the generation of unwind
|
||||
information).
|
||||
.TP
|
||||
.B *
|
||||
The contents of jmp_buf and sigjmp_buf as setup
|
||||
and used by these routines is completely different from the ones
|
||||
used by the system\-provided routines. Thus, a jump\-buffer created
|
||||
by the libunwind\-based setjmp()/_setjmp
|
||||
may only be
|
||||
used in a call to the libunwind\-based
|
||||
longjmp()/_longjmp().
|
||||
The analogous applies for
|
||||
sigjmp_buf
|
||||
with sigsetjmp()
|
||||
and siglongjmp().
|
||||
.PP
|
||||
.SH FILES
|
||||
|
||||
.PP
|
||||
.TP
|
||||
\fB\-l\fPunwind\-setjmp
|
||||
The library an application should
|
||||
be linked against to ensure it uses the libunwind\-based non\-local
|
||||
goto routines.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
setjmp(3), longjmp(3),
|
||||
_setjmp(3), _longjmp(3),
|
||||
sigsetjmp(3), siglongjmp(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,87 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{libunwind-setjmp}{David Mosberger-Tang}{Programming Library}{libunwind-based non-local gotos}libunwind-setjmp -- libunwind-based non-local gotos
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$setjmp.h$>$}\\
|
||||
|
||||
\noindent
|
||||
\Type{int} \Func{setjmp}(\Type{jmp\_buf}~\Var{env});\\
|
||||
\Type{void} \Func{longjmp}(\Type{jmp\_buf}~\Var{env}, \Type{int}~\Var{val});\\
|
||||
\Type{int} \Func{\_setjmp}(\Type{jmp\_buf}~\Var{env});\\
|
||||
\Type{void} \Func{\_longjmp}(\Type{jmp\_buf}~\Var{env}, \Type{int}~\Var{val});\\
|
||||
\Type{int} \Func{sigsetjmp}(\Type{sigjmp\_buf}~\Var{env}, \Type{int}~\Var{savemask});\\
|
||||
\Type{void} \Func{siglongjmp}(\Type{sigjmp\_buf}~\Var{env}, \Type{int}~\Var{val});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Prog{unwind-setjmp} library offers a \Prog{libunwind}-based
|
||||
implementation of non-local gotos. This implementation is intended to
|
||||
be a drop-in replacement for the normal, system-provided routines of
|
||||
the same name. The main advantage of using the \Prog{unwind-setjmp}
|
||||
library is that setting up a non-local goto via one of the
|
||||
\Func{setjmp}() routines is very fast. Typically, just 2 or 3 words
|
||||
need to be saved in the jump-buffer (plus one call to
|
||||
\Func{sigprocmask}(2), in the case of \Func{sigsetjmp}). On the
|
||||
other hand, executing a non-local goto by calling one of the
|
||||
\Func{longjmp}() routines tends to be much slower than with the
|
||||
system-provided routines. In fact, the time spent on a
|
||||
\Func{longjmp}() will be proportional to the number of call frames
|
||||
that exist between the points where \Func{setjmp}() and
|
||||
\Func{longjmp}() were called. For this reason, the
|
||||
\Prog{unwind-setjmp} library is beneficial primarily in applications
|
||||
that frequently call \Func{setjmp}() but only rarely call
|
||||
\Func{longjmp}().
|
||||
|
||||
\section{Caveats}
|
||||
|
||||
\begin{itemize}
|
||||
\item The correct operation of this library depends on the presence of
|
||||
correct unwind information. On newer platforms, this is rarely an
|
||||
issue. On older platforms, care needs to be taken to
|
||||
ensure that each of the functions whose stack frames may have to be
|
||||
unwound during a \Func{longjmp}() have correct unwind information
|
||||
(on those platforms, there is usually a compiler-switch, such as
|
||||
\Opt{-funwind-tables}, to request the generation of unwind
|
||||
information).
|
||||
\item The contents of \Type{jmp\_buf} and \Type{sigjmp\_buf} as setup
|
||||
and used by these routines is completely different from the ones
|
||||
used by the system-provided routines. Thus, a jump-buffer created
|
||||
by the libunwind-based \Func{setjmp}()/\Func{\_setjmp} may only be
|
||||
used in a call to the libunwind-based
|
||||
\Func{longjmp}()/\Func{\_longjmp}(). The analogous applies for
|
||||
\Type{sigjmp\_buf} with \Func{sigsetjmp}() and \Func{siglongjmp}().
|
||||
\end{itemize}
|
||||
|
||||
\section{Files}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Opt{-l}\File{unwind-setjmp}] The library an application should
|
||||
be linked against to ensure it uses the libunwind-based non-local
|
||||
goto routines.
|
||||
\end{Description}
|
||||
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
setjmp(3), longjmp(3),
|
||||
\_setjmp(3), \_longjmp(3),
|
||||
sigsetjmp(3), siglongjmp(3)
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
508
src/third_party/unwind/dist/doc/libunwind.man
vendored
508
src/third_party/unwind/dist/doc/libunwind.man
vendored
@ -1,508 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Jan 12 06:50:29 PST 2017
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "LIBUNWIND" "3" "12 January 2017" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
libunwind
|
||||
\-\- a (mostly) platform\-independent unwind API
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_getcontext(unw_context_t *);
|
||||
.br
|
||||
int
|
||||
unw_init_local(unw_cursor_t *,
|
||||
unw_context_t *);
|
||||
.br
|
||||
int
|
||||
unw_init_remote(unw_cursor_t *,
|
||||
unw_addr_space_t,
|
||||
void *);
|
||||
.br
|
||||
int
|
||||
unw_step(unw_cursor_t *);
|
||||
.br
|
||||
int
|
||||
unw_get_reg(unw_cursor_t *,
|
||||
unw_regnum_t,
|
||||
unw_word_t *);
|
||||
.br
|
||||
int
|
||||
unw_get_fpreg(unw_cursor_t *,
|
||||
unw_regnum_t,
|
||||
unw_fpreg_t *);
|
||||
.br
|
||||
int
|
||||
unw_set_reg(unw_cursor_t *,
|
||||
unw_regnum_t,
|
||||
unw_word_t);
|
||||
.br
|
||||
int
|
||||
unw_set_fpreg(unw_cursor_t *,
|
||||
unw_regnum_t,
|
||||
unw_fpreg_t);
|
||||
.br
|
||||
int
|
||||
unw_resume(unw_cursor_t *);
|
||||
.br
|
||||
.PP
|
||||
unw_addr_space_t
|
||||
unw_local_addr_space;
|
||||
.br
|
||||
unw_addr_space_t
|
||||
unw_create_addr_space(unw_accessors_t,
|
||||
int);
|
||||
.br
|
||||
void
|
||||
unw_destroy_addr_space(unw_addr_space_t);
|
||||
.br
|
||||
unw_accessors_t
|
||||
unw_get_accessors(unw_addr_space_t);
|
||||
.br
|
||||
void
|
||||
unw_flush_cache(unw_addr_space_t,
|
||||
unw_word_t,
|
||||
unw_word_t);
|
||||
.br
|
||||
int
|
||||
unw_set_caching_policy(unw_addr_space_t,
|
||||
unw_caching_policy_t);
|
||||
.br
|
||||
int
|
||||
unw_set_cache_size(unw_addr_space_t,
|
||||
size_t,
|
||||
int);
|
||||
.br
|
||||
.PP
|
||||
const char *unw_regname(unw_regnum_t);
|
||||
.br
|
||||
int
|
||||
unw_get_proc_info(unw_cursor_t *,
|
||||
unw_proc_info_t *);
|
||||
.br
|
||||
int
|
||||
unw_get_save_loc(unw_cursor_t *,
|
||||
int,
|
||||
unw_save_loc_t *);
|
||||
.br
|
||||
int
|
||||
unw_is_fpreg(unw_regnum_t);
|
||||
.br
|
||||
int
|
||||
unw_is_signal_frame(unw_cursor_t *);
|
||||
.br
|
||||
int
|
||||
unw_get_proc_name(unw_cursor_t *,
|
||||
char *,
|
||||
size_t,
|
||||
unw_word_t *);
|
||||
.br
|
||||
.PP
|
||||
void
|
||||
_U_dyn_register(unw_dyn_info_t *);
|
||||
.br
|
||||
void
|
||||
_U_dyn_cancel(unw_dyn_info_t *);
|
||||
.br
|
||||
.PP
|
||||
.SH LOCAL UNWINDING
|
||||
|
||||
.PP
|
||||
Libunwind
|
||||
is very easy to use when unwinding a stack from
|
||||
within a running program. This is called \fIlocal\fP
|
||||
unwinding. Say
|
||||
you want to unwind the stack while executing in some function
|
||||
F().
|
||||
In this function, you would call unw_getcontext()
|
||||
to get a snapshot of the CPU registers (machine\-state). Then you
|
||||
initialize an \fIunwind cursor\fP
|
||||
based on this snapshot. This is
|
||||
done with a call to unw_init_local().
|
||||
The cursor now points
|
||||
to the current frame, that is, the stack frame that corresponds to the
|
||||
current activation of function F().
|
||||
The unwind cursor can then
|
||||
be moved ``up\&'' (towards earlier stack frames) by calling
|
||||
unw_step().
|
||||
By repeatedly calling this routine, you can
|
||||
uncover the entire call\-chain that led to the activation of function
|
||||
F().
|
||||
A positive return value from unw_step()
|
||||
indicates
|
||||
that there are more frames in the chain, zero indicates that the end
|
||||
of the chain has been reached, and any negative value indicates that
|
||||
some sort of error has occurred.
|
||||
.PP
|
||||
While it is not possible to directly move the unwind cursor in the
|
||||
``down\&'' direction (towards newer stack frames), this effect can be
|
||||
achieved by making copies of an unwind cursor. For example, a program
|
||||
that sometimes has to move ``down\&'' by one stack frame could maintain
|
||||
two cursor variables: ``curr\&''
|
||||
and ``prev\&''\&.
|
||||
The former
|
||||
would be used as the current cursor and prev
|
||||
would be maintained
|
||||
as the ``previous frame\&'' cursor by copying the contents of curr
|
||||
to prev
|
||||
right before calling unw_step().
|
||||
With this
|
||||
approach, the program could move one step ``down\&'' simply by copying
|
||||
back prev
|
||||
to curr
|
||||
whenever that is necessary. In the most
|
||||
extreme case, a program could maintain a separate cursor for each call
|
||||
frame and that way it could move up and down the callframe\-chain at
|
||||
will.
|
||||
.PP
|
||||
Given an unwind cursor, it is possible to read and write the CPU
|
||||
registers that were preserved for the current stack frame (as
|
||||
identified by the cursor). Libunwind
|
||||
provides several routines
|
||||
for this purpose: unw_get_reg()
|
||||
reads an integer (general)
|
||||
register, unw_get_fpreg()
|
||||
reads a floating\-point register,
|
||||
unw_set_reg()
|
||||
writes an integer register, and
|
||||
unw_set_fpreg()
|
||||
writes a floating\-point register. Note that,
|
||||
by definition, only the \fIpreserved\fP
|
||||
machine state can be accessed
|
||||
during an unwind operation. Normally, this state consists of the
|
||||
\fIcallee\-saved\fP
|
||||
(``preserved\&'') registers. However, in some
|
||||
special circumstances (e.g., in a signal handler trampoline), even the
|
||||
\fIcaller\-saved\fP
|
||||
(``scratch\&'') registers are preserved in the stack
|
||||
frame and, in those cases, libunwind
|
||||
will grant access to them
|
||||
as well. The exact set of registers that can be accessed via the
|
||||
cursor depends, of course, on the platform. However, there are two
|
||||
registers that can be read on all platforms: the instruction pointer
|
||||
(IP), sometimes also known as the ``program counter\&'', and the stack
|
||||
pointer (SP). In libunwind,
|
||||
these registers are identified by
|
||||
the macros UNW_REG_IP
|
||||
and UNW_REG_SP,
|
||||
respectively.
|
||||
.PP
|
||||
Besides just moving the unwind cursor and reading/writing saved
|
||||
registers, libunwind
|
||||
also provides the ability to resume
|
||||
execution at an arbitrary stack frame. As you might guess, this is
|
||||
useful for implementing non\-local gotos and the exception handling
|
||||
needed by some high\-level languages such as Java. Resuming execution
|
||||
with a particular stack frame simply requires calling
|
||||
unw_resume()
|
||||
and passing the cursor identifying the target
|
||||
frame as the only argument.
|
||||
.PP
|
||||
Normally, libunwind
|
||||
supports both local and remote unwinding
|
||||
(the latter will be explained in the next section). However, if you
|
||||
tell libunwind that your program only needs local unwinding, then a
|
||||
special implementation can be selected which may run much faster than
|
||||
the generic implementation which supports both kinds of unwinding. To
|
||||
select this optimized version, simply define the macro
|
||||
UNW_LOCAL_ONLY
|
||||
before including the headerfile
|
||||
<libunwind.h>\&.
|
||||
It is perfectly OK for a single program to
|
||||
employ both local\-only and generic unwinding. That is, whether or not
|
||||
UNW_LOCAL_ONLY
|
||||
is defined is a choice that each source\-file
|
||||
(compilation\-unit) can make on its own. Independent of the setting(s)
|
||||
of UNW_LOCAL_ONLY,
|
||||
you\&'ll always link the same library into
|
||||
the program (normally \fB\-l\fPunwind).
|
||||
Furthermore, the
|
||||
portion of libunwind
|
||||
that manages unwind\-info for dynamically
|
||||
generated code is not affected by the setting of
|
||||
UNW_LOCAL_ONLY\&.
|
||||
.PP
|
||||
If we put all of the above together, here is how we could use
|
||||
libunwind
|
||||
to write a function ``show_backtrace()\&''
|
||||
which prints a classic stack trace:
|
||||
.PP
|
||||
.Vb
|
||||
#define UNW_LOCAL_ONLY
|
||||
#include <libunwind.h>
|
||||
|
||||
void show_backtrace (void) {
|
||||
unw_cursor_t cursor; unw_context_t uc;
|
||||
unw_word_t ip, sp;
|
||||
|
||||
unw_getcontext(&uc);
|
||||
unw_init_local(&cursor, &uc);
|
||||
while (unw_step(&cursor) > 0) {
|
||||
unw_get_reg(&cursor, UNW_REG_IP, &ip);
|
||||
unw_get_reg(&cursor, UNW_REG_SP, &sp);
|
||||
printf ("ip = %lx, sp = %lx\\n", (long) ip, (long) sp);
|
||||
}
|
||||
}
|
||||
.Ve
|
||||
.PP
|
||||
.SH REMOTE UNWINDING
|
||||
|
||||
.PP
|
||||
Libunwind
|
||||
can also be used to unwind a stack in a ``remote\&''
|
||||
process. Here, ``remote\&'' may mean another process on the same
|
||||
machine or even a process on a completely different machine from the
|
||||
one that is running libunwind\&.
|
||||
Remote unwinding is typically
|
||||
used by debuggers and instruction\-set simulators, for example.
|
||||
.PP
|
||||
Before you can unwind a remote process, you need to create a new
|
||||
address\-space object for that process. This is achieved with the
|
||||
unw_create_addr_space()
|
||||
routine. The routine takes two
|
||||
arguments: a pointer to a set of \fIaccessor\fP
|
||||
routines and an
|
||||
integer that specifies the byte\-order of the target process. The
|
||||
accessor routines provide libunwind
|
||||
with the means to
|
||||
communicate with the remote process. In particular, there are
|
||||
callbacks to read and write the process\&'s memory, its registers, and
|
||||
to access unwind information which may be needed by libunwind\&.
|
||||
.PP
|
||||
With the address space created, unwinding can be initiated by a call
|
||||
to unw_init_remote().
|
||||
This routine is very similar to
|
||||
unw_init_local(),
|
||||
except that it takes an address\-space
|
||||
object and an opaque pointer as arguments. The routine uses these
|
||||
arguments to fetch the initial machine state. Libunwind
|
||||
never
|
||||
uses the opaque pointer on its own, but instead just passes it on to
|
||||
the accessor (callback) routines. Typically, this pointer is used to
|
||||
select, e.g., the thread within a process that is to be unwound.
|
||||
.PP
|
||||
Once a cursor has been initialized with unw_init_remote(),
|
||||
unwinding works exactly like in the local case. That is, you can use
|
||||
unw_step()
|
||||
to move ``up\&'' in the call\-chain, read and write
|
||||
registers, or resume execution at a particular stack frame by calling
|
||||
unw_resume\&.
|
||||
.PP
|
||||
.SH CROSS\-PLATFORM AND MULTI\-PLATFORM UNWINDING
|
||||
|
||||
.PP
|
||||
Libunwind
|
||||
has been designed to enable unwinding across
|
||||
platforms (architectures). Indeed, a single program can use
|
||||
libunwind
|
||||
to unwind an arbitrary number of target platforms,
|
||||
all at the same time!
|
||||
.PP
|
||||
We call the machine that is running libunwind
|
||||
the \fIhost\fP
|
||||
and the machine that is running the process being unwound the
|
||||
\fItarget\fP\&.
|
||||
If the host and the target platform are the same, we
|
||||
call it \fInative\fP
|
||||
unwinding. If they differ, we call it
|
||||
\fIcross\-platform\fP
|
||||
unwinding.
|
||||
.PP
|
||||
The principle behind supporting native, cross\-platform, and
|
||||
multi\-platform unwinding is very simple: for native unwinding, a
|
||||
program includes <libunwind.h>
|
||||
and uses the linker switch
|
||||
\fB\-l\fPunwind\&.
|
||||
For cross\-platform unwinding, a program
|
||||
includes <libunwind\-PLAT\&.h>
|
||||
and uses the linker
|
||||
switch \fB\-l\fPunwind\-PLAT,
|
||||
where PLAT
|
||||
is the name
|
||||
of the target platform (e.g., ia64
|
||||
for IA\-64, hppa\-elf
|
||||
for ELF\-based HP PA\-RISC, or x86
|
||||
for 80386). Multi\-platform
|
||||
unwinding works exactly like cross\-platform unwinding, the only
|
||||
limitation is that a single source file (compilation unit) can include
|
||||
at most one libunwind
|
||||
header file. In other words, the
|
||||
platform\-specific support for each supported target needs to be
|
||||
isolated in separate source files\-\-\-a limitation that shouldn\&'t be an
|
||||
issue in practice.
|
||||
.PP
|
||||
Note that, by definition, local unwinding is possible only for the
|
||||
native case. Attempting to call, e.g., unw_local_init()
|
||||
when
|
||||
targeting a cross\-platform will result in a link\-time error
|
||||
(unresolved references).
|
||||
.PP
|
||||
.SH THREAD\- AND SIGNAL\-SAFETY
|
||||
|
||||
.PP
|
||||
All libunwind
|
||||
routines are thread\-safe. What this means is
|
||||
that multiple threads may use libunwind
|
||||
simulatenously.
|
||||
However, any given cursor may be accessed by only one thread at
|
||||
any given time.
|
||||
.PP
|
||||
To ensure thread\-safety, some libunwind
|
||||
routines may have to
|
||||
use locking. Such routines \fImust not\fP
|
||||
be called from signal
|
||||
handlers (directly or indirectly) and are therefore \fInot\fP
|
||||
signal\-safe. The manual page for each libunwind
|
||||
routine
|
||||
identifies whether or not it is signal\-safe, but as a general rule,
|
||||
any routine that may be needed for \fIlocal\fP
|
||||
unwinding is
|
||||
signal\-safe (e.g., unw_step()
|
||||
for local unwinding is
|
||||
signal\-safe). For remote\-unwinding, \fInone\fP
|
||||
of the
|
||||
libunwind
|
||||
routines are guaranteed to be signal\-safe.
|
||||
.PP
|
||||
.SH UNWINDING THROUGH DYNAMICALLY GENERATED CODE
|
||||
|
||||
.PP
|
||||
Libunwind
|
||||
provides the routines _U_dyn_register()
|
||||
and
|
||||
_U_dyn_cancel()
|
||||
to register/cancel the information required to
|
||||
unwind through code that has been generated at runtime (e.g., by a
|
||||
just\-in\-time (JIT) compiler). It is important to register the
|
||||
information for \fIall\fP
|
||||
dynamically generated code because
|
||||
otherwise, a debugger may not be able to function properly or
|
||||
high\-level language exception handling may not work as expected.
|
||||
.PP
|
||||
The interface for registering and canceling dynamic unwind info has
|
||||
been designed for maximum efficiency, so as to minimize the
|
||||
performance impact on JIT\-compilers. In particular, both routines are
|
||||
guaranteed to execute in ``constant time\&'' (O(1)) and the
|
||||
data\-structure encapsulating the dynamic unwind info has been designed
|
||||
to facilitate sharing, such that similar procedures can share much of
|
||||
the underlying information.
|
||||
.PP
|
||||
For more information on the libunwind
|
||||
support for dynamically
|
||||
generated code, see libunwind\-dynamic(3)\&.
|
||||
.PP
|
||||
.SH CACHING OF UNWIND INFO
|
||||
|
||||
.PP
|
||||
To speed up execution, libunwind
|
||||
may aggressively cache the
|
||||
information it needs to perform unwinding. If a process changes
|
||||
during its lifetime, this creates a risk of libunwind
|
||||
using
|
||||
stale data. For example, this would happen if libunwind
|
||||
were
|
||||
to cache information about a shared library which later on gets
|
||||
unloaded (e.g., via \fIdlclose\fP(3)).
|
||||
.PP
|
||||
To prevent the risk of using stale data, libunwind
|
||||
provides two
|
||||
facilities: first, it is possible to flush the cached information
|
||||
associated with a specific address range in the target process (or the
|
||||
entire address space, if desired). This functionality is provided by
|
||||
unw_flush_cache().
|
||||
The second facility is provided by
|
||||
unw_set_caching_policy(),
|
||||
which lets a program
|
||||
select the exact caching policy in use for a given address\-space
|
||||
object. In particular, by selecting the policy
|
||||
UNW_CACHE_NONE,
|
||||
it is possible to turn off caching
|
||||
completely, therefore eliminating the risk of stale data alltogether
|
||||
(at the cost of slower execution). By default, caching is enabled for
|
||||
local unwinding only. The cache size can be dynamically changed with
|
||||
unw_set_cache_size(),
|
||||
which also fluches the current cache.
|
||||
.PP
|
||||
.SH FILES
|
||||
|
||||
.PP
|
||||
.TP
|
||||
libunwind.h
|
||||
Headerfile to include for native (same
|
||||
platform) unwinding.
|
||||
.TP
|
||||
libunwind\-PLAT\&.h
|
||||
Headerfile to include when
|
||||
the unwind target runs on platform PLAT\&.
|
||||
For example, to unwind
|
||||
an IA\-64 program, the header file libunwind\-ia64.h
|
||||
should be
|
||||
included.
|
||||
.TP
|
||||
\fB\-l\fPunwind
|
||||
Linker\-switch to add when building a
|
||||
program that does native (same platform) unwinding.
|
||||
.TP
|
||||
\fB\-l\fPunwind\-PLAT
|
||||
Linker\-switch to add when
|
||||
building a program that unwinds a program on platform PLAT\&.
|
||||
For example, to (cross\-)unwind an IA\-64 program, the linker switch
|
||||
\-lunwind\-ia64
|
||||
should be added. Note: multiple such switches
|
||||
may need to be specified for programs that can unwind programs on
|
||||
multiple platforms.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind\-dynamic(3),
|
||||
libunwind\-ia64(3),
|
||||
libunwind\-ptrace(3),
|
||||
libunwind\-setjmp(3),
|
||||
unw_create_addr_space(3),
|
||||
unw_destroy_addr_space(3),
|
||||
unw_flush_cache(3),
|
||||
unw_get_accessors(3),
|
||||
unw_get_fpreg(3),
|
||||
unw_get_proc_info(3),
|
||||
unw_get_proc_name(3),
|
||||
unw_get_reg(3),
|
||||
unw_getcontext(3),
|
||||
unw_init_local(3),
|
||||
unw_init_remote(3),
|
||||
unw_is_fpreg(3),
|
||||
unw_is_signal_frame(3),
|
||||
unw_regname(3),
|
||||
unw_resume(3),
|
||||
unw_set_caching_policy(3),
|
||||
unw_set_cache_size(3),
|
||||
unw_set_fpreg(3),
|
||||
unw_set_reg(3),
|
||||
unw_step(3),
|
||||
unw_strerror(3),
|
||||
_U_dyn_register(3),
|
||||
_U_dyn_cancel(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
359
src/third_party/unwind/dist/doc/libunwind.tex
vendored
359
src/third_party/unwind/dist/doc/libunwind.tex
vendored
@ -1,359 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{libunwind}{David Mosberger-Tang}{Programming Library}{Introduction to libunwind}libunwind -- a (mostly) platform-independent unwind API
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_getcontext}(\Type{unw\_context\_t~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_init\_local}(\Type{unw\_cursor\_t~*}, \Type{unw\_context\_t~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_init\_remote}(\Type{unw\_cursor\_t~*}, \Type{unw\_addr\_space\_t}, \Type{void~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_step}(\Type{unw\_cursor\_t~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_get\_reg}(\Type{unw\_cursor\_t~*}, \Type{unw\_regnum\_t}, \Type{unw\_word\_t~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_get\_fpreg}(\Type{unw\_cursor\_t~*}, \Type{unw\_regnum\_t}, \Type{unw\_fpreg\_t~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_set\_reg}(\Type{unw\_cursor\_t~*}, \Type{unw\_regnum\_t}, \Type{unw\_word\_t});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_set\_fpreg}(\Type{unw\_cursor\_t~*}, \Type{unw\_regnum\_t}, \Type{unw\_fpreg\_t});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_resume}(\Type{unw\_cursor\_t~*});\\
|
||||
|
||||
\noindent
|
||||
\Type{unw\_addr\_space\_t} \Var{unw\_local\_addr\_space};\\
|
||||
\noindent
|
||||
\Type{unw\_addr\_space\_t} \Func{unw\_create\_addr\_space}(\Type{unw\_accessors\_t}, \Type{int});\\
|
||||
\noindent
|
||||
\Type{void} \Func{unw\_destroy\_addr\_space}(\Type{unw\_addr\_space\_t});\\
|
||||
\noindent
|
||||
\Type{unw\_accessors\_t} \Func{unw\_get\_accessors}(\Type{unw\_addr\_space\_t});\\
|
||||
\noindent
|
||||
\Type{void} \Func{unw\_flush\_cache}(\Type{unw\_addr\_space\_t}, \Type{unw\_word\_t}, \Type{unw\_word\_t});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_set\_caching\_policy}(\Type{unw\_addr\_space\_t}, \Type{unw\_caching\_policy\_t});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_set\_cache\_size}(\Type{unw\_addr\_space\_t}, \Type{size\_t}, \Type{int});\\
|
||||
|
||||
\noindent
|
||||
\Type{const char *}\Func{unw\_regname}(\Type{unw\_regnum\_t});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_get\_proc\_info}(\Type{unw\_cursor\_t~*}, \Type{unw\_proc\_info\_t~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_get\_save\_loc}(\Type{unw\_cursor\_t~*}, \Type{int}, \Type{unw\_save\_loc\_t~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_is\_fpreg}(\Type{unw\_regnum\_t});\\
|
||||
\Type{int} \Func{unw\_is\_signal\_frame}(\Type{unw\_cursor\_t~*});\\
|
||||
\noindent
|
||||
\Type{int} \Func{unw\_get\_proc\_name}(\Type{unw\_cursor\_t~*}, \Type{char~*}, \Type{size\_t}, \Type{unw\_word\_t~*});\\
|
||||
|
||||
\noindent
|
||||
\Type{void} \Func{\_U\_dyn\_register}(\Type{unw\_dyn\_info\_t~*});\\
|
||||
\noindent
|
||||
\Type{void} \Func{\_U\_dyn\_cancel}(\Type{unw\_dyn\_info\_t~*});\\
|
||||
|
||||
\section{Local Unwinding}
|
||||
|
||||
\Prog{Libunwind} is very easy to use when unwinding a stack from
|
||||
within a running program. This is called \emph{local} unwinding. Say
|
||||
you want to unwind the stack while executing in some function
|
||||
\Func{F}(). In this function, you would call \Func{unw\_getcontext}()
|
||||
to get a snapshot of the CPU registers (machine-state). Then you
|
||||
initialize an \emph{unwind~cursor} based on this snapshot. This is
|
||||
done with a call to \Func{unw\_init\_local}(). The cursor now points
|
||||
to the current frame, that is, the stack frame that corresponds to the
|
||||
current activation of function \Func{F}(). The unwind cursor can then
|
||||
be moved ``up'' (towards earlier stack frames) by calling
|
||||
\Func{unw\_step}(). By repeatedly calling this routine, you can
|
||||
uncover the entire call-chain that led to the activation of function
|
||||
\Func{F}(). A positive return value from \Func{unw\_step}() indicates
|
||||
that there are more frames in the chain, zero indicates that the end
|
||||
of the chain has been reached, and any negative value indicates that
|
||||
some sort of error has occurred.
|
||||
|
||||
While it is not possible to directly move the unwind cursor in the
|
||||
``down'' direction (towards newer stack frames), this effect can be
|
||||
achieved by making copies of an unwind cursor. For example, a program
|
||||
that sometimes has to move ``down'' by one stack frame could maintain
|
||||
two cursor variables: ``\Var{curr}'' and ``\Var{prev}''. The former
|
||||
would be used as the current cursor and \Var{prev} would be maintained
|
||||
as the ``previous frame'' cursor by copying the contents of \Var{curr}
|
||||
to \Var{prev} right before calling \Func{unw\_step}(). With this
|
||||
approach, the program could move one step ``down'' simply by copying
|
||||
back \Var{prev} to \Var{curr} whenever that is necessary. In the most
|
||||
extreme case, a program could maintain a separate cursor for each call
|
||||
frame and that way it could move up and down the callframe-chain at
|
||||
will.
|
||||
|
||||
Given an unwind cursor, it is possible to read and write the CPU
|
||||
registers that were preserved for the current stack frame (as
|
||||
identified by the cursor). \Prog{Libunwind} provides several routines
|
||||
for this purpose: \Func{unw\_get\_reg}() reads an integer (general)
|
||||
register, \Func{unw\_get\_fpreg}() reads a floating-point register,
|
||||
\Func{unw\_set\_reg}() writes an integer register, and
|
||||
\Func{unw\_set\_fpreg}() writes a floating-point register. Note that,
|
||||
by definition, only the \emph{preserved} machine state can be accessed
|
||||
during an unwind operation. Normally, this state consists of the
|
||||
\emph{callee-saved} (``preserved'') registers. However, in some
|
||||
special circumstances (e.g., in a signal handler trampoline), even the
|
||||
\emph{caller-saved} (``scratch'') registers are preserved in the stack
|
||||
frame and, in those cases, \Prog{libunwind} will grant access to them
|
||||
as well. The exact set of registers that can be accessed via the
|
||||
cursor depends, of course, on the platform. However, there are two
|
||||
registers that can be read on all platforms: the instruction pointer
|
||||
(IP), sometimes also known as the ``program counter'', and the stack
|
||||
pointer (SP). In \Prog{libunwind}, these registers are identified by
|
||||
the macros \Const{UNW\_REG\_IP} and \Const{UNW\_REG\_SP},
|
||||
respectively.
|
||||
|
||||
Besides just moving the unwind cursor and reading/writing saved
|
||||
registers, \Prog{libunwind} also provides the ability to resume
|
||||
execution at an arbitrary stack frame. As you might guess, this is
|
||||
useful for implementing non-local gotos and the exception handling
|
||||
needed by some high-level languages such as Java. Resuming execution
|
||||
with a particular stack frame simply requires calling
|
||||
\Func{unw\_resume}() and passing the cursor identifying the target
|
||||
frame as the only argument.
|
||||
|
||||
Normally, \Prog{libunwind} supports both local and remote unwinding
|
||||
(the latter will be explained in the next section). However, if you
|
||||
tell libunwind that your program only needs local unwinding, then a
|
||||
special implementation can be selected which may run much faster than
|
||||
the generic implementation which supports both kinds of unwinding. To
|
||||
select this optimized version, simply define the macro
|
||||
\Const{UNW\_LOCAL\_ONLY} before including the headerfile
|
||||
\File{$<$libunwind.h$>$}. It is perfectly OK for a single program to
|
||||
employ both local-only and generic unwinding. That is, whether or not
|
||||
\Const{UNW\_LOCAL\_ONLY} is defined is a choice that each source-file
|
||||
(compilation-unit) can make on its own. Independent of the setting(s)
|
||||
of \Const{UNW\_LOCAL\_ONLY}, you'll always link the same library into
|
||||
the program (normally \Opt{-l}\File{unwind}). Furthermore, the
|
||||
portion of \Prog{libunwind} that manages unwind-info for dynamically
|
||||
generated code is not affected by the setting of
|
||||
\Const{UNW\_LOCAL\_ONLY}.
|
||||
|
||||
If we put all of the above together, here is how we could use
|
||||
\Prog{libunwind} to write a function ``\Func{show\_backtrace}()''
|
||||
which prints a classic stack trace:
|
||||
|
||||
\begin{verbatim}
|
||||
#define UNW_LOCAL_ONLY
|
||||
#include <libunwind.h>
|
||||
|
||||
void show_backtrace (void) {
|
||||
unw_cursor_t cursor; unw_context_t uc;
|
||||
unw_word_t ip, sp;
|
||||
|
||||
unw_getcontext(&uc);
|
||||
unw_init_local(&cursor, &uc);
|
||||
while (unw_step(&cursor) > 0) {
|
||||
unw_get_reg(&cursor, UNW_REG_IP, &ip);
|
||||
unw_get_reg(&cursor, UNW_REG_SP, &sp);
|
||||
printf ("ip = %lx, sp = %lx\n", (long) ip, (long) sp);
|
||||
}
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\section{Remote Unwinding}
|
||||
|
||||
\Prog{Libunwind} can also be used to unwind a stack in a ``remote''
|
||||
process. Here, ``remote'' may mean another process on the same
|
||||
machine or even a process on a completely different machine from the
|
||||
one that is running \Prog{libunwind}. Remote unwinding is typically
|
||||
used by debuggers and instruction-set simulators, for example.
|
||||
|
||||
Before you can unwind a remote process, you need to create a new
|
||||
address-space object for that process. This is achieved with the
|
||||
\Func{unw\_create\_addr\_space}() routine. The routine takes two
|
||||
arguments: a pointer to a set of \emph{accessor} routines and an
|
||||
integer that specifies the byte-order of the target process. The
|
||||
accessor routines provide \Func{libunwind} with the means to
|
||||
communicate with the remote process. In particular, there are
|
||||
callbacks to read and write the process's memory, its registers, and
|
||||
to access unwind information which may be needed by \Func{libunwind}.
|
||||
|
||||
With the address space created, unwinding can be initiated by a call
|
||||
to \Func{unw\_init\_remote}(). This routine is very similar to
|
||||
\Func{unw\_init\_local}(), except that it takes an address-space
|
||||
object and an opaque pointer as arguments. The routine uses these
|
||||
arguments to fetch the initial machine state. \Prog{Libunwind} never
|
||||
uses the opaque pointer on its own, but instead just passes it on to
|
||||
the accessor (callback) routines. Typically, this pointer is used to
|
||||
select, e.g., the thread within a process that is to be unwound.
|
||||
|
||||
Once a cursor has been initialized with \Func{unw\_init\_remote}(),
|
||||
unwinding works exactly like in the local case. That is, you can use
|
||||
\Func{unw\_step}() to move ``up'' in the call-chain, read and write
|
||||
registers, or resume execution at a particular stack frame by calling
|
||||
\Func{unw\_resume}.
|
||||
|
||||
|
||||
\section{Cross-platform and Multi-platform Unwinding}
|
||||
|
||||
\Prog{Libunwind} has been designed to enable unwinding across
|
||||
platforms (architectures). Indeed, a single program can use
|
||||
\Prog{libunwind} to unwind an arbitrary number of target platforms,
|
||||
all at the same time!
|
||||
|
||||
We call the machine that is running \Prog{libunwind} the \emph{host}
|
||||
and the machine that is running the process being unwound the
|
||||
\emph{target}. If the host and the target platform are the same, we
|
||||
call it \emph{native} unwinding. If they differ, we call it
|
||||
\emph{cross-platform} unwinding.
|
||||
|
||||
The principle behind supporting native, cross-platform, and
|
||||
multi-platform unwinding is very simple: for native unwinding, a
|
||||
program includes \File{$<$libunwind.h$>$} and uses the linker switch
|
||||
\Opt{-l}\File{unwind}. For cross-platform unwinding, a program
|
||||
includes \File{$<$libunwind-}\Var{PLAT}\File{.h$>$} and uses the linker
|
||||
switch \Opt{-l}\File{unwind-}\Var{PLAT}, where \Var{PLAT} is the name
|
||||
of the target platform (e.g., \File{ia64} for IA-64, \File{hppa-elf}
|
||||
for ELF-based HP PA-RISC, or \File{x86} for 80386). Multi-platform
|
||||
unwinding works exactly like cross-platform unwinding, the only
|
||||
limitation is that a single source file (compilation unit) can include
|
||||
at most one \Prog{libunwind} header file. In other words, the
|
||||
platform-specific support for each supported target needs to be
|
||||
isolated in separate source files---a limitation that shouldn't be an
|
||||
issue in practice.
|
||||
|
||||
Note that, by definition, local unwinding is possible only for the
|
||||
native case. Attempting to call, e.g., \Func{unw\_local\_init}() when
|
||||
targeting a cross-platform will result in a link-time error
|
||||
(unresolved references).
|
||||
|
||||
|
||||
\section{Thread- and Signal-Safety}
|
||||
|
||||
|
||||
All \Prog{libunwind} routines are thread-safe. What this means is
|
||||
that multiple threads may use \Prog{libunwind} simulatenously.
|
||||
However, any given cursor may be accessed by only one thread at
|
||||
any given time.
|
||||
|
||||
To ensure thread-safety, some \Prog{libunwind} routines may have to
|
||||
use locking. Such routines \emph{must~not} be called from signal
|
||||
handlers (directly or indirectly) and are therefore \emph{not}
|
||||
signal-safe. The manual page for each \Prog{libunwind} routine
|
||||
identifies whether or not it is signal-safe, but as a general rule,
|
||||
any routine that may be needed for \emph{local} unwinding is
|
||||
signal-safe (e.g., \Func{unw\_step}() for local unwinding is
|
||||
signal-safe). For remote-unwinding, \emph{none} of the
|
||||
\Prog{libunwind} routines are guaranteed to be signal-safe.
|
||||
|
||||
|
||||
\section{Unwinding Through Dynamically Generated Code}
|
||||
|
||||
\Func{Libunwind} provides the routines \Func{\_U\_dyn\_register}() and
|
||||
\Func{\_U\_dyn\_cancel}() to register/cancel the information required to
|
||||
unwind through code that has been generated at runtime (e.g., by a
|
||||
just-in-time (JIT) compiler). It is important to register the
|
||||
information for \emph{all} dynamically generated code because
|
||||
otherwise, a debugger may not be able to function properly or
|
||||
high-level language exception handling may not work as expected.
|
||||
|
||||
The interface for registering and canceling dynamic unwind info has
|
||||
been designed for maximum efficiency, so as to minimize the
|
||||
performance impact on JIT-compilers. In particular, both routines are
|
||||
guaranteed to execute in ``constant time'' (O(1)) and the
|
||||
data-structure encapsulating the dynamic unwind info has been designed
|
||||
to facilitate sharing, such that similar procedures can share much of
|
||||
the underlying information.
|
||||
|
||||
For more information on the \Prog{libunwind} support for dynamically
|
||||
generated code, see \SeeAlso{libunwind-dynamic(3)}.
|
||||
|
||||
|
||||
\section{Caching of Unwind Info}
|
||||
|
||||
To speed up execution, \Prog{libunwind} may aggressively cache the
|
||||
information it needs to perform unwinding. If a process changes
|
||||
during its lifetime, this creates a risk of \Prog{libunwind} using
|
||||
stale data. For example, this would happen if \Prog{libunwind} were
|
||||
to cache information about a shared library which later on gets
|
||||
unloaded (e.g., via \Cmd{dlclose}{3}).
|
||||
|
||||
To prevent the risk of using stale data, \Prog{libunwind} provides two
|
||||
facilities: first, it is possible to flush the cached information
|
||||
associated with a specific address range in the target process (or the
|
||||
entire address space, if desired). This functionality is provided by
|
||||
\Func{unw\_flush\_cache}(). The second facility is provided by
|
||||
\Func{unw\_set\_caching\_policy}(), which lets a program
|
||||
select the exact caching policy in use for a given address-space
|
||||
object. In particular, by selecting the policy
|
||||
\Const{UNW\_CACHE\_NONE}, it is possible to turn off caching
|
||||
completely, therefore eliminating the risk of stale data alltogether
|
||||
(at the cost of slower execution). By default, caching is enabled for
|
||||
local unwinding only. The cache size can be dynamically changed with
|
||||
\Func{unw\_set\_cache\_size}(), which also fluches the current cache.
|
||||
|
||||
|
||||
\section{Files}
|
||||
|
||||
\begin{Description}
|
||||
\item[\File{libunwind.h}] Headerfile to include for native (same
|
||||
platform) unwinding.
|
||||
\item[\File{libunwind-}\Var{PLAT}\File{.h}] Headerfile to include when
|
||||
the unwind target runs on platform \Var{PLAT}. For example, to unwind
|
||||
an IA-64 program, the header file \File{libunwind-ia64.h} should be
|
||||
included.
|
||||
\item[\Opt{-l}\File{unwind}] Linker-switch to add when building a
|
||||
program that does native (same platform) unwinding.
|
||||
\item[\Opt{-l}\File{unwind-}\Var{PLAT}] Linker-switch to add when
|
||||
building a program that unwinds a program on platform \Var{PLAT}.
|
||||
For example, to (cross-)unwind an IA-64 program, the linker switch
|
||||
\File{-lunwind-ia64} should be added. Note: multiple such switches
|
||||
may need to be specified for programs that can unwind programs on
|
||||
multiple platforms.
|
||||
\end{Description}
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind-dynamic(3)},
|
||||
\SeeAlso{libunwind-ia64(3)},
|
||||
\SeeAlso{libunwind-ptrace(3)},
|
||||
\SeeAlso{libunwind-setjmp(3)},
|
||||
\SeeAlso{unw\_create\_addr\_space(3)},
|
||||
\SeeAlso{unw\_destroy\_addr\_space(3)},
|
||||
\SeeAlso{unw\_flush\_cache(3)},
|
||||
\SeeAlso{unw\_get\_accessors(3)},
|
||||
\SeeAlso{unw\_get\_fpreg(3)},
|
||||
\SeeAlso{unw\_get\_proc\_info(3)},
|
||||
\SeeAlso{unw\_get\_proc\_name(3)},
|
||||
\SeeAlso{unw\_get\_reg(3)},
|
||||
\SeeAlso{unw\_getcontext(3)},
|
||||
\SeeAlso{unw\_init\_local(3)},
|
||||
\SeeAlso{unw\_init\_remote(3)},
|
||||
\SeeAlso{unw\_is\_fpreg(3)},
|
||||
\SeeAlso{unw\_is\_signal\_frame(3)},
|
||||
\SeeAlso{unw\_regname(3)},
|
||||
\SeeAlso{unw\_resume(3)},
|
||||
\SeeAlso{unw\_set\_caching\_policy(3)},
|
||||
\SeeAlso{unw\_set\_cache\_size(3)},
|
||||
\SeeAlso{unw\_set\_fpreg(3)},
|
||||
\SeeAlso{unw\_set\_reg(3)},
|
||||
\SeeAlso{unw\_step(3)},
|
||||
\SeeAlso{unw\_strerror(3)},
|
||||
\SeeAlso{\_U\_dyn\_register(3)},
|
||||
\SeeAlso{\_U\_dyn\_cancel(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
34
src/third_party/unwind/dist/doc/libunwind.trans
vendored
34
src/third_party/unwind/dist/doc/libunwind.trans
vendored
@ -1,34 +0,0 @@
|
||||
$manMacro1a{'Type'} = $manMacro1a{File};
|
||||
$manMacro1b{'Type'} = $manMacro1b{File};
|
||||
$htmlMacro1a{'Type'} = $htmlMacro1a{File};
|
||||
$htmlMacro1b{'Type'} = $htmlMacro1b{File};
|
||||
$texiMacro1a{'Type'} = $texiMacro1a{File};
|
||||
$texiMacro1b{'Type'} = $texiMacro1b{File};
|
||||
$manMacro1a{'Func'} = $manMacro1a{Prog};
|
||||
$manMacro1b{'Func'} = $manMacro1b{Prog};
|
||||
$htmlMacro1a{'Func'} = $htmlMacro1a{Arg};
|
||||
$htmlMacro1b{'Func'} = $htmlMacro1b{Arg};
|
||||
$texiMacro1a{'Func'} = $texiMacro1a{Prog};
|
||||
$texiMacro1b{'Func'} = $texiMacro1b{Prog};
|
||||
$manMacro1a{'Var'} = $manMacro1a{Prog};
|
||||
$manMacro1b{'Var'} = $manMacro1b{Prog};
|
||||
$htmlMacro1a{'Var'} = $htmlMacro1a{Prog};
|
||||
$htmlMacro1b{'Var'} = $htmlMacro1b{Prog};
|
||||
$texiMacro1a{'Var'} = $texiMacro1a{Prog};
|
||||
$texiMacro1b{'Var'} = $texiMacro1b{Prog};
|
||||
$manMacro1a{'Const'} = $manMacro1a{File};
|
||||
$manMacro1b{'Const'} = $manMacro1b{File};
|
||||
$htmlMacro1a{'Const'} = $htmlMacro1a{File};
|
||||
$htmlMacro1b{'Const'} = $htmlMacro1b{File};
|
||||
$texiMacro1a{'Const'} = $texiMacro1a{File};
|
||||
$texiMacro1b{'Const'} = $texiMacro1b{File};
|
||||
|
||||
$manMacro1a{'SeeAlso'} = $manMacro1a{File};
|
||||
$manMacro1b{'SeeAlso'} = $manMacro1b{File};
|
||||
# special handling of SeeAlso in latex2man, so that argument gets doubled:
|
||||
$htmlMacro2a{'SeeAlso'} = "<a href=\"";
|
||||
$htmlMacro2b{'SeeAlso'} = ".html\">$htmlMacro1a{File}";
|
||||
$htmlMacro2c{'SeeAlso'} = "$htmlMacro1b{File}</a>";
|
||||
$texiMacro1a{'SeeAlso'} = $texiMacro1a{File};
|
||||
$texiMacro1b{'SeeAlso'} = $texiMacro1b{File};
|
||||
|
||||
@ -1,90 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Wed Aug 16 11:09:44 PDT 2017
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_APPLY\\_REG\\_STATE" "3" "16 August 2017" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_apply_reg_state
|
||||
\-\- apply a register state update to a cursor
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_apply_reg_state(unw_cursor_t *cp,
|
||||
void *reg_states_data);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_apply_reg_state()
|
||||
routine updates the register values
|
||||
of a cursor according to the instructions in reg_states_data,
|
||||
which have been obtained by calling unw_reg_states_iterate\&.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_apply_reg_state()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_apply_reg_state()
|
||||
is thread\-safe. If cursor cp
|
||||
is
|
||||
in the local address\-space, this routine is also safe to use from a
|
||||
signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_ENOINFO
|
||||
Libunwind
|
||||
was unable to locate
|
||||
unwind\-info for the procedure.
|
||||
.TP
|
||||
UNW_EBADVERSION
|
||||
The unwind\-info for the procedure has
|
||||
version or format that is not understood by libunwind\&.
|
||||
.PP
|
||||
In addition, unw_apply_reg_state()
|
||||
may return any error
|
||||
returned by the access_mem()
|
||||
call\-back (see
|
||||
unw_create_addr_space(3)).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_reg_states_iterate(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,63 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_apply\_reg\_state}{David Mosberger-Tang}{Programming Library}{unw\_apply\_reg\_state}unw\_apply\_reg\_state -- apply a register state update to a cursor
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int}
|
||||
\Func{unw\_apply\_reg\_state}(\Type{unw\_cursor\_t~*}\Var{cp},
|
||||
\Type{void~*}\Var{reg\_states\_data});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_apply\_reg\_state}() routine updates the register values
|
||||
of a cursor according to the instructions in \Var{reg\_states\_data},
|
||||
which have been obtained by calling \Var{unw\_reg\_states\_iterate}.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_apply\_reg\_state}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_apply\_reg\_state}() is thread-safe. If cursor \Var{cp} is
|
||||
in the local address-space, this routine is also safe to use from a
|
||||
signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_ENOINFO}] \Prog{Libunwind} was unable to locate
|
||||
unwind-info for the procedure.
|
||||
\item[\Const{UNW\_EBADVERSION}] The unwind-info for the procedure has
|
||||
version or format that is not understood by \Prog{libunwind}.
|
||||
\end{Description}
|
||||
In addition, \Func{unw\_apply\_reg\_state}() may return any error
|
||||
returned by the \Func{access\_mem}() call-back (see
|
||||
\Func{unw\_create\_addr\_space}(3)).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_reg\_states\_iterate(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,86 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Fri Aug 31 13:39:04 EEST 2012
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_BACKTRACE" "3" "31 August 2012" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_backtrace
|
||||
\-\- return backtrace for the calling program
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_backtrace(void **buffer,
|
||||
int size);
|
||||
.br
|
||||
.PP
|
||||
#include <execinfo.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
backtrace(void **buffer,
|
||||
int size);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
unw_backtrace()
|
||||
is a convenient routine for obtaining the backtrace for
|
||||
the calling program. The routine fills up to size
|
||||
addresses in the array
|
||||
pointed by buffer\&.
|
||||
The routine is only available for local unwinding.
|
||||
.PP
|
||||
Note that many (but not all) systems provide practically identical function
|
||||
called backtrace().
|
||||
The prototype for this function is usually obtained
|
||||
by including the <execinfo.h>
|
||||
header file \-\- a prototype for
|
||||
backtrace()
|
||||
is not provided by libunwind\&.
|
||||
libunwind
|
||||
weakly
|
||||
aliases backtrace()
|
||||
to unw_backtrace(),
|
||||
so when a program
|
||||
calling backtrace()
|
||||
is linked against libunwind,
|
||||
it may end up
|
||||
calling unw_backtrace().
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
The routine returns the number of addresses stored in the array pointed by
|
||||
buffer\&.
|
||||
The return value may be zero to indicate that no addresses were
|
||||
stored.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_step(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,54 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_backtrace}{David Mosberger-Tang}{Programming Library}{unw\_backtrace}unw\_backtrace -- return backtrace for the calling program
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_backtrace}(\Type{void~**}\Var{buffer}, \Type{int}~\Var{size});\\
|
||||
|
||||
\File{\#include $<$execinfo.h$>$}\\
|
||||
|
||||
\Type{int} \Func{backtrace}(\Type{void~**}\Var{buffer}, \Type{int}~\Var{size});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
\Func{unw\_backtrace}() is a convenient routine for obtaining the backtrace for
|
||||
the calling program. The routine fills up to \Var{size} addresses in the array
|
||||
pointed by \Var{buffer}. The routine is only available for local unwinding.
|
||||
|
||||
Note that many (but not all) systems provide practically identical function
|
||||
called \Func{backtrace}(). The prototype for this function is usually obtained
|
||||
by including the \File{$<$execinfo.h$>$} header file -- a prototype for
|
||||
\Func{backtrace}() is not provided by \Prog{libunwind}. \Prog{libunwind} weakly
|
||||
aliases \Func{backtrace}() to \Func{unw\_backtrace}(), so when a program
|
||||
calling \Func{backtrace}() is linked against \Prog{libunwind}, it may end up
|
||||
calling \Func{unw\_backtrace}().
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
The routine returns the number of addresses stored in the array pointed by
|
||||
\Var{buffer}. The return value may be zero to indicate that no addresses were
|
||||
stored.
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_step(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,457 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_CREATE\\_ADDR\\_SPACE" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_create_addr_space
|
||||
\-\- create address space for remote unwinding
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
unw_addr_space_t
|
||||
unw_create_addr_space(unw_accessors_t *ap,
|
||||
int
|
||||
byteorder);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_create_addr_space()
|
||||
routine creates a new unwind
|
||||
address\-space and initializes it based on the call\-back routines
|
||||
passed via the ap
|
||||
pointer and the specified byteorder\&.
|
||||
The call\-back routines are described in detail below. The
|
||||
byteorder
|
||||
can be set to 0 to request the default byte\-order of
|
||||
the unwind target. To request a particular byte\-order,
|
||||
byteorder
|
||||
can be set to any constant defined by
|
||||
<endian.h>\&.
|
||||
In particular, __LITTLE_ENDIAN
|
||||
would
|
||||
request little\-endian byte\-order and __BIG_ENDIAN
|
||||
would
|
||||
request big\-endian byte\-order. Whether or not a particular byte\-order
|
||||
is supported depends on the target platform.
|
||||
.PP
|
||||
.SH CALL\-BACK ROUTINES
|
||||
|
||||
.PP
|
||||
Libunwind
|
||||
uses a set of call\-back routines to access the
|
||||
information it needs to unwind a chain of stack\-frames. These
|
||||
routines are specified via the ap
|
||||
argument, which points to a
|
||||
variable of type unw_accessors_t\&.
|
||||
The contents of this
|
||||
variable is copied into the newly\-created address space, so the
|
||||
variable must remain valid only for the duration of the call to
|
||||
unw_create_addr_space().
|
||||
.PP
|
||||
The first argument to every call\-back routine is an address\-space
|
||||
identifier (as)
|
||||
and the last argument is an arbitrary,
|
||||
application\-specified void\-pointer (arg).
|
||||
When invoking a
|
||||
call\-back routine, libunwind
|
||||
sets the as
|
||||
argument to the
|
||||
address\-space on whose behalf the invocation is made and the arg
|
||||
argument to the value that was specified when
|
||||
unw_init_remote(3)
|
||||
was called.
|
||||
.PP
|
||||
The synopsis and a detailed description of every call\-back routine
|
||||
follows below.
|
||||
.PP
|
||||
.SS CALL\-BACK ROUTINE SYNOPSIS
|
||||
.PP
|
||||
int
|
||||
find_proc_info(unw_addr_space_t
|
||||
as,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPunw_word_t
|
||||
ip,
|
||||
unw_proc_info_t *pip,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPint
|
||||
need_unwind_info,
|
||||
void *arg);
|
||||
.br
|
||||
void
|
||||
put_unwind_info(unw_addr_space_t
|
||||
as,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPunw_proc_info_t *pip,
|
||||
void *arg);
|
||||
.br
|
||||
int
|
||||
get_dyn_info_list_addr(unw_addr_space_t
|
||||
as,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPunw_word_t *dilap,
|
||||
void *arg);
|
||||
.br
|
||||
int
|
||||
access_mem(unw_addr_space_t
|
||||
as,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPunw_word_t
|
||||
addr,
|
||||
unw_word_t *valp,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPint
|
||||
write,
|
||||
void *arg);
|
||||
.br
|
||||
int
|
||||
access_reg(unw_addr_space_t
|
||||
as,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPunw_regnum_t
|
||||
regnum,
|
||||
unw_word_t *valp,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPint
|
||||
write,
|
||||
void *arg);
|
||||
.br
|
||||
int
|
||||
access_fpreg(unw_addr_space_t
|
||||
as,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPunw_regnum_t
|
||||
regnum,
|
||||
unw_fpreg_t *fpvalp,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPint
|
||||
write,
|
||||
void *arg);
|
||||
.br
|
||||
int
|
||||
resume(unw_addr_space_t
|
||||
as,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPunw_cursor_t *cp,
|
||||
void *arg);
|
||||
.br
|
||||
int
|
||||
get_proc_name(unw_addr_space_t
|
||||
as,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPunw_word_t
|
||||
addr,
|
||||
char *bufp,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPsize_t
|
||||
buf_len,
|
||||
unw_word_t *offp,
|
||||
.br
|
||||
\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fP\fB \fPvoid *arg);
|
||||
.br
|
||||
.PP
|
||||
.SS FIND_PROC_INFO
|
||||
.PP
|
||||
Libunwind
|
||||
invokes the find_proc_info()
|
||||
call\-back to
|
||||
locate the information need to unwind a particular procedure. The
|
||||
ip
|
||||
argument is an instruction\-address inside the procedure whose
|
||||
information is needed. The pip
|
||||
argument is a pointer to the
|
||||
variable used to return the desired information. The type of this
|
||||
variable is unw_proc_info_t\&.
|
||||
See
|
||||
unw_get_proc_info(3)
|
||||
for details. Argument
|
||||
need_unwind_info
|
||||
is zero if the call\-back does not need to
|
||||
provide values for the following members in the
|
||||
unw_proc_info_t
|
||||
structure: format,
|
||||
unwind_info_size,
|
||||
and unwind_info\&.
|
||||
If
|
||||
need_unwind_info
|
||||
is non\-zero, valid values need to be returned
|
||||
in these members. Furthermore, the contents of the memory addressed
|
||||
by the unwind_info
|
||||
member must remain valid until the info is
|
||||
released via the put_unwind_info
|
||||
call\-back (see below).
|
||||
.PP
|
||||
On successful completion, the find_proc_info()
|
||||
call\-back must
|
||||
return zero. Otherwise, the negative value of one of the
|
||||
unw_error_t
|
||||
error\-codes may be returned. In particular, this
|
||||
call\-back may return \-UNW_ESTOPUNWIND
|
||||
to signal the end of
|
||||
the frame\-chain.
|
||||
.PP
|
||||
.SS PUT_UNWIND_INFO
|
||||
.PP
|
||||
Libunwind
|
||||
invokes the put_unwind_info()
|
||||
call\-back to
|
||||
release the resources (such as memory) allocated by a previous call to
|
||||
find_proc_info()
|
||||
with the need_unwind_info
|
||||
argument
|
||||
set to a non\-zero value. The pip
|
||||
argument has the same value as
|
||||
the argument of the same name in the previous matching call to
|
||||
find_proc_info().
|
||||
Note that libunwind
|
||||
does \fInot\fP
|
||||
invoke put_unwind_info
|
||||
for calls to find_proc_info()
|
||||
with a zero need_unwind_info
|
||||
argument.
|
||||
.PP
|
||||
.SS GET_DYN_INFO_LIST_ADDR
|
||||
.PP
|
||||
Libunwind
|
||||
invokes the get_dyn_info_list_addr()
|
||||
call\-back to obtain the address of the head of the dynamic unwind\-info
|
||||
registration list. The variable stored at the returned address must
|
||||
have a type of unw_dyn_info_list_t
|
||||
(see
|
||||
_U_dyn_register(3)).
|
||||
The dliap
|
||||
argument is a pointer
|
||||
to a variable of type unw_word_t
|
||||
which is used to return the
|
||||
address of the dynamic unwind\-info registration list. If no dynamic
|
||||
unwind\-info registration list exist, the value pointed to by
|
||||
dliap
|
||||
must be cleared to zero. Libunwind
|
||||
will cache the
|
||||
value returned by get_dyn_info_list_addr()
|
||||
if caching is
|
||||
enabled for the given address\-space. The cache can be cleared with a
|
||||
call to unw_flush_cache().
|
||||
.PP
|
||||
On successful completion, the get_dyn_info_list_addr()
|
||||
call\-back must return zero. Otherwise, the negative value of one of
|
||||
the unw_error_t
|
||||
error\-codes may be returned.
|
||||
.PP
|
||||
.SS ACCESS_MEM
|
||||
.PP
|
||||
Libunwind
|
||||
invokes the access_mem()
|
||||
call\-back to read
|
||||
from or write to a word of memory in the target address\-space. The
|
||||
address of the word to be accessed is passed in argument addr\&.
|
||||
To read memory, libunwind
|
||||
sets argument write
|
||||
to zero and
|
||||
valp
|
||||
to point to the word that receives the read value. To
|
||||
write memory, libunwind
|
||||
sets argument write
|
||||
to a non\-zero
|
||||
value and valp
|
||||
to point to the word that contains the value to
|
||||
be written. The word that valp
|
||||
points to is always in the
|
||||
byte\-order of the host\-platform, regardless of the byte\-order of the
|
||||
target. In other words, it is the responsibility of the call\-back
|
||||
routine to convert between the target\&'s and the host\&'s byte\-order, if
|
||||
necessary.
|
||||
.PP
|
||||
On successful completion, the access_mem()
|
||||
call\-back must return zero. Otherwise, the negative value of one of
|
||||
the unw_error_t
|
||||
error\-codes may be returned.
|
||||
.PP
|
||||
.SS ACCESS_REG
|
||||
.PP
|
||||
Libunwind
|
||||
invokes the access_reg()
|
||||
call\-back to read
|
||||
from or write to a scalar (non\-floating\-point) CPU register. The
|
||||
index of the register to be accessed is passed in argument
|
||||
regnum\&.
|
||||
To read a register, libunwind
|
||||
sets argument
|
||||
write
|
||||
to zero and valp
|
||||
to point to the word that receives
|
||||
the read value. To write a register, libunwind
|
||||
sets argument
|
||||
write
|
||||
to a non\-zero value and valp
|
||||
to point to the word
|
||||
that contains the value to be written. The word that valp
|
||||
points to is always in the byte\-order of the host\-platform, regardless
|
||||
of the byte\-order of the target. In other words, it is the
|
||||
responsibility of the call\-back routine to convert between the
|
||||
target\&'s and the host\&'s byte\-order, if necessary.
|
||||
.PP
|
||||
On successful completion, the access_reg()
|
||||
call\-back must
|
||||
return zero. Otherwise, the negative value of one of the
|
||||
unw_error_t
|
||||
error\-codes may be returned.
|
||||
.PP
|
||||
.SS ACCESS_FPREG
|
||||
.PP
|
||||
Libunwind
|
||||
invokes the access_fpreg()
|
||||
call\-back to read
|
||||
from or write to a floating\-point CPU register. The index of the
|
||||
register to be accessed is passed in argument regnum\&.
|
||||
To read a
|
||||
register, libunwind
|
||||
sets argument write
|
||||
to zero and
|
||||
fpvalp
|
||||
to point to a variable of type unw_fpreg_t
|
||||
that
|
||||
receives the read value. To write a register, libunwind
|
||||
sets
|
||||
argument write
|
||||
to a non\-zero value and fpvalp
|
||||
to point to
|
||||
the variable of type unw_fpreg_t
|
||||
that contains the value to
|
||||
be written. The word that fpvalp
|
||||
points to is always in the
|
||||
byte\-order of the host\-platform, regardless of the byte\-order of the
|
||||
target. In other words, it is the responsibility of the call\-back
|
||||
routine to convert between the target\&'s and the host\&'s byte\-order, if
|
||||
necessary.
|
||||
.PP
|
||||
On successful completion, the access_fpreg()
|
||||
call\-back must
|
||||
return zero. Otherwise, the negative value of one of the
|
||||
unw_error_t
|
||||
error\-codes may be returned.
|
||||
.PP
|
||||
.SS RESUME
|
||||
.PP
|
||||
Libunwind
|
||||
invokes the resume()
|
||||
call\-back to resume
|
||||
execution in the target address space. Argument cp
|
||||
is the
|
||||
unwind\-cursor that identifies the stack\-frame in which execution
|
||||
should resume. By the time libunwind
|
||||
invokes the resume
|
||||
call\-back, it has already established the desired machine\- and
|
||||
memory\-state via calls to the access_reg(),
|
||||
access_fpreg,
|
||||
and access_mem()
|
||||
call\-backs. Thus, all
|
||||
the call\-back needs to do is perform whatever action is needed to
|
||||
actually resume execution.
|
||||
.PP
|
||||
The resume
|
||||
call\-back is invoked only in response to a call to
|
||||
unw_resume(3),
|
||||
so applications which never invoke
|
||||
unw_resume(3)
|
||||
need not define the resume
|
||||
callback.
|
||||
.PP
|
||||
On successful completion, the resume()
|
||||
call\-back must return
|
||||
zero. Otherwise, the negative value of one of the
|
||||
unw_error_t
|
||||
error\-codes may be returned. As a special case,
|
||||
when resuming execution in the local address space, the call\-back will
|
||||
not return on success.
|
||||
.PP
|
||||
.SS GET_PROC_NAME
|
||||
.PP
|
||||
Libunwind
|
||||
invokes the get_proc_name()
|
||||
call\-back to
|
||||
obtain the procedure\-name of a static (not dynamically generated)
|
||||
procedure. Argument addr
|
||||
is an instruction\-address within the
|
||||
procedure whose name is to be obtained. The bufp
|
||||
argument is a
|
||||
pointer to a character\-buffer used to return the procedure name. The
|
||||
size of this buffer is specified in argument buf_len\&.
|
||||
The
|
||||
returned name must be terminated by a NUL character. If the
|
||||
procedure\&'s name is longer than buf_len
|
||||
bytes, it must be
|
||||
truncated to buf_len\-1
|
||||
bytes, with the last byte in the
|
||||
buffer set to the NUL character and \-UNW_ENOMEM
|
||||
must be
|
||||
returned. Argument offp
|
||||
is a pointer to a word which is used to
|
||||
return the byte\-offset relative to the start of the procedure whose
|
||||
name is being returned. For example, if procedure foo()
|
||||
starts
|
||||
at address 0x40003000, then invoking get_proc_name()
|
||||
with
|
||||
addr
|
||||
set to 0x40003080 should return a value of 0x80 in the word
|
||||
pointed to by offp
|
||||
(assuming the procedure is at least 0x80
|
||||
bytes long).
|
||||
.PP
|
||||
On successful completion, the get_proc_name()
|
||||
call\-back must
|
||||
return zero. Otherwise, the negative value of one of the
|
||||
unw_error_t
|
||||
error\-codes may be returned.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_create_addr_space()
|
||||
returns a
|
||||
non\-NULL
|
||||
value that represents the newly created
|
||||
address\-space. Otherwise, NULL
|
||||
is returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_create_addr_space()
|
||||
is thread\-safe but \fInot\fP
|
||||
safe to use from a signal handler.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
_U_dyn_register(3),
|
||||
libunwind(3),
|
||||
unw_destroy_addr_space(3),
|
||||
unw_get_proc_info(3),
|
||||
unw_init_remote(3),
|
||||
unw_resume(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,265 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_create\_addr\_space}{David Mosberger-Tang}{Programming Library}{unw\_create\_addr\_space}unw\_create\_addr\_space -- create address space for remote unwinding
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{unw\_addr\_space\_t} \Func{unw\_create\_addr\_space}(\Type{unw\_accessors\_t~*}\Var{ap}, \Type{int} \Var{byteorder});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_create\_addr\_space}() routine creates a new unwind
|
||||
address-space and initializes it based on the call-back routines
|
||||
passed via the \Var{ap} pointer and the specified \Var{byteorder}.
|
||||
The call-back routines are described in detail below. The
|
||||
\Var{byteorder} can be set to 0 to request the default byte-order of
|
||||
the unwind target. To request a particular byte-order,
|
||||
\Var{byteorder} can be set to any constant defined by
|
||||
\File{$<$endian.h$>$}. In particular, \Const{\_\_LITTLE\_ENDIAN} would
|
||||
request little-endian byte-order and \Const{\_\_BIG\_ENDIAN} would
|
||||
request big-endian byte-order. Whether or not a particular byte-order
|
||||
is supported depends on the target platform.
|
||||
|
||||
\section{Call-back Routines}
|
||||
|
||||
\Prog{Libunwind} uses a set of call-back routines to access the
|
||||
information it needs to unwind a chain of stack-frames. These
|
||||
routines are specified via the \Var{ap} argument, which points to a
|
||||
variable of type \Type{unw\_accessors\_t}. The contents of this
|
||||
variable is copied into the newly-created address space, so the
|
||||
variable must remain valid only for the duration of the call to
|
||||
\Func{unw\_create\_addr\_space}().
|
||||
|
||||
The first argument to every call-back routine is an address-space
|
||||
identifier (\Var{as}) and the last argument is an arbitrary,
|
||||
application-specified void-pointer (\Var{arg}). When invoking a
|
||||
call-back routine, \Prog{libunwind} sets the \Var{as} argument to the
|
||||
address-space on whose behalf the invocation is made and the \Var{arg}
|
||||
argument to the value that was specified when
|
||||
\Func{unw\_init\_remote}(3) was called.
|
||||
|
||||
The synopsis and a detailed description of every call-back routine
|
||||
follows below.
|
||||
|
||||
\subsection{Call-back Routine Synopsis}
|
||||
|
||||
\Type{int} \Func{find\_proc\_info}(\Type{unw\_addr\_space\_t} \Var{as},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{unw\_word\_t} \Var{ip}, \Type{unw\_proc\_info\_t~*}\Var{pip},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{int} \Var{need\_unwind\_info}, \Type{void~*}arg);\\
|
||||
\Type{void} \Func{put\_unwind\_info}(\Type{unw\_addr\_space\_t} \Var{as},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{unw\_proc\_info\_t~*}pip, \Type{void~*}\Var{arg});\\
|
||||
\Type{int} \Func{get\_dyn\_info\_list\_addr}(\Type{unw\_addr\_space\_t} \Var{as},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{unw\_word\_t~*}\Var{dilap}, \Type{void~*}\Var{arg});\\
|
||||
\Type{int} \Func{access\_mem}(\Var{unw\_addr\_space\_t} \Var{as},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{unw\_word\_t} \Var{addr}, \Type{unw\_word\_t~*}\Var{valp},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{int} \Var{write}, \Type{void~*}\Var{arg});\\
|
||||
\Type{int} \Func{access\_reg}(\Var{unw\_addr\_space\_t} \Var{as},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{unw\_regnum\_t} \Var{regnum}, \Type{unw\_word\_t~*}\Var{valp},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{int} \Var{write}, \Type{void~*}\Var{arg});\\
|
||||
\Type{int} \Func{access\_fpreg}(\Var{unw\_addr\_space\_t} \Var{as},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{unw\_regnum\_t} \Var{regnum}, \Type{unw\_fpreg\_t~*}\Var{fpvalp},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{int} \Var{write}, \Type{void~*}\Var{arg});\\
|
||||
\Type{int} \Func{resume}(\Var{unw\_addr\_space\_t} \Var{as},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{unw\_cursor\_t~*}\Var{cp}, \Type{void~*}\Var{arg});\\
|
||||
\Type{int} \Func{get\_proc\_name}(\Type{unw\_addr\_space\_t} \Var{as},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{unw\_word\_t} \Var{addr}, \Type{char~*}\Var{bufp},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{size\_t} \Var{buf\_len}, \Type{unw\_word\_t~*}\Var{offp},\\
|
||||
\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\SP\Type{void~*}\Var{arg});\\
|
||||
|
||||
\subsection{find\_proc\_info}
|
||||
|
||||
\Prog{Libunwind} invokes the \Func{find\_proc\_info}() call-back to
|
||||
locate the information need to unwind a particular procedure. The
|
||||
\Var{ip} argument is an instruction-address inside the procedure whose
|
||||
information is needed. The \Var{pip} argument is a pointer to the
|
||||
variable used to return the desired information. The type of this
|
||||
variable is \Type{unw\_proc\_info\_t}. See
|
||||
\Func{unw\_get\_proc\_info(3)} for details. Argument
|
||||
\Var{need\_unwind\_info} is zero if the call-back does not need to
|
||||
provide values for the following members in the
|
||||
\Type{unw\_proc\_info\_t} structure: \Var{format},
|
||||
\Var{unwind\_info\_size}, and \Var{unwind\_info}. If
|
||||
\Var{need\_unwind\_info} is non-zero, valid values need to be returned
|
||||
in these members. Furthermore, the contents of the memory addressed
|
||||
by the \Var{unwind\_info} member must remain valid until the info is
|
||||
released via the \Func{put\_unwind\_info} call-back (see below).
|
||||
|
||||
On successful completion, the \Func{find\_proc\_info}() call-back must
|
||||
return zero. Otherwise, the negative value of one of the
|
||||
\Type{unw\_error\_t} error-codes may be returned. In particular, this
|
||||
call-back may return -\Const{UNW\_ESTOPUNWIND} to signal the end of
|
||||
the frame-chain.
|
||||
|
||||
\subsection{put\_unwind\_info}
|
||||
|
||||
\Prog{Libunwind} invokes the \Func{put\_unwind\_info}() call-back to
|
||||
release the resources (such as memory) allocated by a previous call to
|
||||
\Func{find\_proc\_info}() with the \Var{need\_unwind\_info} argument
|
||||
set to a non-zero value. The \Var{pip} argument has the same value as
|
||||
the argument of the same name in the previous matching call to
|
||||
\Func{find\_proc\_info}(). Note that \Prog{libunwind} does \emph{not}
|
||||
invoke \Func{put\_unwind\_info} for calls to \Func{find\_proc\_info}()
|
||||
with a zero \Var{need\_unwind\_info} argument.
|
||||
|
||||
|
||||
\subsection{get\_dyn\_info\_list\_addr}
|
||||
|
||||
\Prog{Libunwind} invokes the \Func{get\_dyn\_info\_list\_addr}()
|
||||
call-back to obtain the address of the head of the dynamic unwind-info
|
||||
registration list. The variable stored at the returned address must
|
||||
have a type of \Type{unw\_dyn\_info\_list\_t} (see
|
||||
\Func{\_U\_dyn\_register}(3)). The \Var{dliap} argument is a pointer
|
||||
to a variable of type \Type{unw\_word\_t} which is used to return the
|
||||
address of the dynamic unwind-info registration list. If no dynamic
|
||||
unwind-info registration list exist, the value pointed to by
|
||||
\Var{dliap} must be cleared to zero. \Prog{Libunwind} will cache the
|
||||
value returned by \Func{get\_dyn\_info\_list\_addr}() if caching is
|
||||
enabled for the given address-space. The cache can be cleared with a
|
||||
call to \Func{unw\_flush\_cache}().
|
||||
|
||||
On successful completion, the \Func{get\_dyn\_info\_list\_addr}()
|
||||
call-back must return zero. Otherwise, the negative value of one of
|
||||
the \Type{unw\_error\_t} error-codes may be returned.
|
||||
|
||||
\subsection{access\_mem}
|
||||
|
||||
\Prog{Libunwind} invokes the \Func{access\_mem}() call-back to read
|
||||
from or write to a word of memory in the target address-space. The
|
||||
address of the word to be accessed is passed in argument \Var{addr}.
|
||||
To read memory, \Prog{libunwind} sets argument \Var{write} to zero and
|
||||
\Var{valp} to point to the word that receives the read value. To
|
||||
write memory, \Prog{libunwind} sets argument \Var{write} to a non-zero
|
||||
value and \Var{valp} to point to the word that contains the value to
|
||||
be written. The word that \Var{valp} points to is always in the
|
||||
byte-order of the host-platform, regardless of the byte-order of the
|
||||
target. In other words, it is the responsibility of the call-back
|
||||
routine to convert between the target's and the host's byte-order, if
|
||||
necessary.
|
||||
|
||||
On successful completion, the \Func{access\_mem}()
|
||||
call-back must return zero. Otherwise, the negative value of one of
|
||||
the \Type{unw\_error\_t} error-codes may be returned.
|
||||
|
||||
\subsection{access\_reg}
|
||||
|
||||
\Prog{Libunwind} invokes the \Func{access\_reg}() call-back to read
|
||||
from or write to a scalar (non-floating-point) CPU register. The
|
||||
index of the register to be accessed is passed in argument
|
||||
\Var{regnum}. To read a register, \Prog{libunwind} sets argument
|
||||
\Var{write} to zero and \Var{valp} to point to the word that receives
|
||||
the read value. To write a register, \Prog{libunwind} sets argument
|
||||
\Var{write} to a non-zero value and \Var{valp} to point to the word
|
||||
that contains the value to be written. The word that \Var{valp}
|
||||
points to is always in the byte-order of the host-platform, regardless
|
||||
of the byte-order of the target. In other words, it is the
|
||||
responsibility of the call-back routine to convert between the
|
||||
target's and the host's byte-order, if necessary.
|
||||
|
||||
On successful completion, the \Func{access\_reg}() call-back must
|
||||
return zero. Otherwise, the negative value of one of the
|
||||
\Type{unw\_error\_t} error-codes may be returned.
|
||||
|
||||
\subsection{access\_fpreg}
|
||||
|
||||
\Prog{Libunwind} invokes the \Func{access\_fpreg}() call-back to read
|
||||
from or write to a floating-point CPU register. The index of the
|
||||
register to be accessed is passed in argument \Var{regnum}. To read a
|
||||
register, \Prog{libunwind} sets argument \Var{write} to zero and
|
||||
\Var{fpvalp} to point to a variable of type \Type{unw\_fpreg\_t} that
|
||||
receives the read value. To write a register, \Prog{libunwind} sets
|
||||
argument \Var{write} to a non-zero value and \Var{fpvalp} to point to
|
||||
the variable of type \Type{unw\_fpreg\_t} that contains the value to
|
||||
be written. The word that \Var{fpvalp} points to is always in the
|
||||
byte-order of the host-platform, regardless of the byte-order of the
|
||||
target. In other words, it is the responsibility of the call-back
|
||||
routine to convert between the target's and the host's byte-order, if
|
||||
necessary.
|
||||
|
||||
On successful completion, the \Func{access\_fpreg}() call-back must
|
||||
return zero. Otherwise, the negative value of one of the
|
||||
\Type{unw\_error\_t} error-codes may be returned.
|
||||
|
||||
\subsection{resume}
|
||||
|
||||
\Prog{Libunwind} invokes the \Func{resume}() call-back to resume
|
||||
execution in the target address space. Argument \Var{cp} is the
|
||||
unwind-cursor that identifies the stack-frame in which execution
|
||||
should resume. By the time \Prog{libunwind} invokes the \Func{resume}
|
||||
call-back, it has already established the desired machine- and
|
||||
memory-state via calls to the \Func{access\_reg}(),
|
||||
\Func{access\_fpreg}, and \Func{access\_mem}() call-backs. Thus, all
|
||||
the call-back needs to do is perform whatever action is needed to
|
||||
actually resume execution.
|
||||
|
||||
The \Func{resume} call-back is invoked only in response to a call to
|
||||
\Func{unw\_resume}(3), so applications which never invoke
|
||||
\Func{unw\_resume}(3) need not define the \Func{resume} callback.
|
||||
|
||||
On successful completion, the \Func{resume}() call-back must return
|
||||
zero. Otherwise, the negative value of one of the
|
||||
\Type{unw\_error\_t} error-codes may be returned. As a special case,
|
||||
when resuming execution in the local address space, the call-back will
|
||||
not return on success.
|
||||
|
||||
\subsection{get\_proc\_name}
|
||||
|
||||
\Prog{Libunwind} invokes the \Func{get\_proc\_name}() call-back to
|
||||
obtain the procedure-name of a static (not dynamically generated)
|
||||
procedure. Argument \Var{addr} is an instruction-address within the
|
||||
procedure whose name is to be obtained. The \Var{bufp} argument is a
|
||||
pointer to a character-buffer used to return the procedure name. The
|
||||
size of this buffer is specified in argument \Var{buf\_len}. The
|
||||
returned name must be terminated by a NUL character. If the
|
||||
procedure's name is longer than \Var{buf\_len} bytes, it must be
|
||||
truncated to \Var{buf\_len}\Prog{-1} bytes, with the last byte in the
|
||||
buffer set to the NUL character and -\Const{UNW\_ENOMEM} must be
|
||||
returned. Argument \Var{offp} is a pointer to a word which is used to
|
||||
return the byte-offset relative to the start of the procedure whose
|
||||
name is being returned. For example, if procedure \Func{foo}() starts
|
||||
at address 0x40003000, then invoking \Func{get\_proc\_name}() with
|
||||
\Var{addr} set to 0x40003080 should return a value of 0x80 in the word
|
||||
pointed to by \Var{offp} (assuming the procedure is at least 0x80
|
||||
bytes long).
|
||||
|
||||
On successful completion, the \Func{get\_proc\_name}() call-back must
|
||||
return zero. Otherwise, the negative value of one of the
|
||||
\Type{unw\_error\_t} error-codes may be returned.
|
||||
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_create\_addr\_space}() returns a
|
||||
non-\Const{NULL} value that represents the newly created
|
||||
address-space. Otherwise, \Const{NULL} is returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_create\_addr\_space}() is thread-safe but \emph{not}
|
||||
safe to use from a signal handler.
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{\_U\_dyn\_register(3)},
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_destroy\_addr\_space(3)},
|
||||
\SeeAlso{unw\_get\_proc\_info(3)},
|
||||
\SeeAlso{unw\_init\_remote(3)},
|
||||
\SeeAlso{unw\_resume(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,57 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_DESTROY\\_ADDR\\_SPACE" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_destroy_addr_space
|
||||
\-\- destroy unwind address space
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
void
|
||||
unw_destroy_addr_space(unw_addr_space_t
|
||||
as);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_destroy_addr_space()
|
||||
routine destroys the
|
||||
address space specified by argument as
|
||||
and thereby releases
|
||||
all associated resources (such as memory).
|
||||
.PP
|
||||
Applications must not destroy the local address space
|
||||
unw_local_addr_space\&.
|
||||
Attempting to do so results in
|
||||
undefined behavior (e.g., the application may crash).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_create_addr_space(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,40 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_destroy\_addr\_space}{David Mosberger-Tang}{Programming Library}{unw\_destroy\_addr\_space}unw\_destroy\_addr\_space -- destroy unwind address space
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{void} \Func{unw\_destroy\_addr\_space}(\Type{unw\_addr\_space\_t} \Var{as});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_destroy\_addr\_space}() routine destroys the
|
||||
address space specified by argument \Var{as} and thereby releases
|
||||
all associated resources (such as memory).
|
||||
|
||||
Applications must not destroy the local address space
|
||||
\Var{unw\_local\_addr\_space}. Attempting to do so results in
|
||||
undefined behavior (e.g., the application may crash).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_create\_addr\_space(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,93 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Fri Dec 2 16:09:33 PST 2016
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_FLUSH\\_CACHE" "3" "02 December 2016" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_flush_cache
|
||||
\-\- flush cached info
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
void
|
||||
unw_flush_cache(unw_addr_space_t
|
||||
as,
|
||||
unw_word_t
|
||||
lo,
|
||||
unw_word_t
|
||||
hi);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_flush_cache()
|
||||
routine flushes all cached info as it
|
||||
relates to address\-range lo
|
||||
to hi
|
||||
(non\-inclusive) in the
|
||||
target address\-space as\&.
|
||||
In addition, all info cached for
|
||||
address\-space as
|
||||
that is not tied to a particular code\-range is
|
||||
also flushed. For example, the address of the dynamic registration
|
||||
list is not tied to a code\-range and its cached value (if any) is
|
||||
flushed by a call to this routine. The address range specified by
|
||||
lo
|
||||
and hi
|
||||
should be understood as a hint:
|
||||
unw_flush_cache()
|
||||
may flush more information than requested,
|
||||
but \fInever\fP
|
||||
less. In other words, unw_flush_cache()
|
||||
may
|
||||
overflush, but not underflush.
|
||||
.PP
|
||||
As a special case, if arguments lo
|
||||
and hi
|
||||
are both 0, all
|
||||
information cached on behalf of address space as
|
||||
is flushed.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
The unw_flush_cache()
|
||||
routine cannot fail and does not
|
||||
return a value.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
The unw_flush_cache()
|
||||
routine is thread\-safe as well as safe to
|
||||
use from a signal handler.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_set_caching_policy(3)
|
||||
unw_set_cache_size(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,58 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_flush\_cache}{David Mosberger-Tang}{Programming Library}{unw\_flush\_cache}unw\_flush\_cache -- flush cached info
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{void} \Func{unw\_flush\_cache}(\Type{unw\_addr\_space\_t} \Var{as}, \Type{unw\_word\_t} \Var{lo}, \Type{unw\_word\_t} \Var{hi});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_flush\_cache}() routine flushes all cached info as it
|
||||
relates to address-range \Var{lo} to \Var{hi} (non-inclusive) in the
|
||||
target address-space \Var{as}. In addition, all info cached for
|
||||
address-space \Var{as} that is not tied to a particular code-range is
|
||||
also flushed. For example, the address of the dynamic registration
|
||||
list is not tied to a code-range and its cached value (if any) is
|
||||
flushed by a call to this routine. The address range specified by
|
||||
\Var{lo} and \Var{hi} should be understood as a hint:
|
||||
\Func{unw\_flush\_cache}() may flush more information than requested,
|
||||
but \emph{never} less. In other words, \Func{unw\_flush\_cache}() may
|
||||
overflush, but not underflush.
|
||||
|
||||
As a special case, if arguments \Var{lo} and \Var{hi} are both 0, all
|
||||
information cached on behalf of address space \Var{as} is flushed.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
The \Func{unw\_flush\_cache}() routine cannot fail and does not
|
||||
return a value.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
The \Func{unw\_flush\_cache}() routine is thread-safe as well as safe to
|
||||
use from a signal handler.
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_set\_caching\_policy(3)}
|
||||
\SeeAlso{unw\_set\_cache\_size(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,79 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:44 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_GET\\_ACCESSORS" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_get_accessors
|
||||
\-\- get pointer to accessor call\-backs
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
unw_accessors_t *unw_get_accessors(unw_addr_space_t as);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_get_accessors()
|
||||
routine returns a pointer to a
|
||||
unw_accessors_t
|
||||
structure, which contains the call\-back
|
||||
routines that were specified when address space as
|
||||
was created
|
||||
(see unw_create_addr_space(3)).
|
||||
The returned pointer is
|
||||
guaranteed to remain valid until address space as
|
||||
is destroyed
|
||||
by a call to unw_destroy_addr_space(3).
|
||||
.PP
|
||||
Note that unw_get_accessors()
|
||||
can be used to retrieve the
|
||||
call\-back routines for the local address space
|
||||
unw_local_addr_space\&.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
The unw_get_accessors()
|
||||
routine cannot fail and always
|
||||
returns a valid (non\-NULL)
|
||||
pointer to an
|
||||
unw_accessors_t
|
||||
structure.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
The unw_get_accessors()
|
||||
routine is thread\-safe as well as
|
||||
safe to use from a signal handler.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_create_addr_space(3),
|
||||
unw_destroy_addr_space(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,55 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_get\_accessors}{David Mosberger-Tang}{Programming Library}{unw\_get\_accessors}unw\_get\_accessors -- get pointer to accessor call-backs
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{unw\_accessors\_t~*}\Func{unw\_get\_accessors}(\Type{unw\_addr\_space\_t~}\Var{as});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_get\_accessors}() routine returns a pointer to a
|
||||
\Type{unw\_accessors\_t} structure, which contains the call-back
|
||||
routines that were specified when address space \Var{as} was created
|
||||
(see \Func{unw\_create\_addr\_space}(3)). The returned pointer is
|
||||
guaranteed to remain valid until address space \Var{as} is destroyed
|
||||
by a call to \Func{unw\_destroy\_addr\_space}(3).
|
||||
|
||||
Note that \Func{unw\_get\_accessors}() can be used to retrieve the
|
||||
call-back routines for the local address space
|
||||
\Var{unw\_local\_addr\_space}.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
The \Func{unw\_get\_accessors}() routine cannot fail and always
|
||||
returns a valid (non-\Const{NULL}) pointer to an
|
||||
\Type{unw\_accessors\_t} structure.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
The \Func{unw\_get\_accessors}() routine is thread-safe as well as
|
||||
safe to use from a signal handler.
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_create\_addr\_space(3)},
|
||||
\SeeAlso{unw\_destroy\_addr\_space(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
111
src/third_party/unwind/dist/doc/unw_get_fpreg.man
vendored
111
src/third_party/unwind/dist/doc/unw_get_fpreg.man
vendored
@ -1,111 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_GET\\_FPREG" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_get_fpreg
|
||||
\-\- get contents of floating\-point register
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_get_fpreg(unw_cursor_t *cp,
|
||||
unw_regnum_t
|
||||
reg,
|
||||
unw_fpreg_t *valp);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_get_fpreg()
|
||||
routine reads the value of floating\-point
|
||||
register reg
|
||||
in the stack frame identified by cursor cp
|
||||
and stores the value in the variable pointed to by valp\&.
|
||||
.PP
|
||||
The register numbering is target\-dependent and described in separate
|
||||
manual pages (e.g., libunwind\-ia64(3) for the IA\-64 target).
|
||||
Furthermore, the exact set of accessible registers may depend on the
|
||||
type of frame that cp
|
||||
is referring to. For ordinary stack
|
||||
frames, it is normally possible to access only the preserved
|
||||
(``callee\-saved\&'') registers and frame\-related registers (such as the
|
||||
stack\-pointer). However, for signal frames (see
|
||||
unw_is_signal_frame(3)),
|
||||
it is usually possible to access
|
||||
all registers.
|
||||
.PP
|
||||
Note that unw_get_fpreg()
|
||||
can only read the contents of
|
||||
floating\-point registers. See unw_get_fpreg(3)
|
||||
for a way to
|
||||
read registers which fit in a single word.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_get_fpreg()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_get_fpreg()
|
||||
is thread\-safe as well as safe to use
|
||||
from a signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_EBADREG
|
||||
An attempt was made to read a register
|
||||
that is either invalid or not accessible in the current frame.
|
||||
.PP
|
||||
In addition, unw_get_fpreg()
|
||||
may return any error returned by
|
||||
the access_mem(),
|
||||
access_reg(),
|
||||
and
|
||||
access_fpreg()
|
||||
call\-backs (see
|
||||
unw_create_addr_space(3)).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
libunwind\-ia64(3),
|
||||
unw_get_reg(3),
|
||||
unw_is_fpreg(3),
|
||||
unw_is_signal_frame(3),
|
||||
unw_set_fpreg(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,77 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_get\_fpreg}{David Mosberger-Tang}{Programming Library}{unw\_get\_fpreg}unw\_get\_fpreg -- get contents of floating-point register
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_get\_fpreg}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{unw\_regnum\_t} \Var{reg}, \Type{unw\_fpreg\_t~*}\Var{valp});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_get\_fpreg}() routine reads the value of floating-point
|
||||
register \Var{reg} in the stack frame identified by cursor \Var{cp}
|
||||
and stores the value in the variable pointed to by \Var{valp}.
|
||||
|
||||
The register numbering is target-dependent and described in separate
|
||||
manual pages (e.g., libunwind-ia64(3) for the IA-64 target).
|
||||
Furthermore, the exact set of accessible registers may depend on the
|
||||
type of frame that \Var{cp} is referring to. For ordinary stack
|
||||
frames, it is normally possible to access only the preserved
|
||||
(``callee-saved'') registers and frame-related registers (such as the
|
||||
stack-pointer). However, for signal frames (see
|
||||
\Func{unw\_is\_signal\_frame}(3)), it is usually possible to access
|
||||
all registers.
|
||||
|
||||
Note that \Func{unw\_get\_fpreg}() can only read the contents of
|
||||
floating-point registers. See \Func{unw\_get\_fpreg}(3) for a way to
|
||||
read registers which fit in a single word.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_get\_fpreg}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_get\_fpreg}() is thread-safe as well as safe to use
|
||||
from a signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_EBADREG}] An attempt was made to read a register
|
||||
that is either invalid or not accessible in the current frame.
|
||||
\end{Description}
|
||||
In addition, \Func{unw\_get\_fpreg}() may return any error returned by
|
||||
the \Func{access\_mem}(), \Func{access\_reg}(), and
|
||||
\Func{access\_fpreg}() call-backs (see
|
||||
\Func{unw\_create\_addr\_space}(3)).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{libunwind-ia64(3)},
|
||||
\SeeAlso{unw\_get\_reg(3)},
|
||||
\SeeAlso{unw\_is\_fpreg(3)},
|
||||
\SeeAlso{unw\_is\_signal\_frame(3)},
|
||||
\SeeAlso{unw\_set\_fpreg(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,203 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:44 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_GET\\_PROC\\_INFO" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_get_proc_info
|
||||
\-\- get info on current procedure
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_get_proc_info(unw_cursor_t *cp,
|
||||
unw_proc_info_t *pip);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_get_proc_info()
|
||||
routine returns auxiliary
|
||||
information about the procedure that created the stack frame
|
||||
identified by argument cp\&.
|
||||
The pip
|
||||
argument is a pointer
|
||||
to a structure of type unw_proc_info_t
|
||||
which is used to
|
||||
return the information. The unw_proc_info_t
|
||||
has the
|
||||
following members:
|
||||
.TP
|
||||
unw_word_t start_ip
|
||||
The address of the first
|
||||
instruction of the procedure. If this address cannot be determined
|
||||
(e.g., due to lack of unwind information), the start_ip
|
||||
member is cleared to 0.
|
||||
.br
|
||||
.TP
|
||||
unw_word_t end_ip
|
||||
The address of the first
|
||||
instruction \fIbeyond\fP
|
||||
the end of the procedure. If this address
|
||||
cannot be determined (e.g., due to lack of unwind information),
|
||||
the end_ip
|
||||
member is cleared to 0.
|
||||
.br
|
||||
.TP
|
||||
unw_word_t lsda
|
||||
The address of the
|
||||
language\-specific data\-area (LSDA). This area normally contains
|
||||
language\-specific information needed during exception handling. If
|
||||
the procedure has no such area, this member is cleared to 0.
|
||||
.br
|
||||
.TP
|
||||
unw_word_t handler
|
||||
The address of the exception
|
||||
handler routine. This is sometimes called the \fIpersonality\fP
|
||||
routine. If the procedure does not define
|
||||
a personality routine, the handler
|
||||
member is cleared to 0.
|
||||
.br
|
||||
.TP
|
||||
unw_word_t gp
|
||||
The global\-pointer of the
|
||||
procedure. On platforms that do not use a global pointer, this
|
||||
member may contain an undefined value. On all other platforms, it
|
||||
must be set either to the correct global\-pointer value of the
|
||||
procedure or to 0 if the proper global\-pointer cannot be
|
||||
obtained for some reason.
|
||||
.br
|
||||
.TP
|
||||
unw_word_t flags
|
||||
A set of flags. There are
|
||||
currently no target\-independent flags. For the IA\-64 target, the
|
||||
flag UNW_PI_FLAG_IA64_RBS_SWITCH
|
||||
is set if the
|
||||
procedure may switch the register\-backing store.
|
||||
.br
|
||||
.TP
|
||||
int format
|
||||
The format of the unwind\-info for this
|
||||
procedure. If the unwind\-info consists of dynamic procedure info,
|
||||
format
|
||||
is equal to UNW_INFO_FORMAT_DYNAMIC\&.
|
||||
If the
|
||||
unwind\-info consists of a (target\-specific) unwind table, it is
|
||||
equal to to UNW_INFO_FORMAT_TABLE\&.
|
||||
All other values are
|
||||
reserved for future use by libunwind\&.
|
||||
This member exists
|
||||
for use by the find_proc_info()
|
||||
call\-back (see
|
||||
unw_create_addr_space(3)).
|
||||
The
|
||||
unw_get_proc_info()
|
||||
routine
|
||||
may return an undefined value in this member.
|
||||
.br
|
||||
.TP
|
||||
int unwind_info_size
|
||||
The size of the unwind\-info
|
||||
in bytes. This member exists for use by the
|
||||
find_proc_info()
|
||||
call\-back (see
|
||||
unw_create_addr_space(3)).
|
||||
The
|
||||
unw_get_proc_info()
|
||||
routine
|
||||
may return an undefined value in this member.
|
||||
.br
|
||||
.TP
|
||||
void *unwind_info
|
||||
The pointer to the unwind\-info.
|
||||
If no unwind info is available, this member must be set to
|
||||
NULL\&.
|
||||
This member exists for use by the
|
||||
find_proc_info()
|
||||
call\-back (see
|
||||
unw_create_addr_space(3)).
|
||||
The
|
||||
unw_get_proc_info()
|
||||
routine
|
||||
may return an undefined value in this member.
|
||||
.br
|
||||
.PP
|
||||
Note that for the purposes of libunwind,
|
||||
the code of a
|
||||
procedure is assumed to occupy a single, contiguous range of
|
||||
addresses. For this reason, it is alwas possible to describe the
|
||||
extent of a procedure with the start_ip
|
||||
and end_ip
|
||||
members. If a single function/routine is split into multiple,
|
||||
discontiguous pieces, libunwind
|
||||
will treat each piece as a
|
||||
separate procedure.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_get_proc_info()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_get_proc_info()
|
||||
is thread\-safe. If cursor cp
|
||||
is
|
||||
in the local address\-space, this routine is also safe to use from a
|
||||
signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_ENOINFO
|
||||
Libunwind
|
||||
was unable to locate
|
||||
unwind\-info for the procedure.
|
||||
.TP
|
||||
UNW_EBADVERSION
|
||||
The unwind\-info for the procedure has
|
||||
version or format that is not understood by libunwind\&.
|
||||
.PP
|
||||
In addition, unw_get_proc_info()
|
||||
may return any error
|
||||
returned by the access_mem()
|
||||
call\-back (see
|
||||
unw_create_addr_space(3)).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_create_addr_space(3),
|
||||
unw_get_proc_name(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,123 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_get\_proc\_info}{David Mosberger-Tang}{Programming Library}{unw\_get\_proc\_info}unw\_get\_proc\_info -- get info on current procedure
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_get\_proc\_info}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{unw\_proc\_info\_t~*}\Var{pip});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_get\_proc\_info}() routine returns auxiliary
|
||||
information about the procedure that created the stack frame
|
||||
identified by argument \Var{cp}. The \Var{pip} argument is a pointer
|
||||
to a structure of type \Type{unw\_proc\_info\_t} which is used to
|
||||
return the information. The \Type{unw\_proc\_info\_t} has the
|
||||
following members:
|
||||
\begin{description}
|
||||
\item[\Type{unw\_word\_t} \Var{start\_ip}] The address of the first
|
||||
instruction of the procedure. If this address cannot be determined
|
||||
(e.g., due to lack of unwind information), the \Var{start\_ip}
|
||||
member is cleared to 0. \\
|
||||
\item[\Type{unw\_word\_t} \Var{end\_ip}] The address of the first
|
||||
instruction \emph{beyond} the end of the procedure. If this address
|
||||
cannot be determined (e.g., due to lack of unwind information),
|
||||
the \Var{end\_ip} member is cleared to 0. \\
|
||||
\item[\Type{unw\_word\_t} \Var{lsda}] The address of the
|
||||
language-specific data-area (LSDA). This area normally contains
|
||||
language-specific information needed during exception handling. If
|
||||
the procedure has no such area, this member is cleared to 0. \\
|
||||
\item[\Type{unw\_word\_t} \Var{handler}] The address of the exception
|
||||
handler routine. This is sometimes called the \emph{personality}
|
||||
routine. If the procedure does not define
|
||||
a personality routine, the \Var{handler} member is cleared to 0. \\
|
||||
\item[\Type{unw\_word\_t} \Var{gp}] The global-pointer of the
|
||||
procedure. On platforms that do not use a global pointer, this
|
||||
member may contain an undefined value. On all other platforms, it
|
||||
must be set either to the correct global-pointer value of the
|
||||
procedure or to 0 if the proper global-pointer cannot be
|
||||
obtained for some reason. \\
|
||||
\item[\Type{unw\_word\_t} \Var{flags}] A set of flags. There are
|
||||
currently no target-independent flags. For the IA-64 target, the
|
||||
flag \Const{UNW\_PI\_FLAG\_IA64\_RBS\_SWITCH} is set if the
|
||||
procedure may switch the register-backing store.\\
|
||||
\item[\Type{int} \Var{format}] The format of the unwind-info for this
|
||||
procedure. If the unwind-info consists of dynamic procedure info,
|
||||
\Var{format} is equal to \Const{UNW\_INFO\_FORMAT\_DYNAMIC}. If the
|
||||
unwind-info consists of a (target-specific) unwind table, it is
|
||||
equal to to \Const{UNW\_INFO\_FORMAT\_TABLE}. All other values are
|
||||
reserved for future use by \Prog{libunwind}. This member exists
|
||||
for use by the \Func{find\_proc\_info}() call-back (see
|
||||
\Func{unw\_create\_addr\_space}(3)). The
|
||||
\Func{unw\_get\_proc\_info}() routine
|
||||
may return an undefined value in this member. \\
|
||||
\item[\Type{int} \Var{unwind\_info\_size}] The size of the unwind-info
|
||||
in bytes. This member exists for use by the
|
||||
\Func{find\_proc\_info}() call-back (see
|
||||
\Func{unw\_create\_addr\_space}(3)). The
|
||||
\Func{unw\_get\_proc\_info}() routine
|
||||
may return an undefined value in this member.\\
|
||||
\item[\Type{void~*}\Var{unwind\_info}] The pointer to the unwind-info.
|
||||
If no unwind info is available, this member must be set to
|
||||
\Const{NULL}. This member exists for use by the
|
||||
\Func{find\_proc\_info}() call-back (see
|
||||
\Func{unw\_create\_addr\_space}(3)). The
|
||||
\Func{unw\_get\_proc\_info}() routine
|
||||
may return an undefined value in this member.\\
|
||||
\end{description}
|
||||
Note that for the purposes of \Prog{libunwind}, the code of a
|
||||
procedure is assumed to occupy a single, contiguous range of
|
||||
addresses. For this reason, it is alwas possible to describe the
|
||||
extent of a procedure with the \Var{start\_ip} and \Var{end\_ip}
|
||||
members. If a single function/routine is split into multiple,
|
||||
discontiguous pieces, \Prog{libunwind} will treat each piece as a
|
||||
separate procedure.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_get\_proc\_info}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_get\_proc\_info}() is thread-safe. If cursor \Var{cp} is
|
||||
in the local address-space, this routine is also safe to use from a
|
||||
signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_ENOINFO}] \Prog{Libunwind} was unable to locate
|
||||
unwind-info for the procedure.
|
||||
\item[\Const{UNW\_EBADVERSION}] The unwind-info for the procedure has
|
||||
version or format that is not understood by \Prog{libunwind}.
|
||||
\end{Description}
|
||||
In addition, \Func{unw\_get\_proc\_info}() may return any error
|
||||
returned by the \Func{access\_mem}() call-back (see
|
||||
\Func{unw\_create\_addr\_space}(3)).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_create\_addr\_space(3)},
|
||||
\SeeAlso{unw\_get\_proc\_name(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,134 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_GET\\_PROC\\_INFO\\_BY\\_IP" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_get_proc_info_by_ip
|
||||
\-\- get procedure info by IP
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_get_proc_info_by_ip(unw_addr_space_t as,
|
||||
unw_word_t ip,
|
||||
unw_proc_info_t *pip,
|
||||
void *arg);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_get_proc_info_by_ip()
|
||||
routine returns the same
|
||||
kind of auxiliary information about a procedure as
|
||||
unw_get_proc_info(),
|
||||
except that the info is looked up by
|
||||
instruction\-pointer (IP) instead of a cursor. This is more flexible
|
||||
because it is possible to look up the info for an arbitrary procedure,
|
||||
even if it is not part of the current call\-chain. However, since it
|
||||
is more flexible, it also tends to run slower (and often much slower)
|
||||
than unw_get_proc_info().
|
||||
.PP
|
||||
The routine expects the followins arguments: as
|
||||
is the
|
||||
address\-space in which the instruction\-pointer should be looked up.
|
||||
For a look\-up in the local address\-space,
|
||||
unw_local_addr_space
|
||||
can be passed for this argument.
|
||||
Argument ip
|
||||
is the instruction\-pointer for which the procedure
|
||||
info should be looked up and pip
|
||||
is a pointer to a structure of
|
||||
type unw_proc_info_t
|
||||
which is used to return the info.
|
||||
Lastly, arg
|
||||
is the address\-space argument that should be used
|
||||
when accessing the address\-space. It has the same purpose as the
|
||||
argument of the same name for unw_init_remote().
|
||||
When
|
||||
accessing the local address\-space (first argument is
|
||||
unw_local_addr_space),
|
||||
NULL
|
||||
must be passed for this
|
||||
argument.
|
||||
.PP
|
||||
Note that for the purposes of libunwind,
|
||||
the code of a
|
||||
procedure is assumed to occupy a single, contiguous range of
|
||||
addresses. For this reason, it is alwas possible to describe the
|
||||
extent of a procedure with the start_ip
|
||||
and end_ip
|
||||
members. If a single function/routine is split into multiple,
|
||||
discontiguous pieces, libunwind
|
||||
will treat each piece as a
|
||||
separate procedure.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_get_proc_info_by_ip()
|
||||
returns 0. Otherwise the negative value of one of the error\-codes
|
||||
below is returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_get_proc_info()
|
||||
is thread\-safe. If the local
|
||||
address\-space is passed in argument as,
|
||||
this routine is also
|
||||
safe to use from a signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_ENOINFO
|
||||
Libunwind
|
||||
was unable to locate
|
||||
unwind\-info for the procedure.
|
||||
.TP
|
||||
UNW_EBADVERSION
|
||||
The unwind\-info for the procedure has
|
||||
version or format that is not understood by libunwind\&.
|
||||
.PP
|
||||
In addition, unw_get_proc_info()
|
||||
may return any error
|
||||
returned by the access_mem()
|
||||
call\-back (see
|
||||
unw_create_addr_space(3)).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_create_addr_space(3),
|
||||
unw_get_proc_name(3),
|
||||
unw_get_proc_info(3),
|
||||
unw_init_remote(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,91 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_get\_proc\_info\_by\_ip}{David Mosberger-Tang}{Programming Library}{unw\_get\_proc\_info\_by\_ip}unw\_get\_proc\_info\_by\_ip -- get procedure info by IP
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_get\_proc\_info\_by\_ip}(\Type{unw\_addr\_space\_t~}\Var{as}, \Type{unw\_word\_t~}\Var{ip}, \Type{unw\_proc\_info\_t~*}\Var{pip}, \Type{void~*}\Var{arg});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_get\_proc\_info\_by\_ip}() routine returns the same
|
||||
kind of auxiliary information about a procedure as
|
||||
\Func{unw\_get\_proc\_info}(), except that the info is looked up by
|
||||
instruction-pointer (IP) instead of a cursor. This is more flexible
|
||||
because it is possible to look up the info for an arbitrary procedure,
|
||||
even if it is not part of the current call-chain. However, since it
|
||||
is more flexible, it also tends to run slower (and often much slower)
|
||||
than \Func{unw\_get\_proc\_info}().
|
||||
|
||||
The routine expects the followins arguments: \Var{as} is the
|
||||
address-space in which the instruction-pointer should be looked up.
|
||||
For a look-up in the local address-space,
|
||||
\Var{unw\_local\_addr\_space} can be passed for this argument.
|
||||
Argument \Var{ip} is the instruction-pointer for which the procedure
|
||||
info should be looked up and \Var{pip} is a pointer to a structure of
|
||||
type \Type{unw\_proc\_info\_t} which is used to return the info.
|
||||
Lastly, \Var{arg} is the address-space argument that should be used
|
||||
when accessing the address-space. It has the same purpose as the
|
||||
argument of the same name for \Func{unw\_init\_remote}(). When
|
||||
accessing the local address-space (first argument is
|
||||
\Var{unw\_local\_addr\_space}), \Const{NULL} must be passed for this
|
||||
argument.
|
||||
|
||||
Note that for the purposes of \Prog{libunwind}, the code of a
|
||||
procedure is assumed to occupy a single, contiguous range of
|
||||
addresses. For this reason, it is alwas possible to describe the
|
||||
extent of a procedure with the \Var{start\_ip} and \Var{end\_ip}
|
||||
members. If a single function/routine is split into multiple,
|
||||
discontiguous pieces, \Prog{libunwind} will treat each piece as a
|
||||
separate procedure.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_get\_proc\_info\_by\_ip}()
|
||||
returns 0. Otherwise the negative value of one of the error-codes
|
||||
below is returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_get\_proc\_info}() is thread-safe. If the local
|
||||
address-space is passed in argument \Var{as}, this routine is also
|
||||
safe to use from a signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_ENOINFO}] \Prog{Libunwind} was unable to locate
|
||||
unwind-info for the procedure.
|
||||
\item[\Const{UNW\_EBADVERSION}] The unwind-info for the procedure has
|
||||
version or format that is not understood by \Prog{libunwind}.
|
||||
\end{Description}
|
||||
In addition, \Func{unw\_get\_proc\_info}() may return any error
|
||||
returned by the \Func{access\_mem}() call-back (see
|
||||
\Func{unw\_create\_addr\_space}(3)).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_create\_addr\_space(3)},
|
||||
\SeeAlso{unw\_get\_proc\_name(3)},
|
||||
\SeeAlso{unw\_get\_proc\_info(3)},
|
||||
\SeeAlso{unw\_init\_remote(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,123 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_GET\\_PROC\\_NAME" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_get_proc_name
|
||||
\-\- get name of current procedure
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_get_proc_name(unw_cursor_t *cp,
|
||||
char *bufp,
|
||||
size_t
|
||||
len,
|
||||
unw_word_t *offp);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_get_proc_name()
|
||||
routine returns the name of the
|
||||
procedure that created the stack frame identified by argument
|
||||
cp\&.
|
||||
The bufp
|
||||
argument is a pointer to a character buffer
|
||||
that is at least len
|
||||
bytes long. This buffer is used to return
|
||||
the name of the procedure. The offp
|
||||
argument is a pointer to a
|
||||
word that is used to return the byte\-offset of the instruction\-pointer
|
||||
saved in the stack frame identified by cp,
|
||||
relative to the start
|
||||
of the procedure. For example, if procedure foo()
|
||||
starts at
|
||||
address 0x40003000, then invoking unw_get_proc_name()
|
||||
on a
|
||||
stack frame with an instruction\-pointer value of 0x40003080 would
|
||||
return a value of 0x80 in the word pointed to by offp
|
||||
(assuming
|
||||
the procedure is at least 0x80 bytes long).
|
||||
.PP
|
||||
Note that on some platforms there is no reliable way to distinguish
|
||||
between procedure names and ordinary labels. Furthermore, if symbol
|
||||
information has been stripped from a program, procedure names may be
|
||||
completely unavailable or may be limited to those exported via a
|
||||
dynamic symbol table. In such cases, unw_get_proc_name()
|
||||
may return the name of a label or a preceeding (nearby) procedure.
|
||||
However, the offset returned through offp
|
||||
is always relative to
|
||||
the returned name, which ensures that the value (address) of the
|
||||
returned name plus the returned offset will always be equal to the
|
||||
instruction\-pointer of the stack frame identified by cp\&.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_get_proc_name()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_get_proc_name()
|
||||
is thread\-safe. If cursor cp
|
||||
is
|
||||
in the local address\-space, this routine is also safe to use from a
|
||||
signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_ENOINFO
|
||||
Libunwind
|
||||
was unable to determine
|
||||
the name of the procedure.
|
||||
.TP
|
||||
UNW_ENOMEM
|
||||
The procedure name is too long to fit
|
||||
in the buffer provided. A truncated version of the name has been
|
||||
returned.
|
||||
.PP
|
||||
In addition, unw_get_proc_name()
|
||||
may return any error
|
||||
returned by the access_mem()
|
||||
call\-back (see
|
||||
unw_create_addr_space(3)).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_get_proc_info(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,82 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_get\_proc\_name}{David Mosberger-Tang}{Programming Library}{unw\_get\_proc\_name}unw\_get\_proc\_name -- get name of current procedure
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_get\_proc\_name}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{char~*}\Var{bufp}, \Type{size\_t} \Var{len}, \Type{unw\_word\_t~*}\Var{offp});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_get\_proc\_name}() routine returns the name of the
|
||||
procedure that created the stack frame identified by argument
|
||||
\Var{cp}. The \Var{bufp} argument is a pointer to a character buffer
|
||||
that is at least \Var{len} bytes long. This buffer is used to return
|
||||
the name of the procedure. The \Var{offp} argument is a pointer to a
|
||||
word that is used to return the byte-offset of the instruction-pointer
|
||||
saved in the stack frame identified by \Var{cp}, relative to the start
|
||||
of the procedure. For example, if procedure \Func{foo}() starts at
|
||||
address 0x40003000, then invoking \Func{unw\_get\_proc\_name}() on a
|
||||
stack frame with an instruction-pointer value of 0x40003080 would
|
||||
return a value of 0x80 in the word pointed to by \Var{offp} (assuming
|
||||
the procedure is at least 0x80 bytes long).
|
||||
|
||||
Note that on some platforms there is no reliable way to distinguish
|
||||
between procedure names and ordinary labels. Furthermore, if symbol
|
||||
information has been stripped from a program, procedure names may be
|
||||
completely unavailable or may be limited to those exported via a
|
||||
dynamic symbol table. In such cases, \Func{unw\_get\_proc\_name}()
|
||||
may return the name of a label or a preceeding (nearby) procedure.
|
||||
However, the offset returned through \Var{offp} is always relative to
|
||||
the returned name, which ensures that the value (address) of the
|
||||
returned name plus the returned offset will always be equal to the
|
||||
instruction-pointer of the stack frame identified by \Var{cp}.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_get\_proc\_name}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_get\_proc\_name}() is thread-safe. If cursor \Var{cp} is
|
||||
in the local address-space, this routine is also safe to use from a
|
||||
signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_ENOINFO}] \Prog{Libunwind} was unable to determine
|
||||
the name of the procedure.
|
||||
\item[\Const{UNW\_ENOMEM}] The procedure name is too long to fit
|
||||
in the buffer provided. A truncated version of the name has been
|
||||
returned.
|
||||
\end{Description}
|
||||
In addition, \Func{unw\_get\_proc\_name}() may return any error
|
||||
returned by the \Func{access\_mem}() call-back (see
|
||||
\Func{unw\_create\_addr\_space}(3)).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_get\_proc\_info(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
112
src/third_party/unwind/dist/doc/unw_get_reg.man
vendored
112
src/third_party/unwind/dist/doc/unw_get_reg.man
vendored
@ -1,112 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_GET\\_REG" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_get_reg
|
||||
\-\- get register contents
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_get_reg(unw_cursor_t *cp,
|
||||
unw_regnum_t
|
||||
reg,
|
||||
unw_word_t *valp);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_get_reg()
|
||||
routine reads the value of register
|
||||
reg
|
||||
in the stack frame identified by cursor cp
|
||||
and stores
|
||||
the value in the word pointed to by valp\&.
|
||||
.PP
|
||||
The register numbering is target\-dependent and described in separate
|
||||
manual pages (e.g., libunwind\-ia64(3) for the IA\-64 target).
|
||||
Furthermore, the exact set of accessible registers may depend on the
|
||||
type of frame that cp
|
||||
is referring to. For ordinary stack
|
||||
frames, it is normally possible to access only the preserved
|
||||
(``callee\-saved\&'') registers and frame\-related registers (such as the
|
||||
stack\-pointer). However, for signal frames (see
|
||||
unw_is_signal_frame(3)),
|
||||
it is usually possible to access
|
||||
all registers.
|
||||
.PP
|
||||
Note that unw_get_reg()
|
||||
can only read the contents of
|
||||
registers whose values fit in a single word. See
|
||||
unw_get_fpreg(3)
|
||||
for a way to read registers which do not fit
|
||||
this constraint.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_get_reg()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_get_reg()
|
||||
is thread\-safe as well as safe to use
|
||||
from a signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_EBADREG
|
||||
An attempt was made to read a register
|
||||
that is either invalid or not accessible in the current frame.
|
||||
.PP
|
||||
In addition, unw_get_reg()
|
||||
may return any error returned by
|
||||
the access_mem(),
|
||||
access_reg(),
|
||||
and
|
||||
access_fpreg()
|
||||
call\-backs (see
|
||||
unw_create_addr_space(3)).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
libunwind\-ia64(3),
|
||||
unw_get_fpreg(3),
|
||||
unw_is_signal_frame(3),
|
||||
unw_set_reg(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
77
src/third_party/unwind/dist/doc/unw_get_reg.tex
vendored
77
src/third_party/unwind/dist/doc/unw_get_reg.tex
vendored
@ -1,77 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_get\_reg}{David Mosberger-Tang}{Programming Library}{unw\_get\_reg}unw\_get\_reg -- get register contents
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_get\_reg}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{unw\_regnum\_t} \Var{reg}, \Type{unw\_word\_t~*}\Var{valp});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_get\_reg}() routine reads the value of register
|
||||
\Var{reg} in the stack frame identified by cursor \Var{cp} and stores
|
||||
the value in the word pointed to by \Var{valp}.
|
||||
|
||||
The register numbering is target-dependent and described in separate
|
||||
manual pages (e.g., libunwind-ia64(3) for the IA-64 target).
|
||||
Furthermore, the exact set of accessible registers may depend on the
|
||||
type of frame that \Var{cp} is referring to. For ordinary stack
|
||||
frames, it is normally possible to access only the preserved
|
||||
(``callee-saved'') registers and frame-related registers (such as the
|
||||
stack-pointer). However, for signal frames (see
|
||||
\Func{unw\_is\_signal\_frame}(3)), it is usually possible to access
|
||||
all registers.
|
||||
|
||||
Note that \Func{unw\_get\_reg}() can only read the contents of
|
||||
registers whose values fit in a single word. See
|
||||
\Func{unw\_get\_fpreg}(3) for a way to read registers which do not fit
|
||||
this constraint.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_get\_reg}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_get\_reg}() is thread-safe as well as safe to use
|
||||
from a signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_EBADREG}] An attempt was made to read a register
|
||||
that is either invalid or not accessible in the current frame.
|
||||
\end{Description}
|
||||
In addition, \Func{unw\_get\_reg}() may return any error returned by
|
||||
the \Func{access\_mem}(), \Func{access\_reg}(), and
|
||||
\Func{access\_fpreg}() call-backs (see
|
||||
\Func{unw\_create\_addr\_space}(3)).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{libunwind-ia64(3)},
|
||||
\SeeAlso{unw\_get\_fpreg(3)},
|
||||
\SeeAlso{unw\_is\_signal\_frame(3)},
|
||||
\SeeAlso{unw\_set\_reg(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,93 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_GETCONTEXT" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_getcontext
|
||||
\-\- get initial machine\-state
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_getcontext(unw_context_t *ucp);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_getcontext()
|
||||
routine initializes the context structure
|
||||
pointed to by ucp
|
||||
with the machine\-state of the call\-site. The
|
||||
exact set of registers stored by unw_getcontext()
|
||||
is
|
||||
platform\-specific, but, in general, at least all preserved
|
||||
(``callee\-saved\&'') and all frame\-related registers, such as the
|
||||
stack\-pointer, will be stored.
|
||||
.PP
|
||||
This routine is normally implemented as a macro and applications
|
||||
should not attempt to take its address.
|
||||
.PP
|
||||
.SH PLATFORM\-SPECIFIC NOTES
|
||||
|
||||
.PP
|
||||
On IA\-64, unw_context_t
|
||||
has a layout that is compatible with
|
||||
that of ucontext_t
|
||||
and such structures can be initialized with
|
||||
getcontext()
|
||||
instead of unw_getcontext().
|
||||
However, the
|
||||
reverse is \fInot\fP
|
||||
true and it is \fInot\fP
|
||||
safe to use structures
|
||||
initialized by unw_getcontext()
|
||||
in places where a structure
|
||||
initialized by getcontext()
|
||||
is expected. The reason for this
|
||||
asymmetry is that unw_getcontext()
|
||||
is optimized for maximum
|
||||
performance and does not, for example, save the signal mask.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_getcontext()
|
||||
returns 0.
|
||||
Otherwise, a value of \-1 is returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_getcontext()
|
||||
is thread\-safe as well as safe to use
|
||||
from a signal handler.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_init_local(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,63 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_getcontext}{David Mosberger-Tang}{Programming Library}{unw\_getcontext}unw\_getcontext -- get initial machine-state
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_getcontext}(\Type{unw\_context\_t~*}\Var{ucp});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_getcontext}() routine initializes the context structure
|
||||
pointed to by \Var{ucp} with the machine-state of the call-site. The
|
||||
exact set of registers stored by \Func{unw\_getcontext}() is
|
||||
platform-specific, but, in general, at least all preserved
|
||||
(``callee-saved'') and all frame-related registers, such as the
|
||||
stack-pointer, will be stored.
|
||||
|
||||
This routine is normally implemented as a macro and applications
|
||||
should not attempt to take its address.
|
||||
|
||||
\section{Platform-specific Notes}
|
||||
|
||||
On IA-64, \Type{unw\_context\_t} has a layout that is compatible with
|
||||
that of \Type{ucontext\_t} and such structures can be initialized with
|
||||
\Func{getcontext}() instead of \Func{unw\_getcontext}(). However, the
|
||||
reverse is \emph{not} true and it is \emph{not} safe to use structures
|
||||
initialized by \Func{unw\_getcontext()} in places where a structure
|
||||
initialized by \Func{getcontext()} is expected. The reason for this
|
||||
asymmetry is that \Func{unw\_getcontext()} is optimized for maximum
|
||||
performance and does not, for example, save the signal mask.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_getcontext}() returns 0.
|
||||
Otherwise, a value of -1 is returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_getcontext}() is thread-safe as well as safe to use
|
||||
from a signal handler.
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_init\_local(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
124
src/third_party/unwind/dist/doc/unw_init_local.man
vendored
124
src/third_party/unwind/dist/doc/unw_init_local.man
vendored
@ -1,124 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Wed Aug 16 12:11:05 PDT 2017
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_INIT\\_LOCAL" "3" "16 August 2017" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_init_local
|
||||
\-\- initialize cursor for local unwinding
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_init_local(unw_cursor_t *c,
|
||||
unw_context_t *ctxt);
|
||||
.br
|
||||
int
|
||||
unw_init_local2(unw_cursor_t *c,
|
||||
unw_context_t *ctxt,
|
||||
int
|
||||
flag);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_init_local()
|
||||
routine initializes the unwind cursor
|
||||
pointed to by c
|
||||
with the machine\-state in the context structure
|
||||
pointed to by ctxt\&.
|
||||
As such, the machine\-state pointed to by
|
||||
ctxt
|
||||
identifies the initial stack frame at which unwinding
|
||||
starts. The machine\-state is expected to be one provided by a call to
|
||||
unw_getcontext; as such, the instruction pointer may point to the
|
||||
instruction after the last instruction of a function, and libunwind
|
||||
will back\-up the instruction pointer before beginning a walk up the
|
||||
call stack. The machine\-state must remain valid for the duration for
|
||||
which the cursor c
|
||||
is in use.
|
||||
.PP
|
||||
The unw_init_local()
|
||||
routine can be used only for unwinding in
|
||||
the address space of the current process (i.e., for local unwinding).
|
||||
For all other cases, unw_init_remote()
|
||||
must be used instead.
|
||||
However, unwind performance may be better when using
|
||||
unw_init_local().
|
||||
Also, unw_init_local()
|
||||
is
|
||||
available even when UNW_LOCAL_ONLY
|
||||
has been defined before
|
||||
including <libunwind.h>,
|
||||
whereas unw_init_remote()
|
||||
is not.
|
||||
.PP
|
||||
If the unw_context_t is known to be a signal frame (i.e., from the
|
||||
third argument in a sigaction handler on linux),
|
||||
unw_init_local2()
|
||||
should be used for correct initialization
|
||||
on some platforms, passing the UNW_INIT_SIGNAL_FRAME flag.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_init_local()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_init_local()
|
||||
is thread\-safe as well as safe to use from a
|
||||
signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EINVAL
|
||||
unw_init_local()
|
||||
was called in a
|
||||
version of libunwind
|
||||
which supports remote unwinding only
|
||||
(this normally happens when calling unw_init_local()
|
||||
for a
|
||||
cross\-platform version of libunwind).
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_EBADREG
|
||||
A register needed by unw_init_local()
|
||||
wasn\&'t accessible.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_init_remote(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,80 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_init\_local}{David Mosberger-Tang}{Programming Library}{unw\_init\_local}unw\_init\_local -- initialize cursor for local unwinding
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_init\_local}(\Type{unw\_cursor\_t~*}\Var{c}, \Type{unw\_context\_t~*}\Var{ctxt});\\
|
||||
\Type{int} \Func{unw\_init\_local2}(\Type{unw\_cursor\_t~*}\Var{c}, \Type{unw\_context\_t~*}\Var{ctxt}, \Type{int} \Var{flag});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_init\_local}() routine initializes the unwind cursor
|
||||
pointed to by \Var{c} with the machine-state in the context structure
|
||||
pointed to by \Var{ctxt}. As such, the machine-state pointed to by
|
||||
\Var{ctxt} identifies the initial stack frame at which unwinding
|
||||
starts. The machine-state is expected to be one provided by a call to
|
||||
unw_getcontext; as such, the instruction pointer may point to the
|
||||
instruction after the last instruction of a function, and libunwind
|
||||
will back-up the instruction pointer before beginning a walk up the
|
||||
call stack. The machine-state must remain valid for the duration for
|
||||
which the cursor \Var{c} is in use.
|
||||
|
||||
The \Func{unw\_init\_local}() routine can be used only for unwinding in
|
||||
the address space of the current process (i.e., for local unwinding).
|
||||
For all other cases, \Func{unw\_init\_remote}() must be used instead.
|
||||
However, unwind performance may be better when using
|
||||
\Func{unw\_init\_local}(). Also, \Func{unw\_init\_local}() is
|
||||
available even when \Const{UNW\_LOCAL\_ONLY} has been defined before
|
||||
including \File{$<$libunwind.h$>$}, whereas \Func{unw\_init\_remote}()
|
||||
is not.
|
||||
|
||||
If the unw_context_t is known to be a signal frame (i.e., from the
|
||||
third argument in a sigaction handler on linux),
|
||||
\Func{unw\_init\_local2}() should be used for correct initialization
|
||||
on some platforms, passing the UNW_INIT_SIGNAL_FRAME flag.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_init\_local}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_init\_local}() is thread-safe as well as safe to use from a
|
||||
signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EINVAL}] \Func{unw\_init\_local}() was called in a
|
||||
version of \Prog{libunwind} which supports remote unwinding only
|
||||
(this normally happens when calling \Func{unw\_init\_local}() for a
|
||||
cross-platform version of \Prog{libunwind}).
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_EBADREG}] A register needed by \Func{unw\_init\_local}()
|
||||
wasn't accessible.
|
||||
\end{Description}
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)}, \SeeAlso{unw\_init\_remote(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1 +0,0 @@
|
||||
.so man3/unw_init_local.3
|
||||
123
src/third_party/unwind/dist/doc/unw_init_remote.man
vendored
123
src/third_party/unwind/dist/doc/unw_init_remote.man
vendored
@ -1,123 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_INIT\\_REMOTE" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_init_remote
|
||||
\-\- initialize cursor for remote unwinding
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_init_remote(unw_cursor_t *c,
|
||||
unw_addr_space_t as,
|
||||
void *arg);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_init_remote()
|
||||
routine initializes the unwind cursor
|
||||
pointed to by c
|
||||
for unwinding in the address space identified by
|
||||
as\&.
|
||||
The as
|
||||
argument can either be set to
|
||||
unw_local_addr_space
|
||||
(local address space) or to an arbitrary
|
||||
address space created with unw_create_addr_space().
|
||||
.PP
|
||||
The arg
|
||||
void\-pointer tells the address space exactly what entity
|
||||
should be unwound. For example, if unw_local_addr_space
|
||||
is
|
||||
passed in as,
|
||||
then arg
|
||||
needs to be a pointer to a context
|
||||
structure containing the machine\-state of the initial stack frame.
|
||||
However, other address\-spaces may instead expect a process\-id, a
|
||||
thread\-id, or a pointer to an arbitrary structure which identifies the
|
||||
stack\-frame chain to be unwound. In other words, the interpretation
|
||||
of arg
|
||||
is entirely dependent on the address\-space in use;
|
||||
libunwind
|
||||
never interprets the argument in any way on its own.
|
||||
.PP
|
||||
Note that unw_init_remote()
|
||||
can be used to initiate unwinding
|
||||
in \fIany\fP
|
||||
process, including the local process in which the
|
||||
unwinder itself is running. However, for local unwinding, it is
|
||||
generally preferable to use unw_init_local()
|
||||
instead, because
|
||||
it is easier to use and because it may perform better.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_init_remote()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_init_remote()
|
||||
is thread\-safe. If the local address\-space
|
||||
is passed in argument as,
|
||||
this routine is also safe to use from
|
||||
a signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EINVAL
|
||||
unw_init_remote()
|
||||
was called in a
|
||||
version of libunwind
|
||||
which supports local unwinding only
|
||||
(this normally happens when defining UNW_LOCAL_ONLY
|
||||
before
|
||||
including <libunwind.h>
|
||||
and then calling
|
||||
unw_init_remote()).
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_EBADREG
|
||||
A register needed by unw_init_remote()
|
||||
wasn\&'t accessible.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_create_addr_space(3),
|
||||
unw_init_local(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,79 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_init\_remote}{David Mosberger-Tang}{Programming Library}{unw\_init\_remote}unw\_init\_remote -- initialize cursor for remote unwinding
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_init\_remote}(\Type{unw\_cursor\_t~*}\Var{c}, \Type{unw\_addr\_space\_t~}\Var{as}, \Type{void~*}\Var{arg});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_init\_remote}() routine initializes the unwind cursor
|
||||
pointed to by \Var{c} for unwinding in the address space identified by
|
||||
\Var{as}. The \Var{as} argument can either be set to
|
||||
\Var{unw\_local\_addr\_space} (local address space) or to an arbitrary
|
||||
address space created with \Func{unw\_create\_addr\_space}().
|
||||
|
||||
The \Var{arg} void-pointer tells the address space exactly what entity
|
||||
should be unwound. For example, if \Var{unw\_local\_addr\_space} is
|
||||
passed in \Var{as}, then \Var{arg} needs to be a pointer to a context
|
||||
structure containing the machine-state of the initial stack frame.
|
||||
However, other address-spaces may instead expect a process-id, a
|
||||
thread-id, or a pointer to an arbitrary structure which identifies the
|
||||
stack-frame chain to be unwound. In other words, the interpretation
|
||||
of \Var{arg} is entirely dependent on the address-space in use;
|
||||
\Prog{libunwind} never interprets the argument in any way on its own.
|
||||
|
||||
Note that \Func{unw\_init\_remote}() can be used to initiate unwinding
|
||||
in \emph{any} process, including the local process in which the
|
||||
unwinder itself is running. However, for local unwinding, it is
|
||||
generally preferable to use \Func{unw\_init\_local}() instead, because
|
||||
it is easier to use and because it may perform better.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_init\_remote}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_init\_remote}() is thread-safe. If the local address-space
|
||||
is passed in argument \Var{as}, this routine is also safe to use from
|
||||
a signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EINVAL}] \Func{unw\_init\_remote}() was called in a
|
||||
version of \Prog{libunwind} which supports local unwinding only
|
||||
(this normally happens when defining \Const{UNW\_LOCAL\_ONLY} before
|
||||
including \File{$<$libunwind.h$>$} and then calling
|
||||
\Func{unw\_init\_remote}()).
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_EBADREG}] A register needed by \Func{unw\_init\_remote}()
|
||||
wasn't accessible.
|
||||
\end{Description}
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)}, \SeeAlso{unw\_create\_addr\_space(3)},
|
||||
\SeeAlso{unw\_init\_local(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
73
src/third_party/unwind/dist/doc/unw_is_fpreg.man
vendored
73
src/third_party/unwind/dist/doc/unw_is_fpreg.man
vendored
@ -1,73 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_IS\\_FPREG" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_is_fpreg
|
||||
\-\- check if a register is a floating\-point register
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_is_fpreg(unw_regnum_t
|
||||
reg);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_is_fpreg()
|
||||
routine checks whether register number
|
||||
reg
|
||||
is a floating\-point register.
|
||||
.PP
|
||||
This routine is normally implemented as a macro and applications
|
||||
should not attempt to take its address.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
The unw_is_fpreg()
|
||||
routine returns a non\-zero value if
|
||||
reg
|
||||
is a floating\-point register. Otherwise, it returns a value
|
||||
of 0.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_is_fpreg()
|
||||
is thread\-safe as well as safe to use
|
||||
from a signal handler.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_get_reg(3),
|
||||
unw_set_reg(3),
|
||||
unw_get_fpreg(3),
|
||||
unw_set_fpreg(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
52
src/third_party/unwind/dist/doc/unw_is_fpreg.tex
vendored
52
src/third_party/unwind/dist/doc/unw_is_fpreg.tex
vendored
@ -1,52 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_is\_fpreg}{David Mosberger-Tang}{Programming Library}{unw\_is\_fpreg}unw\_is\_fpreg -- check if a register is a floating-point register
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_is\_fpreg}(\Type{unw\_regnum\_t} \Var{reg});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_is\_fpreg}() routine checks whether register number
|
||||
\Var{reg} is a floating-point register.
|
||||
|
||||
This routine is normally implemented as a macro and applications
|
||||
should not attempt to take its address.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
The \Func{unw\_is\_fpreg}() routine returns a non-zero value if
|
||||
\Var{reg} is a floating-point register. Otherwise, it returns a value
|
||||
of 0.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_is\_fpreg}() is thread-safe as well as safe to use
|
||||
from a signal handler.
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_get\_reg(3)},
|
||||
\SeeAlso{unw\_set\_reg(3)},
|
||||
\SeeAlso{unw\_get\_fpreg(3)},
|
||||
\SeeAlso{unw\_set\_fpreg(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,88 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_IS\\_SIGNAL\\_FRAME" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_is_signal_frame
|
||||
\-\- check if current frame is a signal frame
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_is_signal_frame(unw_cursor_t *cp);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_is_signal_frame()
|
||||
routine returns a positive value
|
||||
if the current frame identified by cp
|
||||
is a signal frame, and a
|
||||
value of 0 otherwise. For the purpose of this discussion, a signal
|
||||
frame is a frame that was created in response to a potentially
|
||||
asynchronous interruption. For UNIX and UNIX\-like platforms, such
|
||||
frames are normally created by the kernel when delivering a signal.
|
||||
In a kernel\-environment, a signal frame might, for example, correspond
|
||||
to a frame created in response to a device interrupt.
|
||||
.PP
|
||||
Signal frames are somewhat unusual because the asynchronous nature of
|
||||
the events that create them require storing the contents of registers
|
||||
that are normally treated as scratch (``caller\-saved\&'') registers.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_is_signal_frame()
|
||||
returns a
|
||||
positive value if the current frame is a signal frame, or 0 if it is
|
||||
not. Otherwise, a negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_is_signal_frame()
|
||||
is thread\-safe as well as safe to use
|
||||
from a signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_ENOINFO
|
||||
Libunwind
|
||||
is unable to determine
|
||||
whether or not the current frame is a signal frame.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_get_reg(3),
|
||||
unw_set_reg(3),
|
||||
unw_get_fpreg(3),
|
||||
unw_set_fpreg(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,67 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_is\_signal\_frame}{David Mosberger-Tang}{Programming Library}{unw\_is\_signal\_frame}unw\_is\_signal\_frame -- check if current frame is a signal frame
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_is\_signal\_frame}(\Type{unw\_cursor\_t~*}\Var{cp});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_is\_signal\_frame}() routine returns a positive value
|
||||
if the current frame identified by \Var{cp} is a signal frame, and a
|
||||
value of 0 otherwise. For the purpose of this discussion, a signal
|
||||
frame is a frame that was created in response to a potentially
|
||||
asynchronous interruption. For UNIX and UNIX-like platforms, such
|
||||
frames are normally created by the kernel when delivering a signal.
|
||||
In a kernel-environment, a signal frame might, for example, correspond
|
||||
to a frame created in response to a device interrupt.
|
||||
|
||||
Signal frames are somewhat unusual because the asynchronous nature of
|
||||
the events that create them require storing the contents of registers
|
||||
that are normally treated as scratch (``caller-saved'') registers.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_is\_signal\_frame}() returns a
|
||||
positive value if the current frame is a signal frame, or 0 if it is
|
||||
not. Otherwise, a negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_is\_signal\_frame}() is thread-safe as well as safe to use
|
||||
from a signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_ENOINFO}] \Prog{Libunwind} is unable to determine
|
||||
whether or not the current frame is a signal frame.
|
||||
\end{Description}
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_get\_reg(3)},
|
||||
\SeeAlso{unw\_set\_reg(3)},
|
||||
\SeeAlso{unw\_get\_fpreg(3)},
|
||||
\SeeAlso{unw\_set\_fpreg(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,137 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Wed Aug 16 11:09:44 PDT 2017
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_REG\\_STATES\\_ITERATE" "3" "16 August 2017" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_reg_states_iterate
|
||||
\-\- get register state info on current procedure
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_reg_states_iterate(unw_cursor_t *cp,
|
||||
unw_reg_states_callbackcb,
|
||||
void *token);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_reg_states_iterate()
|
||||
routine provides
|
||||
information about the procedure that created the stack frame
|
||||
identified by argument cp\&.
|
||||
The cb
|
||||
argument is a pointer
|
||||
to a function of type unw_reg_states_callback
|
||||
which is used to
|
||||
return the information. The function unw_reg_states_callback
|
||||
has the
|
||||
following definition:
|
||||
.PP
|
||||
int
|
||||
( *unw_reg_states_callback)(void *token,
|
||||
void *reg_states_data,
|
||||
size_t
|
||||
reg_states_data_size,
|
||||
unw_word_t
|
||||
start_ip,
|
||||
unw_word_t
|
||||
end_ip);
|
||||
.PP
|
||||
The callback function may be invoked several times for each call of unw_reg_states_iterate\&.
|
||||
Each call is associcated with a instruction address range and a set of instructions on how to update register values when returning from the procedure in that address range. For each invocation, the arguments to the callback function are:
|
||||
.TP
|
||||
void * token
|
||||
The token value passed to unw_reg_states_callback\&.
|
||||
.br
|
||||
.TP
|
||||
void * reg_states_data
|
||||
A pointer to data about
|
||||
updating register values. This data, or a copy of it, can be passed
|
||||
to unw_apply_reg_state\&.
|
||||
.br
|
||||
.TP
|
||||
int reg_states_data_size
|
||||
The size of the register update data.
|
||||
.br
|
||||
.TP
|
||||
unw_word_t start_ip
|
||||
The address of the first
|
||||
instruction of the address range.
|
||||
.br
|
||||
.TP
|
||||
unw_word_t end_ip
|
||||
The address of the first
|
||||
instruction \fIbeyond\fP
|
||||
the end of the address range.
|
||||
.br
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_reg_states_iterate()
|
||||
returns
|
||||
0. If the callback function returns a nonzero value, that indicates
|
||||
failure and the function returns immediately. Otherwise the negative
|
||||
value of one of the error\-codes below is returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_reg_states_iterate()
|
||||
is thread\-safe. If cursor cp
|
||||
is
|
||||
in the local address\-space, this routine is also safe to use from a
|
||||
signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_ENOINFO
|
||||
Libunwind
|
||||
was unable to locate
|
||||
unwind\-info for the procedure.
|
||||
.TP
|
||||
UNW_EBADVERSION
|
||||
The unwind\-info for the procedure has
|
||||
version or format that is not understood by libunwind\&.
|
||||
.PP
|
||||
In addition, unw_reg_states_iterate()
|
||||
may return any error
|
||||
returned by the access_mem()
|
||||
call\-back (see
|
||||
unw_create_addr_space(3)).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_apply_reg_state(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,83 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_reg\_states\_iterate}{David Mosberger-Tang}{Programming Library}{unw\_reg\_states\_iterate}unw\_reg\_states\_iterate -- get register state info on current procedure
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_reg\_states\_iterate}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{unw\_reg\_states\_callback}\Var{cb}, \Type{void~*}\Var{token});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_reg\_states\_iterate}() routine provides
|
||||
information about the procedure that created the stack frame
|
||||
identified by argument \Var{cp}. The \Var{cb} argument is a pointer
|
||||
to a function of type \Type{unw\_reg\_states\_callback} which is used to
|
||||
return the information. The function \Type{unw\_reg\_states\_callback} has the
|
||||
following definition:
|
||||
|
||||
\Type{int} (~*\Var{unw\_reg\_states\_callback})(\Type{void~*}\Var{token},
|
||||
\Type{void~*}\Var{reg\_states\_data},
|
||||
\Type{size\_t} \Var{reg\_states\_data\_size},
|
||||
\Type{unw\_word\_t} \Var{start\_ip}, \Type{unw\_word\_t} \Var{end\_ip});
|
||||
|
||||
The callback function may be invoked several times for each call of \Func{unw\_reg\_states\_iterate}. Each call is associcated with a instruction address range and a set of instructions on how to update register values when returning from the procedure in that address range. For each invocation, the arguments to the callback function are:
|
||||
\begin{description}
|
||||
\item[\Type{void~*} \Var{token}] The token value passed to \Var{unw\_reg\_states\_callback}. \\
|
||||
\item[\Type{void~*} \Var{reg\_states\_data}] A pointer to data about
|
||||
updating register values. This data, or a copy of it, can be passed
|
||||
to \Var{unw\_apply\_reg\_state}.\\
|
||||
\item[\Type{int} \Var{reg\_states\_data\_size}] The size of the register update data. \\
|
||||
\item[\Type{unw\_word\_t} \Var{start\_ip}] The address of the first
|
||||
instruction of the address range. \\
|
||||
\item[\Type{unw\_word\_t} \Var{end\_ip}] The address of the first
|
||||
instruction \emph{beyond} the end of the address range. \\
|
||||
\end{description}
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_reg\_states\_iterate}() returns
|
||||
0. If the callback function returns a nonzero value, that indicates
|
||||
failure and the function returns immediately. Otherwise the negative
|
||||
value of one of the error-codes below is returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_reg\_states\_iterate}() is thread-safe. If cursor \Var{cp} is
|
||||
in the local address-space, this routine is also safe to use from a
|
||||
signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_ENOINFO}] \Prog{Libunwind} was unable to locate
|
||||
unwind-info for the procedure.
|
||||
\item[\Const{UNW\_EBADVERSION}] The unwind-info for the procedure has
|
||||
version or format that is not understood by \Prog{libunwind}.
|
||||
\end{Description}
|
||||
In addition, \Func{unw\_reg\_states\_iterate}() may return any error
|
||||
returned by the \Func{access\_mem}() call-back (see
|
||||
\Func{unw\_create\_addr\_space}(3)).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_apply\_reg\_state(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
68
src/third_party/unwind/dist/doc/unw_regname.man
vendored
68
src/third_party/unwind/dist/doc/unw_regname.man
vendored
@ -1,68 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_REGNAME" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_regname
|
||||
\-\- get register name
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
const char *unw_regname(unw_regnum_t
|
||||
regnum);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_regname()
|
||||
routine returns a printable name for
|
||||
register regnum\&.
|
||||
If regnum
|
||||
is an invalid or otherwise
|
||||
unrecognized register number, a string consisting of three question
|
||||
marks is returned. The returned string is statically allocated and
|
||||
therefore guaranteed to remain valid until the application terminates.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
The unw_regname()
|
||||
routine cannot fail and always returns a
|
||||
valid (non\-NULL)
|
||||
string.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
The unw_regname()
|
||||
routine is thread\-safe as well as safe to
|
||||
use from a signal handler.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
47
src/third_party/unwind/dist/doc/unw_regname.tex
vendored
47
src/third_party/unwind/dist/doc/unw_regname.tex
vendored
@ -1,47 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_regname}{David Mosberger-Tang}{Programming Library}{unw\_regname}unw\_regname -- get register name
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{const char~*}\Func{unw\_regname}(\Type{unw\_regnum\_t} \Var{regnum});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_regname}() routine returns a printable name for
|
||||
register \Var{regnum}. If \Var{regnum} is an invalid or otherwise
|
||||
unrecognized register number, a string consisting of three question
|
||||
marks is returned. The returned string is statically allocated and
|
||||
therefore guaranteed to remain valid until the application terminates.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
The \Func{unw\_regname}() routine cannot fail and always returns a
|
||||
valid (non-\Const{NULL}) string.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
The \Func{unw\_regname}() routine is thread-safe as well as safe to
|
||||
use from a signal handler.
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
146
src/third_party/unwind/dist/doc/unw_resume.man
vendored
146
src/third_party/unwind/dist/doc/unw_resume.man
vendored
@ -1,146 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_RESUME" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_resume
|
||||
\-\- resume execution in a particular stack frame
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_resume(unw_cursor_t *cp);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_resume()
|
||||
routine resumes execution at the stack frame
|
||||
identified by cp\&.
|
||||
The behavior of this routine differs
|
||||
slightly for local and remote unwinding.
|
||||
.PP
|
||||
For local unwinding, unw_resume()
|
||||
restores the machine state
|
||||
and then directly resumes execution in the target stack frame. Thus
|
||||
unw_resume()
|
||||
does not return in this case. Restoring the
|
||||
machine state normally involves restoring the ``preserved\&''
|
||||
(callee\-saved) registers. However, if execution in any of the stack
|
||||
frames younger (more deeply nested) than the one identified by
|
||||
cp
|
||||
was interrupted by a signal, then unw_resume()
|
||||
will
|
||||
restore all registers as well as the signal mask. Attempting to call
|
||||
unw_resume()
|
||||
on a cursor which identifies the stack frame of
|
||||
another thread results in undefined behavior (e.g., the program may
|
||||
crash).
|
||||
.PP
|
||||
For remote unwinding, unw_resume()
|
||||
installs the machine state
|
||||
identified by the cursor by calling the access_reg
|
||||
and
|
||||
access_fpreg
|
||||
accessor callbacks as needed. Once that is
|
||||
accomplished, the resume
|
||||
accessor callback is invoked. The
|
||||
unw_resume
|
||||
routine then returns normally (that is, unlikely
|
||||
for local unwinding, unw_resume
|
||||
will always return for remote
|
||||
unwinding).
|
||||
.PP
|
||||
Most platforms reserve some registers to pass arguments to exception
|
||||
handlers (e.g., IA\-64 uses r15\-r18
|
||||
for this
|
||||
purpose). These registers are normally treated like ``scratch\&''
|
||||
registers. However, if libunwind
|
||||
is used to set an exception
|
||||
argument register to a particular value (e.g., via
|
||||
unw_set_reg()),
|
||||
then unw_resume()
|
||||
will install this
|
||||
value as the contents of the register. In other words, the exception
|
||||
handling arguments are installed even in cases where normally only the
|
||||
``preserved\&'' registers are restored.
|
||||
.PP
|
||||
Note that unw_resume()
|
||||
does \fInot\fP
|
||||
invoke any unwind
|
||||
handlers (aka, ``personality routines\&''). If a program needs this, it
|
||||
will have to do so on its own by obtaining the unw_proc_info_t
|
||||
of each unwound frame and appropriately processing its unwind handler
|
||||
and language\-specific data area (lsda). These steps are generally
|
||||
dependent on the target\-platform and are regulated by the
|
||||
processor\-specific ABI (application\-binary interface).
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
For local unwinding, unw_resume()
|
||||
does not return on success.
|
||||
For remote unwinding, it returns 0 on success. On failure, the
|
||||
negative value of one of the errors below is returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_resume()
|
||||
is thread\-safe. If cursor cp
|
||||
is in the
|
||||
local address\-space, this routine is also safe to use from a signal
|
||||
handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_EBADREG
|
||||
A register needed by unw_resume()
|
||||
wasn\&'t
|
||||
accessible.
|
||||
.TP
|
||||
UNW_EINVALIDIP
|
||||
The instruction pointer identified by
|
||||
cp
|
||||
is not valid.
|
||||
.TP
|
||||
UNW_BADFRAME
|
||||
The stack frame identified by
|
||||
cp
|
||||
is not valid.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_set_reg(3),
|
||||
sigprocmask(2)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
99
src/third_party/unwind/dist/doc/unw_resume.tex
vendored
99
src/third_party/unwind/dist/doc/unw_resume.tex
vendored
@ -1,99 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_resume}{David Mosberger-Tang}{Programming Library}{unw\_resume}unw\_resume -- resume execution in a particular stack frame
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_resume}(\Type{unw\_cursor\_t~*}\Var{cp});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_resume}() routine resumes execution at the stack frame
|
||||
identified by \Var{cp}. The behavior of this routine differs
|
||||
slightly for local and remote unwinding.
|
||||
|
||||
For local unwinding, \Func{unw\_resume}() restores the machine state
|
||||
and then directly resumes execution in the target stack frame. Thus
|
||||
\Func{unw\_resume}() does not return in this case. Restoring the
|
||||
machine state normally involves restoring the ``preserved''
|
||||
(callee-saved) registers. However, if execution in any of the stack
|
||||
frames younger (more deeply nested) than the one identified by
|
||||
\Var{cp} was interrupted by a signal, then \Func{unw\_resume}() will
|
||||
restore all registers as well as the signal mask. Attempting to call
|
||||
\Func{unw\_resume}() on a cursor which identifies the stack frame of
|
||||
another thread results in undefined behavior (e.g., the program may
|
||||
crash).
|
||||
|
||||
For remote unwinding, \Func{unw\_resume}() installs the machine state
|
||||
identified by the cursor by calling the \Func{access\_reg} and
|
||||
\Func{access\_fpreg} accessor callbacks as needed. Once that is
|
||||
accomplished, the \Func{resume} accessor callback is invoked. The
|
||||
\Func{unw\_resume} routine then returns normally (that is, unlikely
|
||||
for local unwinding, \Func{unw\_resume} will always return for remote
|
||||
unwinding).
|
||||
|
||||
Most platforms reserve some registers to pass arguments to exception
|
||||
handlers (e.g., IA-64 uses \texttt{r15}-\texttt{r18} for this
|
||||
purpose). These registers are normally treated like ``scratch''
|
||||
registers. However, if \Prog{libunwind} is used to set an exception
|
||||
argument register to a particular value (e.g., via
|
||||
\Func{unw\_set\_reg}()), then \Func{unw\_resume}() will install this
|
||||
value as the contents of the register. In other words, the exception
|
||||
handling arguments are installed even in cases where normally only the
|
||||
``preserved'' registers are restored.
|
||||
|
||||
Note that \Func{unw\_resume}() does \emph{not} invoke any unwind
|
||||
handlers (aka, ``personality routines''). If a program needs this, it
|
||||
will have to do so on its own by obtaining the \Type{unw\_proc\_info\_t}
|
||||
of each unwound frame and appropriately processing its unwind handler
|
||||
and language-specific data area (lsda). These steps are generally
|
||||
dependent on the target-platform and are regulated by the
|
||||
processor-specific ABI (application-binary interface).
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
For local unwinding, \Func{unw\_resume}() does not return on success.
|
||||
For remote unwinding, it returns 0 on success. On failure, the
|
||||
negative value of one of the errors below is returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_resume}() is thread-safe. If cursor \Var{cp} is in the
|
||||
local address-space, this routine is also safe to use from a signal
|
||||
handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_EBADREG}] A register needed by \Func{unw\_resume}() wasn't
|
||||
accessible.
|
||||
\item[\Const{UNW\_EINVALIDIP}] The instruction pointer identified by
|
||||
\Var{cp} is not valid.
|
||||
\item[\Const{UNW\_BADFRAME}] The stack frame identified by
|
||||
\Var{cp} is not valid.
|
||||
\end{Description}
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_set\_reg(3)},
|
||||
sigprocmask(2)
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,88 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Fri Jan 13 08:33:21 PST 2017
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_SET\\_CACHE\\_SIZE" "3" "13 January 2017" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_set_cache_size
|
||||
\-\- set unwind cache size
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_set_cache_size(unw_addr_space_t
|
||||
as,
|
||||
size_t
|
||||
size,
|
||||
int
|
||||
flag);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_set_cache_size()
|
||||
routine sets the cache size of
|
||||
address space as
|
||||
to hold at least as many items as given by
|
||||
argument size\&.
|
||||
It may hold more items as determined by the
|
||||
implementation. To disable caching, call
|
||||
unw_set_caching_policy)
|
||||
with a policy of
|
||||
UNW_CACHE_NONE\&.
|
||||
Flag is currently unused and must be 0.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_set_cache_size()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_set_cache_size()
|
||||
is thread\-safe but \fInot\fP
|
||||
safe
|
||||
to use from a signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_ENOMEM
|
||||
The desired cache size could not be
|
||||
established because the application is out of memory.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_create_addr_space(3),
|
||||
unw_set_caching_policy(3),
|
||||
unw_flush_cache(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
Dave Watson
|
||||
.br
|
||||
Email: \fBdade.watson@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,59 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_set\_cache\_size}{Dave Watson}{Programming Library}{unw\_set\_cache\_size}unw\_set\_cache\_size -- set unwind cache size
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_set\_cache\_size}(\Type{unw\_addr\_space\_t} \Var{as}, \Type{size\_t} \Var{size}, \Type{int} \Var{flag});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_set\_cache\_size}() routine sets the cache size of
|
||||
address space \Var{as} to hold at least as many items as given by
|
||||
argument \Var{size}. It may hold more items as determined by the
|
||||
implementation. To disable caching, call
|
||||
\Func{unw\_set\_caching\_policy}) with a policy of
|
||||
\Const{UNW\_CACHE\_NONE}. Flag is currently unused and must be 0.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_set\_cache\_size}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_set\_cache\_size}() is thread-safe but \emph{not} safe
|
||||
to use from a signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_ENOMEM}] The desired cache size could not be
|
||||
established because the application is out of memory.
|
||||
\end{Description}
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_create\_addr\_space(3)},
|
||||
\SeeAlso{unw\_set\_caching\_policy(3)},
|
||||
\SeeAlso{unw\_flush\_cache(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
Dave Watson\\
|
||||
Email: \Email{dade.watson@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
@ -1,119 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Fri Dec 2 16:09:33 PST 2016
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_SET\\_CACHING\\_POLICY" "3" "02 December 2016" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_set_caching_policy
|
||||
\-\- set unwind caching policy
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_set_caching_policy(unw_addr_space_t
|
||||
as,
|
||||
unw_caching_policy_t
|
||||
policy);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_set_caching_policy()
|
||||
routine sets the caching policy
|
||||
of address space as
|
||||
to the policy specified by argument
|
||||
policy\&.
|
||||
The policy
|
||||
argument can take one of three
|
||||
possible values:
|
||||
.TP
|
||||
UNW_CACHE_NONE
|
||||
Turns off caching completely. This
|
||||
also implicitly flushes the contents of all caches as if
|
||||
unw_flush_cache()
|
||||
had been called.
|
||||
.TP
|
||||
UNW_CACHE_GLOBAL
|
||||
Enables caching using a global cache
|
||||
that is shared by all threads. If global caching is unavailable or
|
||||
unsupported, libunwind
|
||||
may fall back on using a per\-thread
|
||||
cache, as if UNW_CACHE_PER_THREAD
|
||||
had been specified.
|
||||
.TP
|
||||
UNW_CACHE_PER_THREAD
|
||||
Enables caching using
|
||||
thread\-local caches. If a thread\-local caching are unavailable or
|
||||
unsupported, libunwind
|
||||
may fall back on using a global cache,
|
||||
as if UNW_CACHE_GLOBAL
|
||||
had been specified.
|
||||
.PP
|
||||
If caching is enabled, an application must be prepared to make
|
||||
appropriate calls to unw_flush_cache()
|
||||
whenever the target
|
||||
changes in a way that could affect the validity of cached information.
|
||||
For example, after unloading (removing) a shared library,
|
||||
unw_flush_cache()
|
||||
would have to be called (at least) for the
|
||||
address\-range that was covered by the shared library.
|
||||
.PP
|
||||
For address spaces created via unw_create_addr_space(3),
|
||||
caching is turned off by default. For the local address space
|
||||
unw_local_addr_space,
|
||||
caching is turned on by default.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_set_caching_policy()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_set_caching_policy()
|
||||
is thread\-safe but \fInot\fP
|
||||
safe
|
||||
to use from a signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_ENOMEM
|
||||
The desired caching policy could not be
|
||||
established because the application is out of memory.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_create_addr_space(3),
|
||||
unw_set_cache_size(3),
|
||||
unw_flush_cache(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,81 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_set\_caching\_policy}{David Mosberger-Tang}{Programming Library}{unw\_set\_caching\_policy}unw\_set\_caching\_policy -- set unwind caching policy
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_set\_caching\_policy}(\Type{unw\_addr\_space\_t} \Var{as}, \Type{unw\_caching\_policy\_t} \Var{policy});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_set\_caching\_policy}() routine sets the caching policy
|
||||
of address space \Var{as} to the policy specified by argument
|
||||
\Var{policy}. The \Var{policy} argument can take one of three
|
||||
possible values:
|
||||
\begin{description}
|
||||
\item[\Const{UNW\_CACHE\_NONE}] Turns off caching completely. This
|
||||
also implicitly flushes the contents of all caches as if
|
||||
\Func{unw\_flush\_cache}() had been called.
|
||||
\item[\Const{UNW\_CACHE\_GLOBAL}] Enables caching using a global cache
|
||||
that is shared by all threads. If global caching is unavailable or
|
||||
unsupported, \Prog{libunwind} may fall back on using a per-thread
|
||||
cache, as if \Const{UNW\_CACHE\_PER\_THREAD} had been specified.
|
||||
\item[\Const{UNW\_CACHE\_PER\_THREAD}] Enables caching using
|
||||
thread-local caches. If a thread-local caching are unavailable or
|
||||
unsupported, \Prog{libunwind} may fall back on using a global cache,
|
||||
as if \Const{UNW\_CACHE\_GLOBAL} had been specified.
|
||||
\end{description}
|
||||
|
||||
If caching is enabled, an application must be prepared to make
|
||||
appropriate calls to \Func{unw\_flush\_cache}() whenever the target
|
||||
changes in a way that could affect the validity of cached information.
|
||||
For example, after unloading (removing) a shared library,
|
||||
\Func{unw\_flush\_cache}() would have to be called (at least) for the
|
||||
address-range that was covered by the shared library.
|
||||
|
||||
For address spaces created via \Func{unw\_create\_addr\_space}(3),
|
||||
caching is turned off by default. For the local address space
|
||||
\Func{unw\_local\_addr\_space}, caching is turned on by default.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_set\_caching\_policy}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_set\_caching\_policy}() is thread-safe but \emph{not} safe
|
||||
to use from a signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_ENOMEM}] The desired caching policy could not be
|
||||
established because the application is out of memory.
|
||||
\end{Description}
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_create\_addr\_space(3)},
|
||||
\SeeAlso{unw\_set\_cache\_size(3)},
|
||||
\SeeAlso{unw\_flush\_cache(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
117
src/third_party/unwind/dist/doc/unw_set_fpreg.man
vendored
117
src/third_party/unwind/dist/doc/unw_set_fpreg.man
vendored
@ -1,117 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_SET\\_FPREG" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_set_fpreg
|
||||
\-\- set contents of floating\-point register
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_set_fpreg(unw_cursor_t *cp,
|
||||
unw_regnum_t
|
||||
reg,
|
||||
unw_fpreg_t
|
||||
val);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_set_fpreg()
|
||||
routine sets the value of register
|
||||
reg
|
||||
in the stack frame identified by cursor cp
|
||||
to the
|
||||
value passed in val\&.
|
||||
.PP
|
||||
The register numbering is target\-dependent and described in separate
|
||||
manual pages (e.g., libunwind\-ia64(3) for the IA\-64 target).
|
||||
Furthermore, the exact set of accessible registers may depend on the
|
||||
type of frame that cp
|
||||
is referring to. For ordinary stack
|
||||
frames, it is normally possible to access only the preserved
|
||||
(``callee\-saved\&'') registers and frame\-related registers (such as the
|
||||
stack\-pointer). However, for signal frames (see
|
||||
unw_is_signal_frame(3)),
|
||||
it is usually possible to access
|
||||
all registers.
|
||||
.PP
|
||||
Note that unw_set_fpreg()
|
||||
can only write the contents of
|
||||
floating\-point registers. See unw_set_reg(3)
|
||||
for a way to
|
||||
write registers which fit in a single word.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_set_fpreg()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_set_fpreg()
|
||||
is thread\-safe as well as safe to use
|
||||
from a signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_EBADREG
|
||||
An attempt was made to write a register
|
||||
that is either invalid or not accessible in the current frame.
|
||||
.TP
|
||||
UNW_EREADONLY
|
||||
An attempt was made to write to a
|
||||
read\-only register.
|
||||
.PP
|
||||
In addition, unw_set_fpreg()
|
||||
may return any error returned by
|
||||
the access_mem(),
|
||||
access_reg(),
|
||||
and
|
||||
access_fpreg()
|
||||
call\-backs (see
|
||||
unw_create_addr_space(3)).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
libunwind\-ia64(3),
|
||||
unw_get_fpreg(3),
|
||||
unw_is_fpreg(3),
|
||||
unw_is_signal_frame(3),
|
||||
unw_set_reg(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
@ -1,79 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_set\_fpreg}{David Mosberger-Tang}{Programming Library}{unw\_set\_fpreg}unw\_set\_fpreg -- set contents of floating-point register
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_set\_fpreg}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{unw\_regnum\_t} \Var{reg}, \Type{unw\_fpreg\_t} \Var{val});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_set\_fpreg}() routine sets the value of register
|
||||
\Var{reg} in the stack frame identified by cursor \Var{cp} to the
|
||||
value passed in \Var{val}.
|
||||
|
||||
The register numbering is target-dependent and described in separate
|
||||
manual pages (e.g., libunwind-ia64(3) for the IA-64 target).
|
||||
Furthermore, the exact set of accessible registers may depend on the
|
||||
type of frame that \Var{cp} is referring to. For ordinary stack
|
||||
frames, it is normally possible to access only the preserved
|
||||
(``callee-saved'') registers and frame-related registers (such as the
|
||||
stack-pointer). However, for signal frames (see
|
||||
\Func{unw\_is\_signal\_frame}(3)), it is usually possible to access
|
||||
all registers.
|
||||
|
||||
Note that \Func{unw\_set\_fpreg}() can only write the contents of
|
||||
floating-point registers. See \Func{unw\_set\_reg}(3) for a way to
|
||||
write registers which fit in a single word.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_set\_fpreg}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_set\_fpreg}() is thread-safe as well as safe to use
|
||||
from a signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_EBADREG}] An attempt was made to write a register
|
||||
that is either invalid or not accessible in the current frame.
|
||||
\item[\Const{UNW\_EREADONLY}] An attempt was made to write to a
|
||||
read-only register.
|
||||
\end{Description}
|
||||
In addition, \Func{unw\_set\_fpreg}() may return any error returned by
|
||||
the \Func{access\_mem}(), \Func{access\_reg}(), and
|
||||
\Func{access\_fpreg}() call-backs (see
|
||||
\Func{unw\_create\_addr\_space}(3)).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{libunwind-ia64(3)},
|
||||
\SeeAlso{unw\_get\_fpreg(3)},
|
||||
\SeeAlso{unw\_is\_fpreg(3)},
|
||||
\SeeAlso{unw\_is\_signal\_frame(3)},
|
||||
\SeeAlso{unw\_set\_reg(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
117
src/third_party/unwind/dist/doc/unw_set_reg.man
vendored
117
src/third_party/unwind/dist/doc/unw_set_reg.man
vendored
@ -1,117 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_SET\\_REG" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_set_reg
|
||||
\-\- set register contents
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_set_reg(unw_cursor_t *cp,
|
||||
unw_regnum_t
|
||||
reg,
|
||||
unw_word_t
|
||||
val);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_set_reg()
|
||||
routine sets the value of register
|
||||
reg
|
||||
in the stack frame identified by cursor cp
|
||||
to the
|
||||
value passed in val\&.
|
||||
.PP
|
||||
The register numbering is target\-dependent and described in separate
|
||||
manual pages (e.g., libunwind\-ia64(3) for the IA\-64 target).
|
||||
Furthermore, the exact set of accessible registers may depend on the
|
||||
type of frame that cp
|
||||
is referring to. For ordinary stack
|
||||
frames, it is normally possible to access only the preserved
|
||||
(``callee\-saved\&'') registers and frame\-related registers (such as the
|
||||
stack\-pointer). However, for signal frames (see
|
||||
unw_is_signal_frame(3)),
|
||||
it is usually possible to access
|
||||
all registers.
|
||||
.PP
|
||||
Note that unw_set_reg()
|
||||
can only write the contents of
|
||||
registers whose values fit in a single word. See
|
||||
unw_set_fpreg(3)
|
||||
for a way to write registers which do not
|
||||
fit this constraint.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_set_reg()
|
||||
returns 0.
|
||||
Otherwise the negative value of one of the error\-codes below is
|
||||
returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_set_reg()
|
||||
is thread\-safe as well as safe to use
|
||||
from a signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_EBADREG
|
||||
An attempt was made to write a register
|
||||
that is either invalid or not accessible in the current frame.
|
||||
.TP
|
||||
UNW_EREADONLY
|
||||
An attempt was made to write to a
|
||||
read\-only register.
|
||||
.PP
|
||||
In addition, unw_set_reg()
|
||||
may return any error returned by
|
||||
the access_mem(),
|
||||
access_reg(),
|
||||
and
|
||||
access_fpreg()
|
||||
call\-backs (see
|
||||
unw_create_addr_space(3)).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
libunwind\-ia64(3),
|
||||
unw_get_reg(3),
|
||||
unw_is_signal_frame(3),
|
||||
unw_set_fpreg(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
79
src/third_party/unwind/dist/doc/unw_set_reg.tex
vendored
79
src/third_party/unwind/dist/doc/unw_set_reg.tex
vendored
@ -1,79 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_set\_reg}{David Mosberger-Tang}{Programming Library}{unw\_set\_reg}unw\_set\_reg -- set register contents
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_set\_reg}(\Type{unw\_cursor\_t~*}\Var{cp}, \Type{unw\_regnum\_t} \Var{reg}, \Type{unw\_word\_t} \Var{val});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_set\_reg}() routine sets the value of register
|
||||
\Var{reg} in the stack frame identified by cursor \Var{cp} to the
|
||||
value passed in \Var{val}.
|
||||
|
||||
The register numbering is target-dependent and described in separate
|
||||
manual pages (e.g., libunwind-ia64(3) for the IA-64 target).
|
||||
Furthermore, the exact set of accessible registers may depend on the
|
||||
type of frame that \Var{cp} is referring to. For ordinary stack
|
||||
frames, it is normally possible to access only the preserved
|
||||
(``callee-saved'') registers and frame-related registers (such as the
|
||||
stack-pointer). However, for signal frames (see
|
||||
\Func{unw\_is\_signal\_frame}(3)), it is usually possible to access
|
||||
all registers.
|
||||
|
||||
Note that \Func{unw\_set\_reg}() can only write the contents of
|
||||
registers whose values fit in a single word. See
|
||||
\Func{unw\_set\_fpreg}(3) for a way to write registers which do not
|
||||
fit this constraint.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_set\_reg}() returns 0.
|
||||
Otherwise the negative value of one of the error-codes below is
|
||||
returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_set\_reg}() is thread-safe as well as safe to use
|
||||
from a signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_EBADREG}] An attempt was made to write a register
|
||||
that is either invalid or not accessible in the current frame.
|
||||
\item[\Const{UNW\_EREADONLY}] An attempt was made to write to a
|
||||
read-only register.
|
||||
\end{Description}
|
||||
In addition, \Func{unw\_set\_reg}() may return any error returned by
|
||||
the \Func{access\_mem}(), \Func{access\_reg}(), and
|
||||
\Func{access\_fpreg}() call-backs (see
|
||||
\Func{unw\_create\_addr\_space}(3)).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{libunwind-ia64(3)},
|
||||
\SeeAlso{unw\_get\_reg(3)},
|
||||
\SeeAlso{unw\_is\_signal\_frame(3)},
|
||||
\SeeAlso{unw\_set\_fpreg(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
106
src/third_party/unwind/dist/doc/unw_step.man
vendored
106
src/third_party/unwind/dist/doc/unw_step.man
vendored
@ -1,106 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_STEP" "3" "16 August 2007" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_step
|
||||
\-\- advance to next stack frame
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
int
|
||||
unw_step(unw_cursor_t *cp);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_step()
|
||||
routine advances the unwind cursor cp
|
||||
to
|
||||
the next older, less deeply nested stack frame.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
On successful completion, unw_step()
|
||||
returns a positive value
|
||||
if the updated cursor refers to a valid stack frame, or 0 if the
|
||||
previous stack frame was the last frame in the chain. On error, the
|
||||
negative value of one of the error\-codes below is returned.
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_step()
|
||||
is thread\-safe. If cursor cp
|
||||
is in the local
|
||||
address\-space, this routine is also safe to use from a signal handler.
|
||||
.PP
|
||||
.SH ERRORS
|
||||
|
||||
.PP
|
||||
.TP
|
||||
UNW_EUNSPEC
|
||||
An unspecified error occurred.
|
||||
.TP
|
||||
UNW_ENOINFO
|
||||
Libunwind
|
||||
was unable to locate the
|
||||
unwind\-info needed to complete the operation.
|
||||
.TP
|
||||
UNW_EBADVERSION
|
||||
The unwind\-info needed to complete the
|
||||
operation has a version or a format that is not understood by
|
||||
libunwind\&.
|
||||
.TP
|
||||
UNW_EINVALIDIP
|
||||
The instruction\-pointer
|
||||
(``program\-counter\&'') of the next stack frame is invalid (e.g., not
|
||||
properly aligned).
|
||||
.TP
|
||||
UNW_EBADFRAME
|
||||
The next stack frame is invalid.
|
||||
.TP
|
||||
UNW_ESTOPUNWIND
|
||||
Returned if a call to
|
||||
find_proc_info()
|
||||
returned \-UNW_ESTOPUNWIND\&.
|
||||
.PP
|
||||
In addition, unw_step()
|
||||
may return any error returned by the
|
||||
find_proc_info(),
|
||||
get_dyn_info_list_addr(),
|
||||
access_mem(),
|
||||
access_reg(),
|
||||
or access_fpreg()
|
||||
call\-backs (see unw_create_addr_space(3)).
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
|
||||
.PP
|
||||
libunwind(3),
|
||||
unw_create_addr_space(3)
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
David Mosberger\-Tang
|
||||
.br
|
||||
Email: \fBdmosberger@gmail.com\fP
|
||||
.br
|
||||
WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
68
src/third_party/unwind/dist/doc/unw_step.tex
vendored
68
src/third_party/unwind/dist/doc/unw_step.tex
vendored
@ -1,68 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_step}{David Mosberger-Tang}{Programming Library}{unw\_step}unw\_step -- advance to next stack frame
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{int} \Func{unw\_step}(\Type{unw\_cursor\_t~*}\Var{cp});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_step}() routine advances the unwind cursor \Var{cp} to
|
||||
the next older, less deeply nested stack frame.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
On successful completion, \Func{unw\_step}() returns a positive value
|
||||
if the updated cursor refers to a valid stack frame, or 0 if the
|
||||
previous stack frame was the last frame in the chain. On error, the
|
||||
negative value of one of the error-codes below is returned.
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_step}() is thread-safe. If cursor \Var{cp} is in the local
|
||||
address-space, this routine is also safe to use from a signal handler.
|
||||
|
||||
\section{Errors}
|
||||
|
||||
\begin{Description}
|
||||
\item[\Const{UNW\_EUNSPEC}] An unspecified error occurred.
|
||||
\item[\Const{UNW\_ENOINFO}] \Prog{Libunwind} was unable to locate the
|
||||
unwind-info needed to complete the operation.
|
||||
\item[\Const{UNW\_EBADVERSION}] The unwind-info needed to complete the
|
||||
operation has a version or a format that is not understood by
|
||||
\Prog{libunwind}.
|
||||
\item[\Const{UNW\_EINVALIDIP}] The instruction-pointer
|
||||
(``program-counter'') of the next stack frame is invalid (e.g., not
|
||||
properly aligned).
|
||||
\item[\Const{UNW\_EBADFRAME}] The next stack frame is invalid.
|
||||
\item[\Const{UNW\_ESTOPUNWIND}] Returned if a call to
|
||||
\Func{find\_proc\_info}() returned -\Const{UNW\_ESTOPUNWIND}.
|
||||
\end{Description}
|
||||
In addition, \Func{unw\_step}() may return any error returned by the
|
||||
\Func{find\_proc\_info}(), \Func{get\_dyn\_info\_list\_addr}(),
|
||||
\Func{access\_mem}(), \Func{access\_reg}(), or \Func{access\_fpreg}()
|
||||
call-backs (see \Func{unw\_create\_addr\_space}(3)).
|
||||
|
||||
\section{See Also}
|
||||
|
||||
\SeeAlso{libunwind(3)},
|
||||
\SeeAlso{unw\_create\_addr\_space(3)}
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
David Mosberger-Tang\\
|
||||
Email: \Email{dmosberger@gmail.com}\\
|
||||
WWW: \URL{http://www.nongnu.org/libunwind/}.
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
63
src/third_party/unwind/dist/doc/unw_strerror.man
vendored
63
src/third_party/unwind/dist/doc/unw_strerror.man
vendored
@ -1,63 +0,0 @@
|
||||
'\" t
|
||||
.\" Manual page created with latex2man on Wed Aug 18 16:51:29 CEST 2004
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "UNW\\_STRERROR" "3" "18 August 2004" "Programming Library " "Programming Library "
|
||||
.SH NAME
|
||||
unw_strerror
|
||||
\-\- get text corresponding to error code
|
||||
.PP
|
||||
.SH SYNOPSIS
|
||||
|
||||
.PP
|
||||
#include <libunwind.h>
|
||||
.br
|
||||
.PP
|
||||
const char *
|
||||
unw_strerror(int
|
||||
err_code);
|
||||
.br
|
||||
.PP
|
||||
.SH DESCRIPTION
|
||||
|
||||
.PP
|
||||
The unw_strerror()
|
||||
routine maps the (negative) err_code
|
||||
to a corresponding text message and returns it.
|
||||
.PP
|
||||
.SH RETURN VALUE
|
||||
|
||||
.PP
|
||||
The message that corresponds to err_code
|
||||
or, if the
|
||||
err_code
|
||||
has no corresponding message, the text "invalid error
|
||||
code".
|
||||
.PP
|
||||
.SH THREAD AND SIGNAL SAFETY
|
||||
|
||||
.PP
|
||||
unw_strerror()
|
||||
is thread\-safe as well as safe to use
|
||||
from a signal handler.
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
|
||||
.PP
|
||||
Thomas Hallgren
|
||||
.br
|
||||
BEA Systems
|
||||
.br
|
||||
Stockholm, Sweden
|
||||
.br
|
||||
Email: \fBthallgre@bea.com\fP
|
||||
.br
|
||||
.\" NOTE: This file is generated, DO NOT EDIT.
|
||||
42
src/third_party/unwind/dist/doc/unw_strerror.tex
vendored
42
src/third_party/unwind/dist/doc/unw_strerror.tex
vendored
@ -1,42 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage[fancyhdr,pdf]{latex2man}
|
||||
|
||||
\input{common.tex}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{Name}{3}{unw\_strerror}{Thomas Hallgren}{Programming Library}{unw\_strerror}unw\_strerror -- get text corresponding to error code
|
||||
\end{Name}
|
||||
|
||||
\section{Synopsis}
|
||||
|
||||
\File{\#include $<$libunwind.h$>$}\\
|
||||
|
||||
\Type{const char *} \Func{unw\_strerror}(\Type{int} \Var{err\_code});\\
|
||||
|
||||
\section{Description}
|
||||
|
||||
The \Func{unw\_strerror}() routine maps the (negative) \Var{err\_code}
|
||||
to a corresponding text message and returns it.
|
||||
|
||||
\section{Return Value}
|
||||
|
||||
The message that corresponds to \Var{err\_code} or, if the
|
||||
\Var{err\_code} has no corresponding message, the text "invalid error
|
||||
code".
|
||||
|
||||
\section{Thread and Signal Safety}
|
||||
|
||||
\Func{unw\_strerror}() is thread-safe as well as safe to use
|
||||
from a signal handler.
|
||||
|
||||
\section{Author}
|
||||
|
||||
\noindent
|
||||
Thomas Hallgren\\
|
||||
BEA Systems\\
|
||||
Stockholm, Sweden\\
|
||||
Email: \Email{thallgre@bea.com}\\
|
||||
\LatexManEnd
|
||||
|
||||
\end{document}
|
||||
10
src/third_party/unwind/dist/include/compiler.h
vendored
10
src/third_party/unwind/dist/include/compiler.h
vendored
@ -31,6 +31,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
#define COMPILER_H
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) (0)
|
||||
#endif
|
||||
# define CONST_ATTR __attribute__((__const__))
|
||||
# define UNUSED __attribute__((unused))
|
||||
# define NOINLINE __attribute__((noinline))
|
||||
@ -40,9 +43,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
# if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
|
||||
# define ALWAYS_INLINE inline __attribute__((always_inline))
|
||||
# define HIDDEN __attribute__((visibility ("hidden")))
|
||||
# if __has_attribute(fallthrough)
|
||||
# define FALLTHROUGH __attribute__((fallthrough))
|
||||
# else
|
||||
# define FALLTHROUGH
|
||||
# endif
|
||||
# else
|
||||
# define ALWAYS_INLINE
|
||||
# define HIDDEN
|
||||
# define FALLTHROUGH
|
||||
# endif
|
||||
# define WEAK __attribute__((weak))
|
||||
# if (__GNUC__ >= 3)
|
||||
@ -60,6 +69,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
# define NORETURN
|
||||
# define ALIAS(name)
|
||||
# define HIDDEN
|
||||
# define FALLTHROUGH
|
||||
# define WEAK
|
||||
# define likely(x) (x)
|
||||
# define unlikely(x) (x)
|
||||
|
||||
28
src/third_party/unwind/dist/include/config.h.in
vendored
28
src/third_party/unwind/dist/include/config.h.in
vendored
@ -21,6 +21,9 @@
|
||||
/* Define to 1 if you have the <asm/ptrace_offsets.h> header file. */
|
||||
#undef HAVE_ASM_PTRACE_OFFSETS_H
|
||||
|
||||
/* Define to 1 if you have the <asm/vsyscall.h> header file. */
|
||||
#undef HAVE_ASM_VSYSCALL_H
|
||||
|
||||
/* Define to 1 if you have the <byteswap.h> header file. */
|
||||
#undef HAVE_BYTESWAP_H
|
||||
|
||||
@ -92,6 +95,9 @@
|
||||
/* Define to 1 if you have the `dl_phdr_removals_counter' function. */
|
||||
#undef HAVE_DL_PHDR_REMOVALS_COUNTER
|
||||
|
||||
/* Define to 1 if the system has the type `elf_fpregset_t'. */
|
||||
#undef HAVE_ELF_FPREGSET_T
|
||||
|
||||
/* Define to 1 if you have the <elf.h> header file. */
|
||||
#undef HAVE_ELF_H
|
||||
|
||||
@ -101,6 +107,9 @@
|
||||
/* Define to 1 if you have the <execinfo.h> header file. */
|
||||
#undef HAVE_EXECINFO_H
|
||||
|
||||
/* Define to 1 if you have the `execvpe' function. */
|
||||
#undef HAVE_EXECVPE
|
||||
|
||||
/* Define to 1 if you have the `getunwind' function. */
|
||||
#undef HAVE_GETUNWIND
|
||||
|
||||
@ -110,30 +119,33 @@
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `uca' library (-luca). */
|
||||
#undef HAVE_LIBUCA
|
||||
|
||||
/* Define to 1 if you have the <link.h> header file. */
|
||||
#undef HAVE_LINK_H
|
||||
|
||||
/* Define if you have liblzma */
|
||||
#undef HAVE_LZMA
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `mincore' function. */
|
||||
#undef HAVE_MINCORE
|
||||
|
||||
/* Define to 1 if you have the `pipe2' function. */
|
||||
#undef HAVE_PIPE2
|
||||
|
||||
/* Define to 1 if the system has the type `procfs_status'. */
|
||||
#undef HAVE_PROCFS_STATUS
|
||||
|
||||
/* Define to 1 if you have the `sigaltstack' function. */
|
||||
#undef HAVE_SIGALTSTACK
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#undef HAVE_SIGNAL_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
@ -227,7 +239,9 @@
|
||||
/* The size of `off_t', as computed by sizeof. */
|
||||
#undef SIZEOF_OFF_T
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
|
||||
6
src/third_party/unwind/dist/include/dwarf.h
vendored
6
src/third_party/unwind/dist/include/dwarf.h
vendored
@ -32,12 +32,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
struct dwarf_cursor; /* forward-declaration */
|
||||
struct elf_dyn_info;
|
||||
|
||||
#include "dwarf-config.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "dwarf-config.h"
|
||||
|
||||
#ifndef UNW_REMOTE_ONLY
|
||||
#if defined(HAVE_LINK_H)
|
||||
#include <link.h>
|
||||
@ -422,7 +422,7 @@ extern int dwarf_search_unwind_table (unw_addr_space_t as,
|
||||
int need_unwind_info, void *arg);
|
||||
|
||||
extern int dwarf_find_unwind_table (struct elf_dyn_info *edi, unw_addr_space_t as,
|
||||
char *path, unw_word_t segbase, unw_word_t mapoff,
|
||||
const char *path, unw_word_t segbase, unw_word_t mapoff,
|
||||
unw_word_t ip);
|
||||
extern void dwarf_put_unwind_info (unw_addr_space_t as,
|
||||
unw_proc_info_t *pi, void *arg);
|
||||
|
||||
34
src/third_party/unwind/dist/include/dwarf_i.h
vendored
34
src/third_party/unwind/dist/include/dwarf_i.h
vendored
@ -43,8 +43,8 @@ typedef union __attribute__ ((packed))
|
||||
dwarf_misaligned_value_t;
|
||||
|
||||
static inline int
|
||||
dwarf_reads8 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
int8_t *val, void *arg)
|
||||
dwarf_reads8 (unw_addr_space_t as UNUSED, unw_accessors_t *a UNUSED, unw_word_t *addr,
|
||||
int8_t *val, void *arg UNUSED)
|
||||
{
|
||||
dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
|
||||
|
||||
@ -54,8 +54,8 @@ dwarf_reads8 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
}
|
||||
|
||||
static inline int
|
||||
dwarf_reads16 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
int16_t *val, void *arg)
|
||||
dwarf_reads16 (unw_addr_space_t as UNUSED, unw_accessors_t *a UNUSED, unw_word_t *addr,
|
||||
int16_t *val, void *arg UNUSED)
|
||||
{
|
||||
dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
|
||||
|
||||
@ -65,8 +65,8 @@ dwarf_reads16 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
}
|
||||
|
||||
static inline int
|
||||
dwarf_reads32 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
int32_t *val, void *arg)
|
||||
dwarf_reads32 (unw_addr_space_t as UNUSED, unw_accessors_t *a UNUSED, unw_word_t *addr,
|
||||
int32_t *val, void *arg UNUSED)
|
||||
{
|
||||
dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
|
||||
|
||||
@ -76,8 +76,8 @@ dwarf_reads32 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
}
|
||||
|
||||
static inline int
|
||||
dwarf_reads64 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
int64_t *val, void *arg)
|
||||
dwarf_reads64 (unw_addr_space_t as UNUSED, unw_accessors_t *a UNUSED, unw_word_t *addr,
|
||||
int64_t *val, void *arg UNUSED)
|
||||
{
|
||||
dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
|
||||
|
||||
@ -87,8 +87,8 @@ dwarf_reads64 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
}
|
||||
|
||||
static inline int
|
||||
dwarf_readu8 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
uint8_t *val, void *arg)
|
||||
dwarf_readu8 (unw_addr_space_t as UNUSED, unw_accessors_t *a UNUSED, unw_word_t *addr,
|
||||
uint8_t *val, void *arg UNUSED)
|
||||
{
|
||||
dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
|
||||
|
||||
@ -98,8 +98,8 @@ dwarf_readu8 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
}
|
||||
|
||||
static inline int
|
||||
dwarf_readu16 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
uint16_t *val, void *arg)
|
||||
dwarf_readu16 (unw_addr_space_t as UNUSED, unw_accessors_t *a UNUSED, unw_word_t *addr,
|
||||
uint16_t *val, void *arg UNUSED)
|
||||
{
|
||||
dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
|
||||
|
||||
@ -109,8 +109,8 @@ dwarf_readu16 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
}
|
||||
|
||||
static inline int
|
||||
dwarf_readu32 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
uint32_t *val, void *arg)
|
||||
dwarf_readu32 (unw_addr_space_t as UNUSED, unw_accessors_t *a UNUSED, unw_word_t *addr,
|
||||
uint32_t *val, void *arg UNUSED)
|
||||
{
|
||||
dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
|
||||
|
||||
@ -120,8 +120,8 @@ dwarf_readu32 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
}
|
||||
|
||||
static inline int
|
||||
dwarf_readu64 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
uint64_t *val, void *arg)
|
||||
dwarf_readu64 (unw_addr_space_t as UNUSED, unw_accessors_t *a UNUSED, unw_word_t *addr,
|
||||
uint64_t *val, void *arg UNUSED)
|
||||
{
|
||||
dwarf_misaligned_value_t *mvp = (void *) (uintptr_t) *addr;
|
||||
|
||||
@ -136,7 +136,7 @@ static inline int
|
||||
dwarf_readu8 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
|
||||
uint8_t *valp, void *arg)
|
||||
{
|
||||
unw_word_t val, aligned_addr = *addr & -sizeof (unw_word_t);
|
||||
unw_word_t val, aligned_addr = *addr & (~sizeof (unw_word_t) + 1);
|
||||
unw_word_t off = *addr - aligned_addr;
|
||||
int ret;
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
Copyright (C) 2001-2004 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
Copyright (C) 2013 Linaro Limited
|
||||
Copyright 2022 Blackberry Limited
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
@ -35,6 +36,7 @@ extern "C" {
|
||||
#include <stddef.h>
|
||||
#include <ucontext.h>
|
||||
#include <stdalign.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef UNW_EMPTY_STRUCT
|
||||
# define UNW_EMPTY_STRUCT uint8_t unused;
|
||||
@ -62,6 +64,8 @@ typedef int64_t unw_sword_t;
|
||||
|
||||
typedef long double unw_tdep_fpreg_t;
|
||||
|
||||
#define UNW_WORD_MAX UINT64_MAX
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no aarch64-specific auxiliary proc-info */
|
||||
@ -119,6 +123,12 @@ typedef enum
|
||||
UNW_AARCH64_PC,
|
||||
UNW_AARCH64_PSTATE,
|
||||
|
||||
/* Pseudo-register */
|
||||
UNW_AARCH64_RA_SIGN_STATE = 34,
|
||||
|
||||
/* SVE Vector Granule pseudo register */
|
||||
UNW_AARCH64_VG = 46,
|
||||
|
||||
/* 128-bit FP/Advanced SIMD registers. */
|
||||
UNW_AARCH64_V0 = 64,
|
||||
UNW_AARCH64_V1,
|
||||
@ -164,7 +174,7 @@ typedef enum
|
||||
|
||||
UNW_TDEP_IP = UNW_AARCH64_X30,
|
||||
UNW_TDEP_SP = UNW_AARCH64_SP,
|
||||
UNW_TDEP_EH = UNW_AARCH64_X0,
|
||||
UNW_TDEP_EH = UNW_AARCH64_X0
|
||||
|
||||
}
|
||||
aarch64_regnum_t;
|
||||
@ -228,9 +238,17 @@ typedef ucontext_t unw_tdep_context_t;
|
||||
#include "libunwind-common.h"
|
||||
#include "libunwind-dynamic.h"
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
# define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.mc_gpregs.gp_x;
|
||||
#elif defined(__QNX__)
|
||||
# define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.cpu.gpr;
|
||||
#else
|
||||
# define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.regs;
|
||||
#endif
|
||||
|
||||
#define unw_tdep_getcontext(uc) ({ \
|
||||
unw_tdep_context_t *unw_ctx = (uc); \
|
||||
register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.regs; \
|
||||
UNW_BASE \
|
||||
__asm__ __volatile__ ( \
|
||||
"stp x0, x1, [%[base], #0]\n" \
|
||||
"stp x2, x3, [%[base], #16]\n" \
|
||||
@ -239,7 +257,7 @@ typedef ucontext_t unw_tdep_context_t;
|
||||
"stp x8, x9, [%[base], #64]\n" \
|
||||
"stp x10, x11, [%[base], #80]\n" \
|
||||
"stp x12, x13, [%[base], #96]\n" \
|
||||
"stp x14, x13, [%[base], #112]\n" \
|
||||
"stp x14, x15, [%[base], #112]\n" \
|
||||
"stp x16, x17, [%[base], #128]\n" \
|
||||
"stp x18, x19, [%[base], #144]\n" \
|
||||
"stp x20, x21, [%[base], #160]\n" \
|
||||
|
||||
@ -31,6 +31,7 @@ extern "C" {
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef UNW_EMPTY_STRUCT
|
||||
# define UNW_EMPTY_STRUCT uint8_t unused;
|
||||
@ -46,7 +47,7 @@ extern "C" {
|
||||
require recompiling all users of this library. Stack allocation is
|
||||
relatively cheap and unwind-state copying is relatively rare, so we
|
||||
want to err on making it rather too big than too small. */
|
||||
|
||||
|
||||
/* FIXME for ARM. Too big? What do other things use for similar tasks? */
|
||||
#define UNW_TDEP_CURSOR_LEN 4096
|
||||
|
||||
@ -55,6 +56,8 @@ typedef int32_t unw_sword_t;
|
||||
|
||||
typedef long double unw_tdep_fpreg_t;
|
||||
|
||||
#define UNW_WORD_MAX UINT32_MAX
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_ARM_R0,
|
||||
@ -73,7 +76,7 @@ typedef enum
|
||||
UNW_ARM_R13,
|
||||
UNW_ARM_R14,
|
||||
UNW_ARM_R15,
|
||||
|
||||
|
||||
/* VFPv2 s0-s31 (obsolescent numberings). */
|
||||
UNW_ARM_S0 = 64,
|
||||
UNW_ARM_S1,
|
||||
@ -107,7 +110,7 @@ typedef enum
|
||||
UNW_ARM_S29,
|
||||
UNW_ARM_S30,
|
||||
UNW_ARM_S31,
|
||||
|
||||
|
||||
/* FPA register numberings. */
|
||||
UNW_ARM_F0 = 96,
|
||||
UNW_ARM_F1,
|
||||
@ -117,7 +120,7 @@ typedef enum
|
||||
UNW_ARM_F5,
|
||||
UNW_ARM_F6,
|
||||
UNW_ARM_F7,
|
||||
|
||||
|
||||
/* iWMMXt GR register numberings. */
|
||||
UNW_ARM_wCGR0 = 104,
|
||||
UNW_ARM_wCGR1,
|
||||
@ -127,7 +130,7 @@ typedef enum
|
||||
UNW_ARM_wCGR5,
|
||||
UNW_ARM_wCGR6,
|
||||
UNW_ARM_wCGR7,
|
||||
|
||||
|
||||
/* iWMMXt register numberings. */
|
||||
UNW_ARM_wR0 = 112,
|
||||
UNW_ARM_wR1,
|
||||
@ -145,9 +148,9 @@ typedef enum
|
||||
UNW_ARM_wR13,
|
||||
UNW_ARM_wR14,
|
||||
UNW_ARM_wR15,
|
||||
|
||||
|
||||
/* Two-byte encodings from here on. */
|
||||
|
||||
|
||||
/* SPSR. */
|
||||
UNW_ARM_SPSR = 128,
|
||||
UNW_ARM_SPSR_FIQ,
|
||||
@ -155,7 +158,7 @@ typedef enum
|
||||
UNW_ARM_SPSR_ABT,
|
||||
UNW_ARM_SPSR_UND,
|
||||
UNW_ARM_SPSR_SVC,
|
||||
|
||||
|
||||
/* User mode registers. */
|
||||
UNW_ARM_R8_USR = 144,
|
||||
UNW_ARM_R9_USR,
|
||||
@ -164,7 +167,7 @@ typedef enum
|
||||
UNW_ARM_R12_USR,
|
||||
UNW_ARM_R13_USR,
|
||||
UNW_ARM_R14_USR,
|
||||
|
||||
|
||||
/* FIQ registers. */
|
||||
UNW_ARM_R8_FIQ = 151,
|
||||
UNW_ARM_R9_FIQ,
|
||||
@ -173,23 +176,23 @@ typedef enum
|
||||
UNW_ARM_R12_FIQ,
|
||||
UNW_ARM_R13_FIQ,
|
||||
UNW_ARM_R14_FIQ,
|
||||
|
||||
|
||||
/* IRQ registers. */
|
||||
UNW_ARM_R13_IRQ = 158,
|
||||
UNW_ARM_R14_IRQ,
|
||||
|
||||
|
||||
/* ABT registers. */
|
||||
UNW_ARM_R13_ABT = 160,
|
||||
UNW_ARM_R14_ABT,
|
||||
|
||||
|
||||
/* UND registers. */
|
||||
UNW_ARM_R13_UND = 162,
|
||||
UNW_ARM_R14_UND,
|
||||
|
||||
|
||||
/* SVC registers. */
|
||||
UNW_ARM_R13_SVC = 164,
|
||||
UNW_ARM_R14_SVC,
|
||||
|
||||
|
||||
/* iWMMXt control registers. */
|
||||
UNW_ARM_wC0 = 192,
|
||||
UNW_ARM_wC1,
|
||||
@ -261,6 +264,7 @@ unw_tdep_save_loc_t;
|
||||
typedef struct unw_tdep_context
|
||||
{
|
||||
unsigned long regs[16];
|
||||
unsigned long long fpregs[16];
|
||||
}
|
||||
unw_tdep_context_t;
|
||||
|
||||
@ -268,37 +272,45 @@ unw_tdep_context_t;
|
||||
may be sufficient for all libunwind use cases.
|
||||
In thumb mode, we return directly back to thumb mode on return (with bx), to
|
||||
avoid altering any registers after unw_resume. */
|
||||
|
||||
#ifdef __SOFTFP__
|
||||
#define VSTMIA "nop\n\t" /* align return address to value stored by stmia */
|
||||
#else
|
||||
#define VSTMIA "vstmia %[base], {d0-d15}\n\t" /* this also aligns return address to value stored by stmia */
|
||||
#endif
|
||||
|
||||
#ifndef __thumb__
|
||||
#define unw_tdep_getcontext(uc) ({ \
|
||||
unw_tdep_context_t *unw_ctx = (uc); \
|
||||
register unsigned long *r0 __asm__ ("r0"); \
|
||||
unsigned long *unw_base = unw_ctx->regs; \
|
||||
__asm__ __volatile__ ( \
|
||||
"mov r0, #0\n" \
|
||||
"stmia %[base], {r0-r15}\n" \
|
||||
"nop\n" /* align return address to value stored by stmia */ \
|
||||
: [r0] "=r" (r0) : [base] "r" (unw_base) : "memory"); \
|
||||
#define unw_tdep_getcontext(uc) ({ \
|
||||
unw_tdep_context_t *unw_ctx = (uc); \
|
||||
register unsigned long *r0 __asm__ ("r0"); \
|
||||
register unsigned long *unw_base __asm__ ("r1") = unw_ctx->regs; \
|
||||
__asm__ __volatile__ ( \
|
||||
"mov r0, #0\n\t" \
|
||||
"stmia %[base]!, {r0-r15}\n\t" \
|
||||
VSTMIA \
|
||||
: [r0] "=r" (r0) : [base] "r" (unw_base) : "memory"); \
|
||||
(int)r0; })
|
||||
#else /* __thumb__ */
|
||||
#define unw_tdep_getcontext(uc) ({ \
|
||||
unw_tdep_context_t *unw_ctx = (uc); \
|
||||
register unsigned long *r0 __asm__ ("r0"); \
|
||||
unsigned long *unw_base = unw_ctx->regs; \
|
||||
__asm__ __volatile__ ( \
|
||||
".align 2\n" \
|
||||
"bx pc\n" \
|
||||
"nop\n" \
|
||||
".code 32\n" \
|
||||
"mov r0, #0\n" \
|
||||
"stmia %[base], {r0-r14}\n" \
|
||||
"adr r0, ret%=+1\n" \
|
||||
"str r0, [%[base], #60]\n" \
|
||||
"orr r0, pc, #1\n" \
|
||||
"bx r0\n" \
|
||||
".code 16\n" \
|
||||
"mov r0, #0\n" \
|
||||
"ret%=:\n" \
|
||||
: [r0] "=r" (r0) : [base] "r" (unw_base) : "memory", "cc"); \
|
||||
#define unw_tdep_getcontext(uc) ({ \
|
||||
unw_tdep_context_t *unw_ctx = (uc); \
|
||||
register unsigned long *r0 __asm__ ("r0"); \
|
||||
register unsigned long *unw_base __asm__ ("r1") = unw_ctx->regs; \
|
||||
__asm__ __volatile__ ( \
|
||||
".align 2\n\t" \
|
||||
"bx pc\n\t" \
|
||||
"nop\n\t" \
|
||||
".code 32\n\t" \
|
||||
"mov r0, #0\n\t" \
|
||||
"stmia %[base]!, {r0-r14}\n\t" \
|
||||
"adr r0, ret%=+1\n\t" \
|
||||
"stmia %[base]!, {r0}\n\t" \
|
||||
VSTMIA \
|
||||
"orr r0, pc, #1\n\t" \
|
||||
"bx r0\n\t" \
|
||||
".code 16\n\t" \
|
||||
"mov r0, #0\n\t" \
|
||||
"ret%=:\n" \
|
||||
: [r0] "=r" (r0), [base] "+r" (unw_base) : : "memory", "cc"); \
|
||||
(int)r0; })
|
||||
#endif
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ unw_caching_policy_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_INIT_SIGNAL_FRAME = 1, /* We know this is a signal frame */
|
||||
UNW_INIT_SIGNAL_FRAME = 1 /* We know this is a signal frame */
|
||||
}
|
||||
unw_init_local2_flags_t;
|
||||
|
||||
@ -207,6 +207,36 @@ typedef struct unw_accessors
|
||||
NULL. */
|
||||
int (*get_proc_name) (unw_addr_space_t, unw_word_t, char *, size_t,
|
||||
unw_word_t *, void *);
|
||||
|
||||
/* Optional call back to obtain the name of a elf file where the ip belongs to.
|
||||
This callback is optional and may be set to NULL. */
|
||||
int (*get_elf_filename) (unw_addr_space_t, unw_word_t, char *, size_t,
|
||||
unw_word_t *, void *);
|
||||
|
||||
/* Optional call back to obtain the start and end ip of a procedure.
|
||||
* procedure ip range is [start, end), the range is without end.
|
||||
* This callback is optional and may be set to NULL.
|
||||
*/
|
||||
int (*get_proc_ip_range) (unw_addr_space_t, unw_word_t, unw_word_t *,
|
||||
unw_word_t *, void *);
|
||||
|
||||
/* Optional call back to return a mask to be used with pointer
|
||||
* authentication on arm64.
|
||||
*
|
||||
* The on bits in the returned mask indicate which bits in a return address
|
||||
* are part of a pointer authentication code. These are the bits in the
|
||||
* return address to turn off so that the calling frame can be found
|
||||
* for the unwinding to continue.
|
||||
*
|
||||
* The return value must be host-endian. e.g. if the target is big-endian
|
||||
* and the host is little endian, the implementation of this function
|
||||
* must byte swap.
|
||||
*
|
||||
* This callback is optional and may be set to NULL. In this case all
|
||||
* the bits in the return address are used, as if no masking were done.
|
||||
*/
|
||||
unw_word_t (*ptrauth_insn_mask) (unw_addr_space_t, void *);
|
||||
|
||||
}
|
||||
unw_accessors_t;
|
||||
|
||||
@ -231,34 +261,43 @@ typedef struct unw_save_loc
|
||||
}
|
||||
unw_save_loc_t;
|
||||
|
||||
struct dl_phdr_info;
|
||||
typedef int (*unw_iterate_phdr_callback_t) (struct dl_phdr_info *, size_t, void *);
|
||||
typedef int (*unw_iterate_phdr_func_t) (unw_iterate_phdr_callback_t, void *);
|
||||
|
||||
/* These routines work both for local and remote unwinding. */
|
||||
|
||||
#define unw_local_addr_space UNW_OBJ(local_addr_space)
|
||||
#define unw_create_addr_space UNW_OBJ(create_addr_space)
|
||||
#define unw_destroy_addr_space UNW_OBJ(destroy_addr_space)
|
||||
#define unw_get_accessors UNW_ARCH_OBJ(get_accessors)
|
||||
#define unw_get_accessors_int UNW_ARCH_OBJ(get_accessors_int)
|
||||
#define unw_init_local UNW_OBJ(init_local)
|
||||
#define unw_init_local2 UNW_OBJ(init_local2)
|
||||
#define unw_init_remote UNW_OBJ(init_remote)
|
||||
#define unw_step UNW_OBJ(step)
|
||||
#define unw_resume UNW_OBJ(resume)
|
||||
#define unw_get_proc_info UNW_OBJ(get_proc_info)
|
||||
#define unw_get_proc_info_by_ip UNW_OBJ(get_proc_info_by_ip)
|
||||
#define unw_reg_states_iterate UNW_OBJ(reg_states_iterate)
|
||||
#define unw_apply_reg_state UNW_OBJ(apply_reg_state)
|
||||
#define unw_get_reg UNW_OBJ(get_reg)
|
||||
#define unw_set_reg UNW_OBJ(set_reg)
|
||||
#define unw_get_fpreg UNW_OBJ(get_fpreg)
|
||||
#define unw_set_fpreg UNW_OBJ(set_fpreg)
|
||||
#define unw_get_save_loc UNW_OBJ(get_save_loc)
|
||||
#define unw_is_signal_frame UNW_OBJ(is_signal_frame)
|
||||
#define unw_get_proc_name UNW_OBJ(get_proc_name)
|
||||
#define unw_set_caching_policy UNW_OBJ(set_caching_policy)
|
||||
#define unw_set_cache_size UNW_OBJ(set_cache_size)
|
||||
#define unw_regname UNW_ARCH_OBJ(regname)
|
||||
#define unw_flush_cache UNW_ARCH_OBJ(flush_cache)
|
||||
#define unw_strerror UNW_ARCH_OBJ(strerror)
|
||||
#define unw_local_addr_space UNW_OBJ(local_addr_space)
|
||||
#define unw_create_addr_space UNW_OBJ(create_addr_space)
|
||||
#define unw_destroy_addr_space UNW_OBJ(destroy_addr_space)
|
||||
#define unw_get_accessors UNW_ARCH_OBJ(get_accessors)
|
||||
#define unw_get_accessors_int UNW_ARCH_OBJ(get_accessors_int)
|
||||
#define unw_init_local UNW_OBJ(init_local)
|
||||
#define unw_init_local2 UNW_OBJ(init_local2)
|
||||
#define unw_init_remote UNW_OBJ(init_remote)
|
||||
#define unw_step UNW_OBJ(step)
|
||||
#define unw_resume UNW_OBJ(resume)
|
||||
#define unw_get_proc_info UNW_OBJ(get_proc_info)
|
||||
#define unw_get_proc_info_by_ip UNW_OBJ(get_proc_info_by_ip)
|
||||
#define unw_get_proc_info_in_range UNW_OBJ(get_proc_info_in_range)
|
||||
#define unw_reg_states_iterate UNW_OBJ(reg_states_iterate)
|
||||
#define unw_apply_reg_state UNW_OBJ(apply_reg_state)
|
||||
#define unw_get_reg UNW_OBJ(get_reg)
|
||||
#define unw_set_reg UNW_OBJ(set_reg)
|
||||
#define unw_get_fpreg UNW_OBJ(get_fpreg)
|
||||
#define unw_set_fpreg UNW_OBJ(set_fpreg)
|
||||
#define unw_get_save_loc UNW_OBJ(get_save_loc)
|
||||
#define unw_is_signal_frame UNW_OBJ(is_signal_frame)
|
||||
#define unw_get_proc_name UNW_OBJ(get_proc_name)
|
||||
#define unw_get_proc_name_by_ip UNW_OBJ(get_proc_name_by_ip)
|
||||
#define unw_get_elf_filename UNW_OBJ(get_elf_filename)
|
||||
#define unw_get_elf_filename_by_ip UNW_OBJ(get_elf_filename_by_ip)
|
||||
#define unw_set_caching_policy UNW_OBJ(set_caching_policy)
|
||||
#define unw_set_cache_size UNW_OBJ(set_cache_size)
|
||||
#define unw_set_iterate_phdr_function UNW_OBJ(set_iterate_phdr_function)
|
||||
#define unw_regname UNW_ARCH_OBJ(regname)
|
||||
#define unw_flush_cache UNW_ARCH_OBJ(flush_cache)
|
||||
#define unw_strerror UNW_ARCH_OBJ(strerror)
|
||||
|
||||
extern unw_addr_space_t unw_create_addr_space (unw_accessors_t *, int);
|
||||
extern void unw_destroy_addr_space (unw_addr_space_t);
|
||||
@ -267,6 +306,7 @@ extern unw_accessors_t *unw_get_accessors_int (unw_addr_space_t);
|
||||
extern void unw_flush_cache (unw_addr_space_t, unw_word_t, unw_word_t);
|
||||
extern int unw_set_caching_policy (unw_addr_space_t, unw_caching_policy_t);
|
||||
extern int unw_set_cache_size (unw_addr_space_t, size_t, int);
|
||||
extern void unw_set_iterate_phdr_function (unw_addr_space_t, unw_iterate_phdr_func_t);
|
||||
extern const char *unw_regname (unw_regnum_t);
|
||||
|
||||
extern int unw_init_local (unw_cursor_t *, unw_context_t *);
|
||||
@ -277,6 +317,12 @@ extern int unw_resume (unw_cursor_t *);
|
||||
extern int unw_get_proc_info (unw_cursor_t *, unw_proc_info_t *);
|
||||
extern int unw_get_proc_info_by_ip (unw_addr_space_t, unw_word_t,
|
||||
unw_proc_info_t *, void *);
|
||||
extern int unw_get_proc_info_in_range (unw_word_t, unw_word_t,
|
||||
unw_word_t, unw_word_t,
|
||||
unw_word_t, unw_word_t,
|
||||
unw_addr_space_t, unw_word_t,
|
||||
unw_proc_info_t *, int,
|
||||
void *);
|
||||
extern int unw_reg_states_iterate (unw_cursor_t *, unw_reg_states_callback, void *);
|
||||
extern int unw_apply_reg_state (unw_cursor_t *, void *);
|
||||
extern int unw_get_reg (unw_cursor_t *, int, unw_word_t *);
|
||||
@ -286,7 +332,13 @@ extern int unw_set_fpreg (unw_cursor_t *, int, unw_fpreg_t);
|
||||
extern int unw_get_save_loc (unw_cursor_t *, int, unw_save_loc_t *);
|
||||
extern int unw_is_signal_frame (unw_cursor_t *);
|
||||
extern int unw_get_proc_name (unw_cursor_t *, char *, size_t, unw_word_t *);
|
||||
extern int unw_get_proc_name_by_ip (unw_addr_space_t, unw_word_t, char *,
|
||||
size_t, unw_word_t *, void *);
|
||||
extern int unw_get_elf_filename (unw_cursor_t *, char *, size_t, unw_word_t *);
|
||||
extern int unw_get_elf_filename_by_ip (unw_addr_space_t, unw_word_t, char *,
|
||||
size_t, unw_word_t *, void *);
|
||||
extern const char *unw_strerror (int);
|
||||
extern int unw_backtrace (void **, int);
|
||||
extern int unw_backtrace2 (void **, int, unw_context_t*, int);
|
||||
|
||||
extern unw_addr_space_t unw_local_addr_space;
|
||||
|
||||
@ -62,6 +62,8 @@ extern int _UCD_access_fpreg (unw_addr_space_t, unw_regnum_t, unw_fpreg_t *,
|
||||
int, void *);
|
||||
extern int _UCD_get_proc_name (unw_addr_space_t, unw_word_t, char *, size_t,
|
||||
unw_word_t *, void *);
|
||||
extern int _UCD_get_elf_filename (unw_addr_space_t, unw_word_t, char *, size_t,
|
||||
unw_word_t *, void *);
|
||||
extern int _UCD_resume (unw_addr_space_t, unw_cursor_t *, void *);
|
||||
extern unw_accessors_t _UCD_accessors;
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ typedef enum
|
||||
UNW_INFO_FORMAT_TABLE, /* unw_dyn_table_t */
|
||||
UNW_INFO_FORMAT_REMOTE_TABLE, /* unw_dyn_remote_table_t */
|
||||
UNW_INFO_FORMAT_ARM_EXIDX, /* ARM specific unwind info */
|
||||
UNW_INFO_FORMAT_IP_OFFSET, /* Like UNW_INFO_FORMAT_REMOTE_TABLE, but
|
||||
UNW_INFO_FORMAT_IP_OFFSET /* Like UNW_INFO_FORMAT_REMOTE_TABLE, but
|
||||
table entries are considered
|
||||
relative to di->start_ip, rather
|
||||
than di->segbase */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user