00001 /* 00002 * See the dyninst/COPYRIGHT file for copyright information. 00003 * 00004 * We provide the Paradyn Tools (below described as "Paradyn") 00005 * on an AS IS basis, and do not warrant its validity or performance. 00006 * We reserve the right to update, modify, or discontinue this 00007 * software at any time. We shall have no obligation to supply such 00008 * updates or modifications or any other form of support to you. 00009 * 00010 * By your use of Paradyn, you understand and agree that we (or any 00011 * other person or entity with proprietary rights in Paradyn) are 00012 * under no obligation to provide either maintenance services, 00013 * update services, notices of latent defects, or correction of 00014 * defects for Paradyn. 00015 * 00016 * This library is free software; you can redistribute it and/or 00017 * modify it under the terms of the GNU Lesser General Public 00018 * License as published by the Free Software Foundation; either 00019 * version 2.1 of the License, or (at your option) any later version. 00020 * 00021 * This library is distributed in the hope that it will be useful, 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00024 * Lesser General Public License for more details. 00025 * 00026 * You should have received a copy of the GNU Lesser General Public 00027 * License along with this library; if not, write to the Free Software 00028 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00029 */ 00030 #include "auxvtypes.h" 00031 00032 #include <cstdlib> 00033 using namespace std; 00034 00035 const char *auxv_type_to_string(int type) { 00036 static const char *unknown = "UNKNOWN"; 00037 static const char *names[] = { 00038 "AT_NULL", // 0 00039 "AT_IGNORE", 00040 "AT_EXECFD", 00041 "AT_PHDR", 00042 "AT_PHENT", 00043 "AT_PHNUM", // 5 00044 "AT_PAGESZ", 00045 "AT_BASE", 00046 "AT_FLAGS", 00047 "AT_ENTRY", 00048 "AT_NOTELF", // 10 00049 "AT_UID", 00050 "AT_EUID", 00051 "AT_GID", 00052 "AT_EGID", 00053 "AT_PLATFORM", // 15 00054 "AT_HWCAP", 00055 "AT_CLKTCK", 00056 "AT_FPUCW", 00057 "AT_DCACHEBSIZE", 00058 "AT_ICACHEBSIZE", // 20 00059 "AT_UCACHEBSIZE", 00060 "AT_IGNOREPPC", 00061 "AT_SECURE", 00062 unknown, 00063 unknown, // 25 00064 unknown, 00065 unknown, 00066 unknown, 00067 unknown, 00068 unknown, // 30, 00069 unknown, 00070 "AT,_SYSINFO", 00071 "AT_SYSINFO_EHDR", 00072 "AT_L1I_CACHESHAPE", 00073 "AT_L1D_CACHESHAPE", // 35 00074 "AT_L2_CACHESHAPE", 00075 "AT_L3_CACHESHAPE" 00076 }; 00077 00078 const size_t size = (sizeof(names) / sizeof(const char*)); 00079 return (type >= 0 && ((size_t) type) < size) ? names[type] : unknown; 00080 }
1.6.1