On Mon, Jan 4, 2010 at 10:17 PM, David Brownell <davi...@pacbell.net> wrote: > On Monday 04 January 2010, Øyvind Harboe wrote: >> On Mon, Jan 4, 2010 at 8:59 PM, David Brownell <davi...@pacbell.net> wrote: >> > On Monday 04 January 2010, Øyvind Harboe wrote: >> >> >> >> This is a hack of course, but I'm wondering if it is the best >> >> hack for 0.4... >> > >> > I'd like a solution that gets rid of *all* the errors on >> > execution of the "shutdown" command. >> > >> > Is there a reason why shutdown doesn't just cause exit()? >> >> It's less "clean", > > But it's "correct" ... where the current code isn't.
Actually the exit command shouldn't even be built for embedded targets, it doesn't mean anything. There is no "exit", for embedded hosts I've implemented a much more apt "reboot" command, which reboots the zy1000. For 0.4 the best thing I can come up with right now is to call exit() for the "exit" command and deleting all the kludges higher up in the callstack. For *debugging* purposes, it would be nice to have a way to let openocd terminate by returning from the main() fn. valgrind and such could then enumerate all alllocations that have not been freed up by the time main() has returned, all cleanup(atexit handlers), etc. has been run. But that can come post 0.4. -- Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development