aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>1997-12-08 22:32:35 +0000
committerMichael Snyder <msnyder@vmware.com>1997-12-08 22:32:35 +0000
commit5d187fd31819d856396bdf57b66f7bf2427bc47d (patch)
tree006d4b206c43b010d5808f1eab1594ed1415cbba
parent0c4f6dc21ac0f465d2dd00b33021a6157b1a941e (diff)
downloadgdb-5d187fd31819d856396bdf57b66f7bf2427bc47d.zip
gdb-5d187fd31819d856396bdf57b66f7bf2427bc47d.tar.gz
gdb-5d187fd31819d856396bdf57b66f7bf2427bc47d.tar.bz2
Mon Dec 8 14:28:49 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c (memrange_sortmerge): allow for memranges that overlap. (collect_pseudocommand etc.) cleanup decls.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/tracepoint.c36
2 files changed, 33 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f4f1a32..b80a365 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+Mon Dec 8 14:28:49 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
+
+ * tracepoint.c (memrange_sortmerge): allow for memranges
+ that overlap. (collect_pseudocommand etc.) cleanup decls.
+
Fri Dec 5 10:31:23 1997 Keith Seitz <keiths@pizza.cygnus.com>
* gdbtk.c (gdbtk_init): add gdb_find_file to interpreter
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index f098541..2b81911 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -733,18 +733,24 @@ static char *parse_and_eval_memrange PARAMS ((char *,
static void
end_actions_pseudocommand (args, from_tty)
+ char *args;
+ int from_tty;
{
error ("This command cannot be used at the top level.");
}
static void
while_stepping_pseudocommand (args, from_tty)
+ char *args;
+ int from_tty;
{
error ("This command can only be used in a tracepoint actions list.");
}
static void
collect_pseudocommand (args, from_tty)
+ char *args;
+ int from_tty;
{
error ("This command can only be used in a tracepoint actions list.");
}
@@ -884,6 +890,9 @@ validate_actionline (line, t)
if (*p == '\0') /* empty line: just prompt for another line. */
return BADLINE;
+ if (*p == '#') /* comment line */
+ return GENERIC;
+
c = lookup_cmd (&p, cmdlist, "", -1, 1);
if (c == 0)
{
@@ -1130,7 +1139,9 @@ memrange_sortmerge (memranges)
memranges->list[b].start - memranges->list[a].end <=
MAX_REGISTER_VIRTUAL_SIZE)
{
- memranges->list[a].end = memranges->list[b].end;
+ /* memrange b starts before memrange a ends; merge them. */
+ if (memranges->list[b].end > memranges->list[a].end)
+ memranges->list[a].end = memranges->list[b].end;
continue; /* next b, same a */
}
a++; /* next a */
@@ -1405,6 +1416,9 @@ encode_actions (t, tdp_actions, step_count, stepping_actions)
while (isspace (*action_exp))
action_exp++;
+ if (*action_exp == '#') /* comment line */
+ return;
+
cmd = lookup_cmd (&action_exp, cmdlist, "", -1, 1);
if (cmd == 0)
error ("Bad action list item: %s", action_exp);
@@ -2106,13 +2120,16 @@ tracepoint_save_command (args, from_tty)
actionline++;
fprintf (fp, "%s%s\n", indent, actionline);
- cmd = lookup_cmd (&actionline, cmdlist, "", -1, 1);
- if (cmd == 0)
- error ("Bad action list item: %s", actionline);
- if (cmd->function.cfunc == while_stepping_pseudocommand)
- indent = i2;
- else if (cmd->function.cfunc == end_actions_pseudocommand)
- indent = i1;
+ if (*actionline != '#') /* skip for comment lines */
+ {
+ cmd = lookup_cmd (&actionline, cmdlist, "", -1, 1);
+ if (cmd == 0)
+ error ("Bad action list item: %s", actionline);
+ if (cmd->function.cfunc == while_stepping_pseudocommand)
+ indent = i2;
+ else if (cmd->function.cfunc == end_actions_pseudocommand)
+ indent = i1;
+ }
}
}
}
@@ -2316,6 +2333,9 @@ trace_dump_command (args, from_tty)
/* The collection actions to be done while stepping are
bracketed by the commands "while-stepping" and "end". */
+ if (*action_exp == '#') /* comment line */
+ continue;
+
cmd = lookup_cmd (&action_exp, cmdlist, "", -1, 1);
if (cmd == 0)
error ("Bad action list item: %s", action_exp);