Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 2006 12:22:24 +0530
From:      "Vaidehi Shukla" <vaidehi.shukla@gmail.com>
To:        freebsd-threads <freebsd-threads@freebsd.org>
Subject:   Debugging threaded application
Message-ID:  <90242b1f0612042252p25ccca99i54a19d0f288e826c@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

Here I've written following gdb macro:

define thbt
info threads
set $_count=1
while ( $_count < 3 )
thread $_count
bt
set $_count++
end
end
document thbt
Display backtrack of all the threads
end


'thread  $_count' command returns error:
(gdb) thread $_count
Thread ID 0 not known.  Use the "info threads" command to
see the IDs of currently known threads.

Means 'thread' command doesn't understand shell variable. Other commands
like 'print' works properly with shell variable.

I'm using '4.18' gdb version.

Let me know if anybody has some idea why it's not working and how to make it
correct.

Regards,
Vaidehi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90242b1f0612042252p25ccca99i54a19d0f288e826c>