This is the mail archive of the gdb@sources.redhat.com 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: thread debugging problem


> But GDB isn't loading it :-(  If it was (with a current [native] GDB) 
> you would see a message indicating it had been loaded.
> 
> Suggest checking that your gdb includes thread-db.o:thread_db_load, set
> 
> a breakpoint on that and see what happens.

I've switched to redhat9 and now I get thread info, but I'm having other
problems instead. Strange behaviour which I believe shouldn't happen.
When I step forward in the code it seems to be running into somekind of loop
running the same lines of code several times when it shouldn't, as you can see
in the gdb session below. This is with gdb 5.3.91 but I saw the same behaviour
with 5.3 on my gentoo box at home.

Any thoughts ?

Breakpoint 3, monitor_thread_main (arg=0x0) at monitor.c:481
481         if(prio->first)
(gdb) print prio->first
$10 = (struct listitem_t *) 0x805a7f8
(gdb) print prio->first->data
$11 = (void *) 0x8059be8
(gdb) n
480                     next_probe.tv_sec += cfg_getint(cfg, "probe-interval");
(gdb)
481         if(prio->first)
(gdb)
480                     next_probe.tv_sec += cfg_getint(cfg, "probe-interval");
(gdb)
481         if(prio->first)
(gdb) list 480
475                      * the time for the next probe session, otherwise wait a
                                                                           nd go
476                      * on with the next probe session.
477                      */
478
479                     gettimeofday(&next_probe, 0);
480                     next_probe.tv_sec += cfg_getint(cfg, "probe-interval");
481         if(prio->first)
482           logmsg(LOG_ERR, "Ja: %d", timercmp(&((userdata_t*)prio->first->dat
                                                                          
a)->tv, &next_probe, <=));
483                     while(prio->first && timercmp(&((userdata_t*)prio->first
                                                                          
->data)->tv, &next_probe, <=))
484                     {
(gdb)


/Andreas


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