1b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino/* libunwind - a platform-independent unwind library 2b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino Copyright (C) 2006-2007 IBM 3b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino Contributed by 4b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino Corey Ashford <cjashfor@us.ibm.com> 5b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino Jose Flavio Aguilar Paulino <jflavio@br.ibm.com> <joseflavio@gmail.com> 6b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 7b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino Copied from libunwind-x86_64.h, modified slightly for building 8b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino frysk successfully on ppc64, by Wu Zhou <woodzltc@cn.ibm.com> 9b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino Will be replaced when libunwind is ready on ppc64 platform. 10b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 11b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar PaulinoThis file is part of libunwind. 12b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 13b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar PaulinoPermission is hereby granted, free of charge, to any person obtaining 14b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulinoa copy of this software and associated documentation files (the 15b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino"Software"), to deal in the Software without restriction, including 16b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulinowithout limitation the rights to use, copy, modify, merge, publish, 17b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulinodistribute, sublicense, and/or sell copies of the Software, and to 18b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulinopermit persons to whom the Software is furnished to do so, subject to 19b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulinothe following conditions: 20b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 21b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar PaulinoThe above copyright notice and this permission notice shall be 22b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulinoincluded in all copies or substantial portions of the Software. 23b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 24b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar PaulinoTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar PaulinoEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar PaulinoMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar PaulinoNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar PaulinoLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar PaulinoOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar PaulinoWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ 31b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 32b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino#ifndef dwarf_config_h 33b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino#define dwarf_config_h 34b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 35b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino/* For PPC64, 48 GPRs + 33 FPRs + 33 AltiVec + 1 SPE */ 36b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino#define DWARF_NUM_PRESERVED_REGS 115 37b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 38b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino#define DWARF_REGNUM_MAP_LENGTH 115 39b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 40b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino/* Return TRUE if the ADDR_SPACE uses big-endian byte-order. */ 41b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino#define dwarf_is_big_endian(addr_space) 1 42b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 43b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino/* Convert a pointer to a dwarf_cursor structure to a pointer to 44b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino unw_cursor_t. */ 45b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino#define dwarf_to_cursor(c) ((unw_cursor_t *) (c)) 46b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 47b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulinotypedef struct dwarf_loc 48b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino { 49b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino unw_word_t val; 50b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino#ifndef UNW_LOCAL_ONLY 51b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino unw_word_t type; /* see X86_LOC_TYPE_* macros. */ 52b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino#endif 53b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino } 54b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulinodwarf_loc_t; 55b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino 56b33021e4b2f3a92141c01eb24b98bc51a97c498dJose Flavio Aguilar Paulino#endif /* dwarf_config_h */ 57