#10301: [debug_server] Allow configuring a default action on program crashes ------------------------------------+---------------------------- Reporter: anevilyak | Owner: anevilyak Type: enhancement | Status: in-progress Priority: normal | Milestone: Unscheduled Component: Servers/debug_server | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 1 | Platform: All ------------------------------------+---------------------------- Comment (by anevilyak): Replying to [comment:7 bonefish]: > * I would read the settings whenever a team crashes. This allows changing the settings at run-time without having to restart the debug server. Good idea, I suppose in the general case there will only be a small number of entries so this shouldn't be too much overhead. > * `static int32 action_for_string()`: Missing line break. Will fix. > * The code in `Init()` relies on the "default_action" setting being specified before any "executable_actions" (`fDefaultDebugAction` is used for the latter). fDefaultDebugAction is initialized in the constructor to be the prompt action. action_for_string() only uses it as a fallback in case the requested action didn't match any of the recognized strings, so the only effect in the above scenario is that an entry like {{{ StyledEdit dbeug}}} or some other similar typo would simply fall back to prompting, rather than the new default action specified later in the file. I suppose I could get around that by requesting that one explicitly up front via the normal settings API rather than by tree walking, but I wanted to avoid having to make multiple passes of the tree unnecessarily, especially if we follow the above suggestion and constantly evaluate it on the fly (thinking specifically of the testsuite scenario where we might potentially get called hundreds of times in short order). Thoughts? > * It probably doesn't make much of a difference in this case, but there's a private C++ API for driver settings access, which may be more convenient to use (headers/private/storage/DriverSettings.h). Wasn't aware of that, will look into it. > * I don't think support for case insensitive settings is needed. Noted. Thanks for the review, will work on some improvements as time permits. -- Ticket URL: <http://dev.haiku-os.org/ticket/10301#comment:8> Haiku <http://dev.haiku-os.org> Haiku - the operating system.