From a12bf0f12e1a694b1b645ab95dceeb359caeb497 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Sat, 24 Apr 2010 23:10:30 +0200 Subject: [PATCH] Use lwps cmd in dbx and no threads as it seems to give some strange side effects e.g. doesn't work and lwps seems to always work. So lwps it is then. --- bacula/scripts/btraceback.dbx | 39 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/bacula/scripts/btraceback.dbx b/bacula/scripts/btraceback.dbx index 679334a68d..8c7fe860ed 100644 --- a/bacula/scripts/btraceback.dbx +++ b/bacula/scripts/btraceback.dbx @@ -12,38 +12,37 @@ echo "distver ==> \c"; print -l (char *)distver echo "dist_name ==> \c"; print -l (char *)dist_name echo "beef ==> \c"; print -l (int)beef -echo "******** RUNNING THREADS:" +echo "******** RUNNING THREADS/LWPS:" echo -threads +lwps echo echo -echo "******** STACK TRACE OF CURRENT THREAD:" +echo "******** STACK TRACE OF CURRENT THREAD/LWP:" echo where echo echo -echo "******** VARIABLES DUMP OF CURRENT THREAD:" +echo "******** VARIABLES DUMP OF CURRENT THREAD/LWP:" echo dump -for THREAD in $(threads | sh sed -e 's/.*@//' -e 's/ .*//'); do - ( - if thread t@$THREAD; then - echo - echo - echo "******** STACK TRACE OF THREAD ${THREAD}:" - echo - where +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 - echo "******** VARIABLES DUMP OF THREAD ${THREAD}:" - echo - dump - - fi - ) + echo + echo "******** VARIABLES DUMP OF THREAD/LWP ${LWP}:" + echo + dump + echo "******************************************" + fi +) done quit -- 2.39.5