On Wed, Oct 15, 2008 at 1:44 AM, Duane Ellis <[EMAIL PROTECTED]> wrote: > Øyvind Harboe wrote: >> >> I *know* it is a bit late to suggest this now, but does anyone have >> any argument against making target_write_xxx() and >> target->type->write_xxx() >> return void? >> >> jtag_execute_queue() will return an error if the above failed.... >> >> That's part of the whole queue API design... >> >> > > What you propose seems wrong - in at least 2 ways: > > -------------------------------------- > > 1) a script that will read lots and lots of data bytes from the target. > > Example - my "show register" functions I wrote for AT91SAM parts. > > The boil down to 'target->type->read_memory()' > > (A) that script function should get an error. > (B) if it returns VOID - how would it get or display that error?
I was only airing the idea to make *write* return void. > > ---- > > 2) Same questions for GDB If I cannot write/read memory - it needs to > know. > > It uses "target_write_buffer()' > > Granted, GDB does not always do a good job - but - the intent is this: If > you have a 'wacky pointer' reading from that memory location should cause a > read fault of sometype and that read fault should be reported back up to > GDB. > > ------ > > Or maybe you have a way around this? I wanted to air this thought, but I believe that we should stick to having write's return error code. -- Øyvind Harboe http://www.zylin.com/zy1000.html ARM7 ARM9 XScale Cortex JTAG debugger and flash programmer Free eCos workshop in Oslo October 21! http://www.zylin.com/workshop.html _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
