Lines 358-368
Link Here
|
358 |
|
358 |
|
359 |
/* Set the process wide mask saying which events we're interested in. */ |
359 |
/* Set the process wide mask saying which events we're interested in. */ |
360 |
td_event_emptyset (&events); |
360 |
td_event_emptyset (&events); |
361 |
|
361 |
td_event_addset (&events, TD_CREATE); |
362 |
/* XXX PR ports/162093 |
362 |
td_event_addset (&events, TD_DEATH); |
363 |
* td_event_addset (&events, TD_CREATE); |
|
|
364 |
* td_event_addset (&events, TD_DEATH); |
365 |
*/ |
366 |
|
363 |
|
367 |
err = td_ta_set_event_p (thread_agent, &events); |
364 |
err = td_ta_set_event_p (thread_agent, &events); |
368 |
if (err != TD_OK) |
365 |
if (err != TD_OK) |
Lines 377-383
Link Here
|
377 |
td_create_bp_addr = 0; |
374 |
td_create_bp_addr = 0; |
378 |
td_death_bp_addr = 0; |
375 |
td_death_bp_addr = 0; |
379 |
|
376 |
|
380 |
#if 0 |
|
|
381 |
/* Set up the thread creation event. */ |
377 |
/* Set up the thread creation event. */ |
382 |
err = enable_thread_event (thread_agent, TD_CREATE, &td_create_bp_addr); |
378 |
err = enable_thread_event (thread_agent, TD_CREATE, &td_create_bp_addr); |
383 |
if (err != TD_OK) |
379 |
if (err != TD_OK) |
Lines 395-401
Link Here
|
395 |
thread_db_err_str (err)); |
391 |
thread_db_err_str (err)); |
396 |
return; |
392 |
return; |
397 |
} |
393 |
} |
398 |
#endif |
|
|
399 |
} |
394 |
} |
400 |
|
395 |
|
401 |
static void |
396 |
static void |
Lines 738-748
Link Here
|
738 |
if (ourstatus->value.sig == TARGET_SIGNAL_TRAP) |
733 |
if (ourstatus->value.sig == TARGET_SIGNAL_TRAP) |
739 |
check_event(ret); |
734 |
check_event(ret); |
740 |
/* this is a hack, if an event won't cause gdb to stop, for example, |
735 |
/* this is a hack, if an event won't cause gdb to stop, for example, |
741 |
SIGARLM, gdb resumes the process immediatly without setting |
736 |
SIGALRM, gdb resumes the process immediatly without setting |
742 |
inferior_ptid to the new thread returned here, this is a bug |
737 |
inferior_ptid to the new thread returned here, this is a bug |
743 |
because inferior_ptid may already not exist there, and passing |
738 |
because inferior_ptid may already not exist there, and passing |
744 |
a none existing thread to fbsd_thread_resume causes error. */ |
739 |
a non-existing thread to fbsd_thread_resume causes error. However, |
745 |
if (!fbsd_thread_alive (ops, inferior_ptid)) |
740 |
if the exiting thread is the currently selected thread, |
|
|
741 |
then that is handled later in handle_inferior_event(), and we must |
742 |
not delete the currently selected thread. |
743 |
*/ |
744 |
if (!fbsd_thread_alive (ops, inferior_ptid) && !ptid_equal(inferior_ptid, ret)) |
746 |
{ |
745 |
{ |
747 |
delete_thread (inferior_ptid); |
746 |
delete_thread (inferior_ptid); |
748 |
inferior_ptid = ret; |
747 |
inferior_ptid = ret; |