mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
selftest/gdb_backtrace: avoid printing backtrace twice with 1 thread
We call 'thread apply all bt full' in case there are interesting things going on in other threads, but often there are no other threads and it only serves to repeat the original trace (and very slowly, for some reason). The $_inferior_thread_count convenience variable is new in gdb 13.1 (2022-ish) so we init-if-undefined it to default to the old behaviour. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
904479cdf6
commit
12ce289922
@ -132,7 +132,10 @@ gdb)
|
||||
cat <<EOF >${BATCHFILE_MAIN}
|
||||
set height 0
|
||||
bt full
|
||||
thread apply all bt full
|
||||
init-if-undefined \$_inferior_thread_count = 0
|
||||
if \$_inferior_thread_count != 1
|
||||
thread apply all bt full
|
||||
end
|
||||
info locals
|
||||
if PyList_New
|
||||
echo \\n### Python traceback\\n\\n
|
||||
|
Loading…
Reference in New Issue
Block a user