18dffb485Schristos /* The ptid_t type and common functions operating on it. 28dffb485Schristos 3*5ba1f45fSchristos Copyright (C) 1986-2024 Free Software Foundation, Inc. 48dffb485Schristos 58dffb485Schristos This file is part of GDB. 68dffb485Schristos 78dffb485Schristos This program is free software; you can redistribute it and/or modify 88dffb485Schristos it under the terms of the GNU General Public License as published by 98dffb485Schristos the Free Software Foundation; either version 3 of the License, or 108dffb485Schristos (at your option) any later version. 118dffb485Schristos 128dffb485Schristos This program is distributed in the hope that it will be useful, 138dffb485Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 148dffb485Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 158dffb485Schristos GNU General Public License for more details. 168dffb485Schristos 178dffb485Schristos You should have received a copy of the GNU General Public License 188dffb485Schristos along with this program. If not, see <http://www.gnu.org/licenses/>. */ 198dffb485Schristos 208dffb485Schristos #include "ptid.h" 214b169a6bSchristos #include "print-utils.h" 228dffb485Schristos 238dffb485Schristos /* See ptid.h for these. */ 248dffb485Schristos 258dffb485Schristos ptid_t const null_ptid = ptid_t::make_null (); 268dffb485Schristos ptid_t const minus_one_ptid = ptid_t::make_minus_one (); 274b169a6bSchristos 284b169a6bSchristos /* See ptid.h. */ 294b169a6bSchristos 304b169a6bSchristos std::string 314b169a6bSchristos ptid_t::to_string () const 324b169a6bSchristos { 334b169a6bSchristos return string_printf ("%d.%ld.%s", m_pid, m_lwp, pulongest (m_tid)); 344b169a6bSchristos } 35