Hi Øyvind, --- Øyvind Harboe <oyvind.har...@zylin.com> schrieb am Mi, 16.9.2009:
> This patch needs work. > > OpenOCD lacks the exception concept of a "try-catch". > There > are other cases where we *do* want error messages. > I agree that we need a message when it *finally* fails. However, when a tentative call to alloc() can't be fulfilled, only the caller knows what that means. It may retry the allocation a few times with a smaller size, then give up after a while. If this is fatal, it should issue a LOG_ERROR. If it can fall back to another option, it may just silently drop the info. If that other option slows things noticeably down, it may issue a LOG_INFO/LOG_WARNING. I've just checked all calls to target_alloc_working_area(). With two exceptions, all modules do one of the following: a) LOG_ERROR (ok) b) LOG_WARNING (ok) c) LOG_WARNING + fallback (ok) d) LOG_INFO + fallback (ok) e) no message, just fallback (ok) f) LOG_DEBUG (arm_nandio,c) (a LOG_WARNING would be better) Only target/armv7m.c and target/arm7_9_common.c just pass the error to the caller. This is for the checksum and blank check algorithms. I would suggest to add LOG_WARNING here. I'm still convinced that the warning in target_alloc_working_area() is misplaced. With the current situation, a bunch of warning may be issued, but the software runs perfectly. Regards, Rolf _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development