[Ups-cvs] ups/ups ao_target.c,1.13,1.14 exec.c,1.4,1.5
Brought to you by:
ianedwards
From: Tom H. <th...@us...> - 2007-11-22 10:53:49
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1539/ups Modified Files: ao_target.c exec.c Log Message: Improve error reporting for indirect function calls. Index: exec.c =================================================================== RCS file: /cvsroot/ups/ups/ups/exec.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** exec.c 16 Feb 2004 13:02:00 -0000 1.4 --- exec.c 22 Nov 2007 10:53:46 -0000 1.5 *************** *** 805,811 **** args, argsizes_buf, nwords, p_res, restype, &mesg); ! if (mesg != NULL) ! errf("Call of function %s failed: %s: %s", ! addr_to_func(addr)->fu_demangled_name, mesg, get_errno_str()); return (retval == 0) ? CI_ER_CONTINUE : CI_ER_INDIRECT_CALL_FAILED; --- 805,818 ---- args, argsizes_buf, nwords, p_res, restype, &mesg); ! if (mesg != NULL) { ! func_t *f = addr_to_func(addr); ! ! if (f) ! errf("Call of function %s failed: %s: %s", ! f->fu_demangled_name, mesg, get_errno_str()); ! else ! errf("Call of function at address 0x%lx failed: %s: %s", ! addr, mesg, get_errno_str()); ! } return (retval == 0) ? CI_ER_CONTINUE : CI_ER_INDIRECT_CALL_FAILED; Index: ao_target.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_target.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ao_target.c 3 Aug 2005 23:12:18 -0000 1.13 --- ao_target.c 22 Nov 2007 10:53:46 -0000 1.14 *************** *** 1422,1425 **** --- 1422,1426 ---- if (ip->ip_stopres != SR_DIED && bp != NULL) { if (dx_remove_breakpoint(xp, bp) != 0) + *p_mesg = "Can't remove breakpoint at return address"; return -1; } *************** *** 1427,1432 **** /* If we didn't get back to where we expected, stop now. */ ! if (ip->ip_stopres != SR_BPT || ip->ip_restart_pc != retpc) return -1; *p_res = xp_getreg(xp, RETURN_REGNO); --- 1428,1435 ---- /* If we didn't get back to where we expected, stop now. */ ! if (ip->ip_stopres != SR_BPT || ip->ip_restart_pc != retpc) { ! *p_mesg = "Call failed before reaching breakpoint"; return -1; + } *p_res = xp_getreg(xp, RETURN_REGNO); |