MCPcopy Create free account
hub / github.com/F-Stack/f-stack / db_script_kdbenter

Function db_script_kdbenter

freebsd/ddb/db_script.c:319–328  ·  view source on GitHub ↗

* Wrapper for exec path that is called on KDB enter. Map reason for KDB * enter to a script name, and don't whine if the script doesn't exist. If * there is no matching script, try the catch-all script. */

Source from the content-addressed store, hash-verified

317 * there is no matching script, try the catch-all script.
318 */
319void
320db_script_kdbenter(const char *eventname)
321{
322 char scriptname[DB_MAXSCRIPTNAME];
323
324 snprintf(scriptname, sizeof(scriptname), "%s.%s",
325 DB_SCRIPT_KDBENTER_PREFIX, eventname);
326 if (db_script_exec(scriptname, 0) == ENOENT)
327 (void)db_script_exec(DB_SCRIPT_KDBENTER_DEFAULT, 0);
328}
329
330/*-
331 * DDB commands for scripting, as reached via the DDB user interface:

Callers 1

db_trapFunction · 0.85

Calls 2

snprintfFunction · 0.85
db_script_execFunction · 0.85

Tested by

no test coverage detected