Should a target_read/write_buffer() be a silent no-op or generate an explicit error?
I have reason to believe 0 sized elf sections can occur... Index: C:/workspace/openocd/src/target/target.c =================================================================== --- C:/workspace/openocd/src/target/target.c (revision 1395) +++ C:/workspace/openocd/src/target/target.c (working copy) @@ -979,6 +979,12 @@ LOG_ERROR("Target not examined yet"); return ERROR_FAIL; } + + if (size==0) + { + LOG_DEBUG("size=0 is safe no-op"); + return OK; + } if ((address + size - 1) < address) { @@ -1054,6 +1060,12 @@ LOG_ERROR("Target not examined yet"); return ERROR_FAIL; } + + if (size==0) + { + LOG_DEBUG("size=0 is safe no-op"); + return OK; + } if ((address + size - 1) < address) { -- Øyvind Harboe PayBack incident management system Reduce costs and increase quality, free Starter Edition http://www.payback.no/index_en.html _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development