1f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com/* libunwind - a platform-independent unwind library 2f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com Copyright (C) 2003-2004 Hewlett-Packard Co 3f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com Contributed by David Mosberger-Tang <davidm@hpl.hp.com> 4f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com 5f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comThis file is part of libunwind. 6f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com 7f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comPermission is hereby granted, free of charge, to any person obtaining 8f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.coma copy of this software and associated documentation files (the 9f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com"Software"), to deal in the Software without restriction, including 10f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comwithout limitation the rights to use, copy, modify, merge, publish, 11f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comdistribute, sublicense, and/or sell copies of the Software, and to 12f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.compermit persons to whom the Software is furnished to do so, subject to 13f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comthe following conditions: 14f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com 15f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comThe above copyright notice and this permission notice shall be 16f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comincluded in all copies or substantial portions of the Software. 17f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com 18f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 22f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 24f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ 25f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com 26f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com#include "unwind-internal.h" 27f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com 28f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comPROTECTED unsigned long 29f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com_Unwind_GetBSP (struct _Unwind_Context *context) 30f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com{ 31f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com#ifdef UNW_TARGET_IA64 32f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com unw_word_t val; 33f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com 34f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com unw_get_reg (&context->cursor, UNW_IA64_BSP, &val); 35f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com return val; 36f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com#else 37f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com return 0; 38f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com#endif 39f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com} 40f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com 41f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comunsigned long __libunwind_Unwind_GetBSP (struct _Unwind_Context *) 42f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com ALIAS (_Unwind_GetBSP); 43f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com