freebsd-dev/sys/ddb
Andriy Gapon 3761bead4a db_script_exec: use a saved script name when reporting commands executed
Before executing a command in a ddb script ddb prints an information
line of the form:
  db:1:my-script> command
where 1 is the script's depth level, "my-script" is the scipt's name,
and "command" is the current command in the script.
db_script_exec() uses its 'scriptname' parameter to produce that string.
In the case when db_script_exec() is called from db_run_cmd() the
argument points to db_tok_string that is a global variable used for
command parsing.  So, its value changes with every command executed.

This commit changes the code to use the script's name stored in
ds_scriptname to print the line.

MFC after:	2 weeks
2018-03-04 13:27:21 +00:00
..
db_access.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_access.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_break.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_break.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_capture.c SPDX: oops .. not from CMU. 2017-11-30 15:58:38 +00:00
db_command.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_command.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_examine.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_expr.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_input.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_lex.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_lex.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_main.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_output.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_output.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_print.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_ps.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
db_run.c Implement 'domainset', a cpuset based NUMA policy mechanism. This allows 2018-01-12 22:48:23 +00:00
db_script.c db_script_exec: use a saved script name when reporting commands executed 2018-03-04 13:27:21 +00:00
db_sym.c ddb: fix validation of cpu id in 'set db_cpu=x' 2017-12-05 14:22:08 +00:00
db_sym.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_textdump.c Generalize the gzio API. 2018-01-08 21:27:41 +00:00
db_thread.c sys/ddb: further adoption of SPDX licensing ID tags. 2017-11-27 15:14:46 +00:00
db_variables.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_variables.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_watch.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_watch.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_write_cmd.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
ddb.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00