1*cb63e24eSchristos /* Copyright (C) 2021-2024 Free Software Foundation, Inc. 24f645668Schristos Contributed by Oracle. 34f645668Schristos 44f645668Schristos This file is part of GNU Binutils. 54f645668Schristos 64f645668Schristos This program is free software; you can redistribute it and/or modify 74f645668Schristos it under the terms of the GNU General Public License as published by 84f645668Schristos the Free Software Foundation; either version 3, or (at your option) 94f645668Schristos any later version. 104f645668Schristos 114f645668Schristos This program is distributed in the hope that it will be useful, 124f645668Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 134f645668Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 144f645668Schristos GNU General Public License for more details. 154f645668Schristos 164f645668Schristos You should have received a copy of the GNU General Public License 174f645668Schristos along with this program; if not, write to the Free Software 184f645668Schristos Foundation, 51 Franklin Street - Fifth Floor, Boston, 194f645668Schristos MA 02110-1301, USA. */ 204f645668Schristos 214f645668Schristos #ifndef _COMPCOM_H 224f645668Schristos #define _COMPCOM_H 234f645668Schristos 244f645668Schristos #include <sys/types.h> 254f645668Schristos #include "comp_com.h" 264f645668Schristos 274f645668Schristos class Elf; 284f645668Schristos typedef int (*CheckSrcName) (char *); 294f645668Schristos 304f645668Schristos class CompComment 314f645668Schristos { 324f645668Schristos public: 334f645668Schristos CompComment (Elf *_elf, int _compcom); 344f645668Schristos ~CompComment (); 354f645668Schristos int compcom_open (CheckSrcName check_src); 364f645668Schristos char *compcom_format (int index, compmsg *msg, int &visible); 374f645668Schristos 384f645668Schristos private: 394f645668Schristos int get_align (int64_t, int align); 404f645668Schristos char *get_demangle_name (char *fname); 414f645668Schristos 424f645668Schristos Elf *elf; 434f645668Schristos int compcom, elf_cls; 444f645668Schristos compmsg *msgs; /* the array of messages */ 454f645668Schristos int32_t *params; /* the parameters used in the messages parameters are 464f645668Schristos * either integers or string-indices */ 474f645668Schristos char *strs; /* the strings used in the messages */ 484f645668Schristos }; 494f645668Schristos 504f645668Schristos class ComC 514f645668Schristos { 524f645668Schristos public: ComC()534f645668Schristos ComC () { com_str = NULL; }; ~ComC()544f645668Schristos ~ComC () { free (com_str); }; 554f645668Schristos 564f645668Schristos int sec; 574f645668Schristos int type; 584f645668Schristos int visible; 594f645668Schristos int line; 604f645668Schristos char *com_str; 614f645668Schristos }; 624f645668Schristos 634f645668Schristos #endif /* _COMPCOM_H */ 64