From 35300d06169b4b18908867ef16d4807dc0e59121 Mon Sep 17 00:00:00 2001 From: "hp.com!davidm" Date: Thu, 27 Nov 2003 06:52:54 +0000 Subject: [PATCH] Replace #ifdef UNW_DEBUG with #if UNW_DEBUG. (Logical change 1.130) --- src/hppa/global-hppa.c | 18 +++++++++++++ src/ia64/Gdestroy_addr_space-ia64.c | 39 +++++++++++++++++++++++++++++ src/ia64/Ginit-ia64.c | 2 +- src/ia64/Grbs-ia64.c | 2 +- src/x86/global-x86.c | 18 +++++++++++++ 5 files changed, 77 insertions(+), 2 deletions(-) diff --git a/src/hppa/global-hppa.c b/src/hppa/global-hppa.c index e69de29b..dce12e3d 100644 --- a/src/hppa/global-hppa.c +++ b/src/hppa/global-hppa.c @@ -0,0 +1,18 @@ +#include "unwind_i.h" + +HIDDEN int hppa_needs_initialization = 1; + +#if UNW_DEBUG +HIDDEN int tdep_debug_level; +#endif + +HIDDEN void +hppa_init (void) +{ + extern void _ULhppa_local_addr_space_init (void); + + mi_init(); + + _Uhppa_local_addr_space_init (); + _ULhppa_local_addr_space_init (); +} diff --git a/src/ia64/Gdestroy_addr_space-ia64.c b/src/ia64/Gdestroy_addr_space-ia64.c index e69de29b..1a0e4583 100644 --- a/src/ia64/Gdestroy_addr_space-ia64.c +++ b/src/ia64/Gdestroy_addr_space-ia64.c @@ -0,0 +1,39 @@ +/* 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. */ + +#include + +#include "unwind_i.h" + +void +unw_destroy_addr_space (unw_addr_space_t as) +{ +#ifndef UNW_LOCAL_ONLY +# if UNW_DEBUG + memset (as, 0, sizeof (*as)); +# endif + free (as); +#endif +} diff --git a/src/ia64/Ginit-ia64.c b/src/ia64/Ginit-ia64.c index 7a7793c1..c473a696 100644 --- a/src/ia64/Ginit-ia64.c +++ b/src/ia64/Ginit-ia64.c @@ -33,7 +33,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ # include #endif -#ifdef UNW_DEBUG +#if UNW_DEBUG HIDDEN const char * ia64_strloc (ia64_loc_t loc) diff --git a/src/ia64/Grbs-ia64.c b/src/ia64/Grbs-ia64.c index 28bad9d4..8a624ba4 100644 --- a/src/ia64/Grbs-ia64.c +++ b/src/ia64/Grbs-ia64.c @@ -86,7 +86,7 @@ rbs_find_stacked (struct cursor *c, unw_word_t regs_to_skip, { unw_word_t nregs, bsp = c->bsp, curr = c->rbs_curr, n; unw_word_t left_edge = c->rbs_left_edge; -#ifdef UNW_DEBUG +#if UNW_DEBUG int reg = 32 + regs_to_skip; #endif diff --git a/src/x86/global-x86.c b/src/x86/global-x86.c index e69de29b..3d7cef67 100644 --- a/src/x86/global-x86.c +++ b/src/x86/global-x86.c @@ -0,0 +1,18 @@ +#include "unwind_i.h" + +HIDDEN int x86_needs_initialization = 1; + +#if UNW_DEBUG +HIDDEN int tdep_debug_level; +#endif + +HIDDEN void +x86_init (void) +{ + extern void _ULx86_local_addr_space_init (void); + + mi_init(); + + _Ux86_local_addr_space_init (); + _ULx86_local_addr_space_init (); +}