Re: [Openocd-development] [PATCH] ARM11 error handling cleanup

2009-04-28 Thread Michael Bruck
On Tue, Apr 28, 2009 at 9:18 AM, Zach Welch wrote: > On Tue, 2009-04-28 at 09:03 +0200, Michael Bruck wrote: >> On Tue, Apr 28, 2009 at 8:23 AM, Øyvind Harboe >> wrote: >> > Do we really want to go down the path of macros? >> >> Yes. The ifs obscure the actual algorithm by turning a short one-li

Re: [Openocd-development] [PATCH] ARM11 error handling cleanup

2009-04-28 Thread Øyvind Harboe
Committed as-is. Next step is to submit a more general patch if we want to go further down this road. This is one of those times I wish we had some sensible usage of C++ and exception handling rather than to invent some placeholder in OpenOCD. -- Øyvind Harboe Embedded software and hardware con

Re: [Openocd-development] [PATCH] ARM11 error handling cleanup

2009-04-28 Thread Zach Welch
On Tue, 2009-04-28 at 09:03 +0200, Michael Bruck wrote: > On Tue, Apr 28, 2009 at 8:23 AM, Øyvind Harboe > wrote: > > Do we really want to go down the path of macros? > > Yes. The ifs obscure the actual algorithm by turning a short one-line > function call into five lines of (dense) operator sou

Re: [Openocd-development] [PATCH] ARM11 error handling cleanup

2009-04-28 Thread Michael Bruck
On Tue, Apr 28, 2009 at 8:23 AM, Øyvind Harboe wrote: > Do we really want to go down the path of macros? Yes. The ifs obscure the actual algorithm by turning a short one-line function call into five lines of (dense) operator soup with the actual action lost somewhere in between. > There are two

Re: [Openocd-development] [PATCH] ARM11 error handling cleanup

2009-04-27 Thread Øyvind Harboe
Do we really want to go down the path of macros? There are two audiences for this code: - those that work on the code all the time - the casual reader/debugger For the second group, the code is not less readable. The ARM11 code has a lot of strange microconstructs that I have to decode when I t

[Openocd-development] [PATCH] ARM11 error handling cleanup

2009-04-27 Thread Michael Bruck
- use macro for standard error handling arm11-vs-1548-improve-readability Description: Binary data ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development