I noticed that null_ptid and minus_one_ptid should probably be const, to avoid accidental assignments. This mostly went fine, except some calls to iterate_over_lwps would have had to cast away const in order to work. To avoid this, I changed this function to accept a gdb::function_view. Regression tested by the buildbot. Tom