aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>1997-12-02 22:55:04 +0000
committerMichael Snyder <msnyder@vmware.com>1997-12-02 22:55:04 +0000
commit28ad0632ee28db8d1ca68075e0254ab20f1f9c81 (patch)
tree1fab41a190e4c5b7408e6d95498c92b22449e950
parent728c7f37daf6e8ebef11b7c58f7aac6ae54b8c91 (diff)
downloadgdb-28ad0632ee28db8d1ca68075e0254ab20f1f9c81.zip
gdb-28ad0632ee28db8d1ca68075e0254ab20f1f9c81.tar.gz
gdb-28ad0632ee28db8d1ca68075e0254ab20f1f9c81.tar.bz2
Tue Dec 2 14:53:09 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c: make "tdump" command handle literal memranges.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/tracepoint.c29
2 files changed, 27 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e5807ec..f05aa01 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+Tue Dec 2 14:53:09 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
+
+ * tracepoint.c: make "tdump" command handle literal memranges.
+
Tue Dec 2 11:34:48 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c: use "lookup_cmd" to parse actions commands
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 2869e9c..5276fcc 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -2306,11 +2306,6 @@ trace_dump_command (args, from_tty)
action_exp++;
next_comma = strchr (action_exp, ',');
- if (next_comma)
- {
- make_cleanup (replace_comma, next_comma);
- *next_comma = '\0';
- }
if (0 == strncasecmp (action_exp, "$reg", 4))
registers_info (NULL, from_tty);
@@ -2318,8 +2313,30 @@ trace_dump_command (args, from_tty)
locals_info (NULL, from_tty);
else if (0 == strncasecmp (action_exp, "$arg", 4))
args_info (NULL, from_tty);
+ else if (action_exp[0] == '$' && action_exp[1] == '(')
+ { /* memrange */
+ long typecode, size;
+ bfd_signed_vma offset;
+ char fmt[40];
+
+ action_exp = parse_and_eval_memrange (action_exp,
+ read_pc (),
+ &typecode,
+ &offset,
+ &size);
+ if (typecode != 0 && typecode != -1)
+ offset += read_register (typecode);
+ sprintf (fmt, "/%dxb 0x%x", size, offset);
+ x_command (fmt, from_tty);
+ next_comma = strchr (action_exp, ',');
+ }
else
- {
+ { /* variable */
+ if (next_comma)
+ {
+ make_cleanup (replace_comma, next_comma);
+ *next_comma = '\0';
+ }
printf_filtered ("%s = ", action_exp);
output_command (action_exp, from_tty);
printf_filtered ("\n");