Debugging a Program With dbx

-lwp lid

The event is executed only if the thread that caused it matches lid.