# btraceback.dbx

dbxenv language_mode c++

echo "exename ==> \c"; print -l (char *)exename
echo "exepath ==> \c"; print -l (char *)exepath
echo "catalog_db ==> \c"; print -l (char *)catalog_db
echo "version ==> \c"; print -l (char *)version

echo "******** RUNNING THREADS/LWPS:"
echo
lwps

echo
echo
echo "******** STACK TRACE OF CURRENT THREAD/LWP:"
echo
where

echo
echo
echo "******** VARIABLES DUMP OF CURRENT THREAD/LWP:"
echo
dump

for LWP in $(lwps | sh sed -e 's/.*@//' -e 's/ .*//'); do
(
   if lwp l@$LWP; then
      echo "******************************************"
      echo
      echo "******** STACK TRACE OF THREAD/LWP ${LWP}:"
      echo
      where

      echo
      echo "******** VARIABLES DUMP OF THREAD/LWP ${LWP}:"
      echo
      dump
      echo "******************************************"
   fi
)
done
quit
