This forum has been archived. Please start a new discussion on GitHub.

Exception stack traces on freebsd

edited September 2017 in Help Center

Is there a specific reason, why exception stack traces are disabled on freebsd? cpp/src/IceUtil/Exception.cpp:32 disables these when __FreeBSD__ is defined. From a quick glance at the system (FreeBSD 10.3) it seems, that backtrace() as well as backtrace_symbols() are available.

I'm currently compiling ice 3.6.3 without the !defined(__FreeBSD__) and will test what happens.



  • bernard
    bernard Jupiter, FL
    edited September 2017

    Hi Constantin,

    We currently don't build or test Ice on FreeBSD, but we accept pull requests for FreeBSD and other platforms we don't support. If you want to add support for exception stack traces, please submit a pull request! This pull request should be preferably for the branch you're patching (3.6 or 3.7).

    If you are interested in exception stack traces (a top Ice feature :wink:), we actually improved them for Ice 3.7, with support for libbacktrace (with some compilers):

    And if you want to stay with Ice 3.6 for now, you should upgrade to the just released Ice 3.6.4.

    All the best,

  • crunge
    edited September 2017

    Hi Bernard,

    thanks for the answer. From a quick round of patching and testing it looks like stacktraces for Ice 3.6 work completely fine on FreeBSD 10.0 and onwards. Then the port just requires the additional dependency devel/libexecinfo.
    As I changed the goal I want to achieve a bit, I do not need the stacktraces 'urgently' anymore, so I did not dig deeper.

    libbacktrace support sounds awesome though. Makes stack traces more portable and easier maintainable. Great change.

    Best regards,