On Wed, Sep 16, 2009 at 5:04 PM, Magnus Lundin <lun...@mlu.mine.nu> wrote: > Øyvind Harboe wrote: >> >> Use the source Luke :-) >> >> > > I most certainly do. > > But you vere saying that this particular patch breaks the error reporting > in other places. And in my linited knowlege of the source, this is not the > case. > > It is like having malloc writing error messages to the console. Annoying. > But it can be reasonable while debugging to log this as a debug event. > > It is up to the caller to determine if a memory allocation failure is a > error for the application, take appropriate action, in our case usually try > a smaller block, and report this as an error if that is the case.
The patch does not add the error message to the cases that *should* have an error message. I think a reasonable way to handle this for OpenOCD would be to introduce a version of the allocation that does not log an error(given that we're not moving to C++ exceptions anytime soon). We can then fix the handful of sites that should *not* log an error. -- Øyvind Harboe Embedded software and hardware consulting services http://www.zylin.com _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development