summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-09-28 22:13:13 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-09-28 22:13:13 +0300
commit983b6996b019850733fc9cd2ea57352f9dbbf7d8 (patch)
treec65a2e6339260751f3552bb0eea0b8116423f16d
parent66479f2ca1fbbf3b96cd2e1b15c0119b209df54a (diff)
downloadgawk-983b6996b019850733fc9cd2ea57352f9dbbf7d8.tar.gz
Add "where" command to debugger (alias for backtrace).
-rw-r--r--ChangeLog7
-rw-r--r--NEWS3
-rw-r--r--command.c2
-rw-r--r--command.y2
4 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 66e36060..07ec6572 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ * command.y (cmdtab): Add "where" as an alias for "backtrace".
+ Finally!
+
2014-09-27 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (check_for_bad): Bitwise-and the bad character with 0xFF
@@ -19,7 +24,7 @@
* awkgram.y (yylex): Don't check for junk characters inside
quoted strings. Caused issues on DJGPP and Solaris.
- Unrelated
+ Unrelated:
* io.c (devopen): Straighten things out with respect to
compatibility with BWK awk.
diff --git a/NEWS b/NEWS
index 2b921d51..f6fab602 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,9 @@ Changes from 4.1.1 to 4.1.2
If you feel that you must have this misfeature, use `configure --help'
to see what option to use when configuring gawk to reenable it.
+7. The "where" command has been added to the debugger as an alias
+ for "backtrace". This will make life easier for long-time GDB users.
+
XX. A number of bugs have been fixed. See the ChangeLog.
Changes from 4.1.0 to 4.1.1
diff --git a/command.c b/command.c
index ad0dc372..2d4bc814 100644
--- a/command.c
+++ b/command.c
@@ -2648,6 +2648,8 @@ struct cmdtoken cmdtab[] = {
gettext_noop("up [N] - move N frames up the stack.") },
{ "watch", "w", D_watch, D_WATCH, do_watch,
gettext_noop("watch var - set a watchpoint for a variable.") },
+{ "where", "", D_backtrace, D_BACKTRACE, do_backtrace,
+ gettext_noop("where [N] - (same as backtrace) print trace of all or N innermost (outermost if N < 0) frames.") },
{ NULL, NULL, D_illegal, 0, (Func_cmd) 0,
NULL },
};
diff --git a/command.y b/command.y
index c67753b7..08893743 100644
--- a/command.y
+++ b/command.y
@@ -897,6 +897,8 @@ struct cmdtoken cmdtab[] = {
gettext_noop("up [N] - move N frames up the stack.") },
{ "watch", "w", D_watch, D_WATCH, do_watch,
gettext_noop("watch var - set a watchpoint for a variable.") },
+{ "where", "", D_backtrace, D_BACKTRACE, do_backtrace,
+ gettext_noop("where [N] - (same as backtrace) print trace of all or N innermost (outermost if N < 0) frames.") },
{ NULL, NULL, D_illegal, 0, (Func_cmd) 0,
NULL },
};