From 7343841308f1266a37e1eeafd4158ec9aa64f790 Mon Sep 17 00:00:00 2001 From: "mostang.com!davidm" Date: Thu, 27 Feb 2003 09:58:57 +0000 Subject: [PATCH] (unw_accessors_t): Add optional get_proc_name() callback. (Logical change 1.56) --- include/libunwind-common.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/libunwind-common.h b/include/libunwind-common.h index 111c9118..292c62c5 100644 --- a/include/libunwind-common.h +++ b/include/libunwind-common.h @@ -1,5 +1,5 @@ /* libunwind - a platform-independent unwind library - Copyright (C) 2001-2002 Hewlett-Packard Co + Copyright (C) 2001-2003 Hewlett-Packard Co Contributed by David Mosberger-Tang This file is part of libunwind. @@ -164,6 +164,14 @@ typedef struct unw_accessors unw_fpreg_t *val, int write, void *arg); int (*resume) (unw_addr_space_t as, unw_cursor_t *c, void *arg); + + /* Optional call back to obtain the name of a (static) procedure. + Dynamically generated procedures are handled automatically by + libunwind. This callback is optional and may be set to + NULL. */ + int (*get_proc_name) (unw_addr_space_t as, unw_word_t addr, + char *buf, size_t buf_len, unw_word_t *offp, + void *arg); } unw_accessors_t; @@ -349,4 +357,7 @@ extern int _UPT_access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write, void *arg); extern int _UPT_access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val, int write, void *arg); +extern int _UPT_get_proc_name (unw_addr_space_t as, unw_word_t addr, + char *buf, size_t len, unw_word_t *offp, + void *arg); extern unw_accessors_t _UPT_accessors;