From 51095505d98582bc1580bd64a2412eb23d3d0159 Mon Sep 17 00:00:00 2001 From: "mostang.com!davidm" Date: Tue, 11 Mar 2003 01:11:18 +0000 Subject: [PATCH] (struct addr_space): Add "dyn_info_list_addr" member. (Logical change 1.61) --- include/tdep-hppa.h | 91 +++++++++++++++++++++++++++++++++++++++++++++ include/tdep-ia64.h | 3 +- include/tdep-x86.h | 91 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 184 insertions(+), 1 deletion(-) diff --git a/include/tdep-hppa.h b/include/tdep-hppa.h index e69de29b..8fce6ee4 100644 --- a/include/tdep-hppa.h +++ b/include/tdep-hppa.h @@ -0,0 +1,91 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2003 Hewlett-Packard Co + Contributed by David Mosberger-Tang + +This file is part of libunwind. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + +#ifndef TDEP_HPPA_H +#define TDEP_HPPA_H + +/* Target-dependent definitions that are internal to libunwind but need + to be shared with target-independent code. */ + +#include +#include + +enum hppa_pregnum + { + HPPA_NUM_PREGS + }; + +struct hppa_loc + { + unw_word_t val; +#ifndef UNW_LOCAL_ONLY + unw_word_t type; /* see HPPA_LOC_TYPE_* macros. */ +#endif + }; + +struct unw_addr_space + { + struct unw_accessors acc; + unw_caching_policy_t caching_policy; + uint32_t cache_generation; + unw_word_t dyn_generation; /* see dyn-common.h */ + unw_word_t dyn_info_list_addr; /* (cached) dyn_info_list_addr */ + }; + +struct cursor + { + unw_addr_space_t as; + void *as_arg; + + /* IP & SP cache: */ + unw_word_t ip; + unw_word_t sp; + + struct hppa_loc ip_loc; + struct hppa_loc sp_loc; + }; + +/* Platforms that support UNW_INFO_FORMAT_TABLE need to define + tdep_search_unwind_table. */ +#define tdep_search_unwind_table(a,b,c,d,e,f) \ + UNW_ARCH_OBJ(search_unwind_table) (a,b,c,d,e,f) +#define tdep_find_proc_info(as,ip,pi,n,a) \ + UNW_ARCH_OBJ(find_proc_info) (as,ip,pi,n,a) +#define tdep_put_unwind_info(a,b,c) UNW_ARCH_OBJ(put_unwind_info)(a,b,c) +#define tdep_uc_addr(uc,reg) UNW_ARCH_OBJ(uc_addr)(uc,reg) +#define tdep_debug_level UNW_ARCH_OBJ(debug_level) + +extern int tdep_search_unwind_table (unw_addr_space_t as, unw_word_t ip, + unw_dyn_info_t *di, unw_proc_info_t *pi, + int need_unwind_info, void *arg); +extern int tdep_find_proc_info (unw_addr_space_t as, unw_word_t ip, + unw_proc_info_t *pi, int need_unwind_info, + void *arg); +extern void tdep_put_unwind_info (unw_addr_space_t as, + unw_proc_info_t *pi, void *arg); +extern void *tdep_uc_addr (ucontext_t *uc, int reg); +extern int tdep_debug_level; + +#endif /* TDEP_HPPA_H */ diff --git a/include/tdep-ia64.h b/include/tdep-ia64.h index 708e8b06..baf2c970 100644 --- a/include/tdep-ia64.h +++ b/include/tdep-ia64.h @@ -72,7 +72,8 @@ struct unw_addr_space int big_endian; unw_caching_policy_t caching_policy; uint32_t cache_generation; - unw_word_t dyn_generation; /* see dyn-common.h */ + unw_word_t dyn_generation; /* see dyn-common.h */ + unw_word_t dyn_info_list_addr; /* (cached) dyn_info_list_addr */ struct ia64_script_cache global_cache; }; diff --git a/include/tdep-x86.h b/include/tdep-x86.h index e69de29b..a8cabd5f 100644 --- a/include/tdep-x86.h +++ b/include/tdep-x86.h @@ -0,0 +1,91 @@ +/* libunwind - a platform-independent unwind library + Copyright (C) 2002 Hewlett-Packard Co + Contributed by David Mosberger-Tang + +This file is part of libunwind. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + +#ifndef TDEP_X86_H +#define TDEP_X86_H + +/* Target-dependent definitions that are internal to libunwind but need + to be shared with target-independent code. */ + +#include +#include + +enum x86_pregnum + { + X86_NUM_PREGS + }; + +struct x86_loc + { + unw_word_t val; +#ifndef UNW_LOCAL_ONLY + unw_word_t type; /* see X86_LOC_TYPE_* macros. */ +#endif + }; + +struct unw_addr_space + { + struct unw_accessors acc; + unw_caching_policy_t caching_policy; + uint32_t cache_generation; + unw_word_t dyn_generation; /* see dyn-common.h */ + unw_word_t dyn_info_list_addr; /* (cached) dyn_info_list_addr */ + }; + +struct cursor + { + unw_addr_space_t as; + void *as_arg; + + /* IP & SP cache: */ + unw_word_t eip; + unw_word_t esp; + + struct x86_loc eip_loc; + struct x86_loc ebp_loc; + }; + +/* Platforms that support UNW_INFO_FORMAT_TABLE need to define + tdep_search_unwind_table. */ +#define tdep_search_unwind_table(a,b,c,d,e,f) \ + UNW_ARCH_OBJ(search_unwind_table) (a,b,c,d,e,f) +#define tdep_find_proc_info(as,ip,pi,n,a) \ + UNW_ARCH_OBJ(find_proc_info) (as,ip,pi,n,a) +#define tdep_put_unwind_info(a,b,c) UNW_ARCH_OBJ(put_unwind_info)(a,b,c) +#define tdep_uc_addr(uc,reg) UNW_ARCH_OBJ(uc_addr)(uc,reg) +#define tdep_debug_level UNW_ARCH_OBJ(debug_level) + +extern int tdep_search_unwind_table (unw_addr_space_t as, unw_word_t ip, + unw_dyn_info_t *di, unw_proc_info_t *pi, + int need_unwind_info, void *arg); +extern int tdep_find_proc_info (unw_addr_space_t as, unw_word_t ip, + unw_proc_info_t *pi, int need_unwind_info, + void *arg); +extern void tdep_put_unwind_info (unw_addr_space_t as, + unw_proc_info_t *pi, void *arg); +extern void *tdep_uc_addr (ucontext_t *uc, int reg); +extern int tdep_debug_level; + +#endif /* TDEP_X86_H */