From 3ff119aa1d534defe8d9378f3fd266d0bea10e04 Mon Sep 17 00:00:00 2001 From: "hp.com!davidm" Date: Fri, 23 Apr 2004 00:12:51 +0000 Subject: [PATCH] (put_unwind_info): New function. (resume): Likewise. (nop): Remove. (main): Don't cast function pointer to different prototypes. That's apparently not allowed. icc v8.0 complains about it and GCC 3.5 will actually generate crashing code when this is done. Talk about terminated with extreme prejudice! (Logical change 1.213) --- tests/test-proc-info.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/tests/test-proc-info.c b/tests/test-proc-info.c index 81a7f209..db69bd31 100644 --- a/tests/test-proc-info.c +++ b/tests/test-proc-info.c @@ -82,11 +82,24 @@ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dilap, void *arg) return -UNW_ENOINFO; } -static int -nop (void) +static void +put_unwind_info (unw_addr_space_t as, unw_proc_info_t *pi, void *arg) { - panic ("nop() got called!\n"); - return -1; + ++errors; + fprintf (stderr, "%s() got called!\n", __FUNCTION__); +} + +static int +resume (unw_addr_space_t as, unw_cursor_t *reg, void *arg) +{ + panic ("%s() got called!\n", __FUNCTION__); +} + +static int +get_proc_name (unw_addr_space_t as, unw_word_t ip, char *buf, size_t buf_len, + unw_word_t *offp, void *arg) +{ + panic ("%s() got called!\n", __FUNCTION__); } int @@ -102,13 +115,13 @@ main (int argc, char **argv) memset (&acc, 0, sizeof (acc)); acc.find_proc_info = find_proc_info; - acc.put_unwind_info = (void *) nop; + acc.put_unwind_info = put_unwind_info; acc.get_dyn_info_list_addr = get_dyn_info_list_addr; acc.access_mem = access_mem; acc.access_reg = access_reg; acc.access_fpreg = access_fpreg; - acc.resume = (void *) nop; - acc.get_proc_name = (void *) nop; + acc.resume = resume; + acc.get_proc_name = get_proc_name; as = unw_create_addr_space (&acc, 0); if (!as)