From: Tom Tromey Date: Mon, 4 Mar 2019 19:05:47 +0000 (-0700) Subject: Make null_ptid and minus_one_ptid "const" X-Git-Tag: binutils-2_33~1880 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17547186c25aa96d078a6ff9d61a55880fa009f4;p=external%2Fbinutils.git Make null_ptid and minus_one_ptid "const" This makes null_ptid and minus_one_ptid "const". I think this is an improvement because it means they can't be accidentally modified. 2019-03-12 Tom Tromey * common/ptid.c (null_ptid, minus_one_ptid): Now const. * common/ptid.h (null_ptid, minus_one_ptid): Now const. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5e9beb9..e6903f2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2019-03-12 Tom Tromey + * common/ptid.c (null_ptid, minus_one_ptid): Now const. + * common/ptid.h (null_ptid, minus_one_ptid): Now const. + +2019-03-12 Tom Tromey + * linux-nat.c (iterate_over_lwps): Update. (stop_callback): Remove parameter. (stop_wait_callback, detach_callback, resume_set_callback) diff --git a/gdb/common/ptid.c b/gdb/common/ptid.c index 93f853a..c025511 100644 --- a/gdb/common/ptid.c +++ b/gdb/common/ptid.c @@ -22,5 +22,5 @@ /* See ptid.h for these. */ -ptid_t null_ptid = ptid_t::make_null (); -ptid_t minus_one_ptid = ptid_t::make_minus_one (); +ptid_t const null_ptid = ptid_t::make_null (); +ptid_t const minus_one_ptid = ptid_t::make_minus_one (); diff --git a/gdb/common/ptid.h b/gdb/common/ptid.h index 31440c8..f5625a6 100644 --- a/gdb/common/ptid.h +++ b/gdb/common/ptid.h @@ -145,11 +145,11 @@ private: /* The null or zero ptid, often used to indicate no process. */ -extern ptid_t null_ptid; +extern const ptid_t null_ptid; /* The (-1,0,0) ptid, often used to indicate either an error condition or a "don't care" condition, i.e, "run all threads." */ -extern ptid_t minus_one_ptid; +extern const ptid_t minus_one_ptid; #endif /* COMMON_PTID_H */