{"id":29038258,"url":"https://github.com/frida/libunwind","last_synced_at":"2025-09-06T00:38:39.529Z","repository":{"id":55993773,"uuid":"32894772","full_name":"frida/libunwind","owner":"frida","description":"Frida uses libunwind for generating backtraces on some platforms","archived":false,"fork":false,"pushed_at":"2024-06-22T21:21:12.000Z","size":4576,"stargazers_count":17,"open_issues_count":0,"forks_count":13,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-08-30T06:34:22.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frida.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-03-25T22:31:28.000Z","updated_at":"2024-07-31T21:20:31.000Z","dependencies_parsed_at":"2025-06-26T13:48:19.138Z","dependency_job_id":null,"html_url":"https://github.com/frida/libunwind","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/frida/libunwind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frida%2Flibunwind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frida%2Flibunwind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frida%2Flibunwind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frida%2Flibunwind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frida","download_url":"https://codeload.github.com/frida/libunwind/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frida%2Flibunwind/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273842836,"owners_count":25177920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-26T13:37:11.858Z","updated_at":"2025-09-06T00:38:39.496Z","avatar_url":"https://github.com/frida.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libunwind\n\n[![Build Status](https://travis-ci.org/libunwind/libunwind.svg?branch=master)](https://travis-ci.org/libunwind/libunwind)\n\nThis library supports several architecture/operating-system combinations:\n\n| System  | Architecture | Status |\n| :------ | :----------- | :----- |\n| Linux   | x86-64       | ✓      |\n| Linux   | x86          | ✓      |\n| Linux   | ARM          | ✓      |\n| Linux   | AArch64      | ✓      |\n| Linux   | PPC32        | ✓      |\n| Linux   | PPC64        | ✓      |\n| Linux   | SuperH       | ✓      |\n| Linux   | IA-64        | ✓      |\n| Linux   | PARISC       | Works well, but C library missing unwind-info |\n| Linux   | Tilegx       | 64-bit mode only |\n| Linux   | MIPS         | Newly added |\n| Linux   | RISC-V       | 64-bit only |\n| Linux   | LoongArch    | 64-bit only |\n| HP-UX   | IA-64        | Mostly works, but known to have serious limitations |\n| FreeBSD | x86-64       | ✓      |\n| FreeBSD | x86          | ✓      |\n| FreeBSD | AArch64      | ✓      |\n| Solaris | x86-64       | ✓      |\n\n## Libc Requirements\n\nlibunwind depends on getcontext(), setcontext() functions which are missing\nfrom C libraries like musl-libc because they are considered to be \"obsolescent\"\nAPI by POSIX document.  The following table tries to track current status of\nsuch dependencies\n\n - r, requires\n - p, provides its own implementation\n - empty, no requirement\n\n| Architecture | getcontext | setcontext |\n|--------------|------------|------------|\n|    aarch64   |     p      |            |\n|    arm       |     p      |            |\n|    hppa      |     p      |      p     |\n|    ia64      |     p      |      r     |\n|    loongarch |     p      |            |\n|    mips      |     p      |            |\n|    ppc32     |     r      |            |\n|    ppc64     |     r      |      r     |\n|    riscv     |     p      |      p     |\n|    s390x     |     p      |      p     |\n|    sh        |     r      |            |\n|    tilegx    |     r      |      r     |\n|    x86       |     p      |      r     |\n|    x86_64    |     p      |      p     |\n\n## General Build Instructions\n\nIn general, this library can be built and installed with the following\ncommands:\n\n    $ autoreconf -i # Needed only for building from git. Depends on libtool.\n    $ ./configure\n    $ make\n    $ make install prefix=PREFIX\n\nwhere `PREFIX` is the installation prefix.  By default, a prefix of\n`/usr/local` is used, such that `libunwind.a` is installed in\n`/usr/local/lib` and `unwind.h` is installed in `/usr/local/include`.  For\ntesting, you may want to use a prefix of `/usr/local` instead.\n\n\n### Building with Intel compiler\n\n#### Version 8 and later\n\nStarting with version 8, the preferred name for the IA-64 Intel\ncompiler is `icc` (same name as on x86).  Thus, the configure-line\nshould look like this:\n\n    $ ./configure CC=icc CFLAGS=\"-g -O3 -ip\" CXX=icc CCAS=gcc CCASFLAGS=-g \\\n        LDFLAGS=\"-L$PWD/src/.libs\"\n\n\n### Building on HP-UX\n\nFor the time being, libunwind must be built with GCC on HP-UX.\n\nlibunwind should be configured and installed on HP-UX like this:\n\n    $ ./configure CFLAGS=\"-g -O2 -mlp64\" CXXFLAGS=\"-g -O2 -mlp64\"\n\nCaveat: Unwinding of 32-bit (ILP32) binaries is not supported at the moment.\n\n### Workaround for older versions of GCC\n\nGCC v3.0 and GCC v3.2 ship with a bad version of `sys/types.h`.  The\nworkaround is to issue the following commands before running\n`configure`:\n\n    $ mkdir $top_dir/include/sys\n    $ cp /usr/include/sys/types.h $top_dir/include/sys\n\nGCC v3.3.2 or later have been fixed and do not require this\nworkaround.\n\n### Building for PowerPC64 / Linux\n\nFor building for power64 you should use:\n\n    $ ./configure CFLAGS=\"-g -O2 -m64\" CXXFLAGS=\"-g -O2 -m64\"\n\nIf your power support altivec registers:\n\n    $ ./configure CFLAGS=\"-g -O2 -m64 -maltivec\" CXXFLAGS=\"-g -O2 -m64 -maltivec\"\n\nTo check if your processor has support for vector registers (altivec):\n\n    cat /proc/cpuinfo | grep altivec\n\nand should have something like this:\n\n    cpu             : PPC970, altivec supported\n\nIf libunwind seems to not work (backtracing failing), try to compile\nit with `-O0`, without optimizations. There are some compiler problems\ndepending on the version of your gcc.\n\n### Building on FreeBSD\n\nGeneral building instructions apply. To build and execute several tests\non older versions of FreeBSD, you need libexecinfo library available in\nports as devel/libexecinfo. This port has been removed as of 2017 and is\nindeed no longer needed.\n\n## Regression Testing\n\nAfter building the library, you can run a set of regression tests with:\n\n    $ make check\n\n### Expected results on IA-64 Linux\n\nUnless you have a very recent C library and compiler installed, it is\ncurrently expected to have the following tests fail on IA-64 Linux:\n\n* `Gtest-init` (should pass starting with glibc-2.3.x/gcc-3.4)\n* `Ltest-init` (should pass starting with glibc-2.3.x/gcc-3.4)\n* `test-ptrace` (should pass starting with glibc-2.3.x/gcc-3.4)\n* `run-ia64-test-dyn1` (should pass starting with glibc-2.3.x)\n\nThis does not mean that libunwind cannot be used with older compilers\nor C libraries, it just means that for certain corner cases, unwinding\nwill fail.  Since they're corner cases, it is not likely for\napplications to trigger them.\n\nNote: If you get lots of errors in `Gia64-test-nat` and `Lia64-test-nat`, it's\nalmost certainly a sign of an old assembler.  The GNU assembler used\nto encode previous-stack-pointer-relative offsets incorrectly.\nThis bug was fixed on 21-Sep-2004 so any later assembler will be\nfine.\n\n### Expected results on x86 Linux\n\nThe following tests are expected to fail on x86 Linux:\n\n* `test-ptrace`\n\n### Expected results on x86-64 Linux\n\nThe following tests are expected to fail on x86-64 Linux:\n\n* `run-ptrace-misc` (see \u003chttp://gcc.gnu.org/bugzilla/show_bug.cgi?id=18748\u003e\n  and \u003chttp://gcc.gnu.org/bugzilla/show_bug.cgi?id=18749\u003e)\n\n### Expected results on PARISC Linux\n\nCaveat: GCC v3.4 or newer is needed on PA-RISC Linux.  Earlier\nversions of the compiler failed to generate the exception-handling\nprogram header (`GNU_EH_FRAME`) needed for unwinding.\n\nThe following tests are expected to fail on x86-64 Linux:\n\n* `Gtest-bt` (backtrace truncated at `kill()` due to lack of unwind-info)\n* `Ltest-bt` (likewise)\n* `Gtest-resume-sig` (`Gresume.c:my_rt_sigreturn()` is wrong somehow)\n* `Ltest-resume-sig` (likewise)\n* `Gtest-init` (likewise)\n* `Ltest-init` (likewise)\n* `Gtest-dyn1` (no dynamic unwind info support yet)\n* `Ltest-dyn1` (no dynamic unwind info support yet)\n* `test-setjmp` (`longjmp()` not implemented yet)\n* `run-check-namespace` (toolchain doesn't support `HIDDEN` yet)\n\n### Expected results on HP-UX\n\n`make check` is currently unsupported for HP-UX.  You can try to run\nit, but most tests will fail (and some may fail to terminate).  The\nonly test programs that are known to work at this time are:\n\n* `tests/bt`\n* `tests/Gperf-simple`\n* `tests/test-proc-info`\n* `tests/test-static-link`\n* `tests/Gtest-init`\n* `tests/Ltest-init`\n* `tests/Gtest-resume-sig`\n* `tests/Ltest-resume-sig`\n\n### Expected results on PPC64 Linux\n\n`make check` should run with no more than 10 out of 24 tests failed.\n\n### Expected results on Solaris x86-64\n\n`make check` is passing 27 out of 33 tests. The following six tests are consistently\nfailing:\n\n* `Gtest-concurrent`\n* `Ltest-concurrent`\n* `Ltest-init-local-signal`\n* `Lrs-race`\n* `test-setjmp`\n* `x64-unwind-badjmp-signal-frame`\n\n## Performance Testing\n\nThis distribution includes a few simple performance tests which give\nsome idea of the basic cost of various libunwind operations.  After\nbuilding the library, you can run these tests with the following\ncommands:\n\n    $ cd tests\n    $ make perf\n\n## Contacting the Developers\n\nPlease direct all questions regarding this library to \u003clibunwind-devel@nongnu.org\u003e.\n\nYou can do this by sending an email to \u003clibunwind-request@nongnu.org\u003e with\na body of \"subscribe libunwind-devel\", or you can subscribe and manage your\nsubscription via the web-interface at \u003chttps://savannah.nongnu.org/mail/?group=libunwind\u003e.\n\nYou can also interact on our GitHub page: \u003chttps://github.com/libunwind/libunwind\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrida%2Flibunwind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrida%2Flibunwind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrida%2Flibunwind/lists"}