Øyvind Harboe wrote: > On Fri, Sep 4, 2009 at 10:30 AM, David Brownell<davi...@pacbell.net> wrote: > >> On Friday 04 September 2009, Matt Hsu wrote: >> >>> retval = mem_ap_write_atomic_u32(swjdp, >>> OMAP3530_DEBUG_BASE + CPUDBG_DRCR, 0x1); >>> >> Why are you still discarding the error check here???? >> That's an obvious bug ... >> > > There are probably 100x places in the cortex_m3/a8.c that do not > check the return value from mem_ap_read_atomic_u32()... > > What makes this place different? > > I would have wanted ALL of the return values to be propagated. > This is one of the *great* things about exception handling. You > have to go out of your way not to add error handling... > > It is even worse. The actual error detection is done in swjdp_transaction_endcheck(), and only JTAG communication errors are reported back through the return value. Sticky overruns and sticky errors are logged but they return ERROR_OK. And how should errors be handled and where ? So the whole error handling scheme needs a deep rethink before it is worth the effort of picking at all the little pieces.
Regards, Magnus _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development