1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-16 23:11:44 +02:00

(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)
This commit is contained in:
hp.com!davidm 2004-04-23 00:12:51 +00:00
parent 9a9618401f
commit 3ff119aa1d

View file

@ -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)