summaryrefslogtreecommitdiff
path: root/dbug/dbug.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbug/dbug.c')
-rw-r--r--dbug/dbug.c45
1 files changed, 35 insertions, 10 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c
index 7f4292d18b1..666ab2b3e3c 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -412,15 +412,11 @@ void _db_process_(const char *name)
cs->process= name;
}
+
/*
* FUNCTION
*
- * _db_set_ set current debugger settings
- *
- * SYNOPSIS
- *
- * VOID _db_set_(control)
- * char *control;
+ * DbugParse parse control string and set current debugger setting
*
* DESCRIPTION
*
@@ -444,7 +440,7 @@ void _db_process_(const char *name)
*
*/
-void _db_set_(CODE_STATE *cs, const char *control)
+static void DbugParse(CODE_STATE *cs, const char *control)
{
const char *end;
int rel=0;
@@ -674,6 +670,35 @@ void _db_set_(CODE_STATE *cs, const char *control)
/*
* FUNCTION
*
+ * _db_set_ set current debugger settings
+ *
+ * SYNOPSIS
+ *
+ * VOID _db_set_(control)
+ * char *control;
+ *
+ * DESCRIPTION
+ *
+ * Given pointer to a debug control string in "control",
+ * parses the control string, and sets up a current debug
+ * settings. Pushes a new debug settings if the current is
+ * set to the initial debugger settings.
+ */
+
+void _db_set_(CODE_STATE *cs, const char *control)
+{
+ get_code_state_or_return;
+
+ if (cs->stack == &init_settings)
+ PushState(cs);
+
+ DbugParse(cs, control);
+}
+
+
+/*
+ * FUNCTION
+ *
* _db_push_ push current debugger settings and set up new one
*
* SYNOPSIS
@@ -685,7 +710,7 @@ void _db_set_(CODE_STATE *cs, const char *control)
*
* Given pointer to a debug control string in "control", pushes
* the current debug settings, parses the control string, and sets
- * up a new debug settings with _db_set_()
+ * up a new debug settings with DbugParse()
*
*/
@@ -694,7 +719,7 @@ void _db_push_(const char *control)
CODE_STATE *cs=0;
get_code_state_or_return;
PushState(cs);
- _db_set_(cs, control);
+ DbugParse(cs, control);
}
/*
@@ -717,7 +742,7 @@ void _db_set_init_(const char *control)
CODE_STATE tmp_cs;
bzero((uchar*) &tmp_cs, sizeof(tmp_cs));
tmp_cs.stack= &init_settings;
- _db_set_(&tmp_cs, control);
+ DbugParse(&tmp_cs, control);
}
/*