From 2f6b56efda661c47ae834e4d3ed0a618b22beac2 Mon Sep 17 00:00:00 2001 From: "hp.com!davidm" Date: Wed, 18 Aug 2004 10:50:12 +0000 Subject: [PATCH] (unw_init_remote): Redirect to unw_init_local() if we're initializing for the local address-space. This makes test-init-remote.c work. (Logical change 1.243) --- src/ia64/Ginit_remote.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ia64/Ginit_remote.c b/src/ia64/Ginit_remote.c index 0353d1a7..c9a316d3 100644 --- a/src/ia64/Ginit_remote.c +++ b/src/ia64/Ginit_remote.c @@ -1,5 +1,5 @@ /* libunwind - a platform-independent unwind library - Copyright (C) 2001-2002 Hewlett-Packard Co + Copyright (C) 2001-2002, 2004 Hewlett-Packard Co Contributed by David Mosberger-Tang This file is part of libunwind. @@ -39,6 +39,14 @@ unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg) Debug (2, "(cursor=%p)\n", c); + if (as == unw_local_addr_space) + /* This special-casing is unfortunate and shouldn't be needed; + however, both Linux and HP-UX need to adjust the context a bit + before it's usable. Try to think of a cleaner way of doing + this. Not sure it's possible though, as long as we want to be + able to use the context returned by getcontext() et al. */ + return unw_init_local (cursor, as_arg); + c->as = as; c->as_arg = as_arg; return common_init (c);