aboutsummaryrefslogtreecommitdiff
path: root/tests/backtrace/testscript
blob: 206e1a53f44d16020f005f8a24040e6bedbfcfe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# file      : tests/backtrace/testscript
# license   : MIT; see accompanying LICENSE file

tclass = $cxx.target.class
tsys   = $cxx.target.system

: basic
:
if ($tclass == 'linux' || $tclass == 'macos' || $tsys == 'freebsd')
{
  # The stack frame line format varies among OSes. The only common thing is
  # the '0x' function address prefix.
  #
  $* 2>>~%EOE%
    %.*
    %.*0x.*%
    %.*
    EOE
}
else
{
  # On OSes where backtrace() is not supported we just check that setting the
  # terminate handler doesn't change the way a process terminates on the
  # unhandled exception (see driver.cxx for details).
  #
  $* -q
}