[0/2] constify null_ptid and minus_one_ptid

Message ID 20190304202516.19100-1-tromey@adacore.com
Headers show
Series
  • constify null_ptid and minus_one_ptid
Related show

Message

Tom Tromey March 4, 2019, 8:25 p.m.
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

Comments

Tom Tromey March 12, 2019, 4:46 p.m. | #1
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:


Tom> I noticed that null_ptid and minus_one_ptid should probably be const,
Tom> to avoid accidental assignments.

I'm checking this in now.

I found some similar constants in remote.c which I will try to fix shortly.

Tom