This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/2] Create inferior fro trace file target


On 02/05/2014 12:15 PM, Yao Qi wrote:
>> > We've moved in the direction of "always a thread" a while ago,
> What is "always a thread"?  Can you elaborate?

"info threads" used to come out empty until a second thread
showed up.

Here's 6.8 debugging a single-threaded program:

 (gdb) info threads
 (gdb) info program
         Using the running image of child process 12775.
 Program stopped at 0x4004cf.
 It stopped at a breakpoint that has since been deleted.
 (gdb)

vs 7.0/current mainline:

 (gdb) info threads
   Id   Target Id         Frame
 * 1    process 12748 "main" main (argc=1, argv=0x7fffffffdb18) at main.c:5
 (gdb)

Basically, GDB nowadays models non-threaded programs as single-threaded
programs.  Thus "always a(t least one) thread".

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]