remake  4.3+dbg-1.5
step.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2015, 2020 R. Bernstein
3 <rocky@gnu.org>
4 This file is part of GNU Make (remake variant).
5 
6 GNU Make is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10 
11 GNU Make is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with GNU Make; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20 /* Step execution until another stopping point is reached Argument N
21  means do this N times (or until there's another reason to stop. */
22 
23 static debug_return_t
24 dbg_cmd_step (char *psz_arg)
25 {
26  if (!psz_arg || !*psz_arg) {
29  define_variable_in_set("MAKEFLAGS", sizeof("MAKEFLAGS")-1,
30  "X", o_debugger, 0, NULL, NULL);
31  return continue_execution;
32  }
33  if (get_uint(psz_arg, &i_debugger_stepping, true)) {
34  define_variable_in_set("MAKEFLAGS", sizeof("MAKEFLAGS")-1,
35  "X", o_debugger, 0, NULL, NULL);
37  return continue_execution;
38  } else
39  return debug_readloop;
40 }
41 
42 static void
43 dbg_cmd_step_init(unsigned int c)
44 {
45  short_command[c].func = &dbg_cmd_step;
46  short_command[c].use = _("step [AMOUNT]");
47 }
48 
49 
50 /*
51  * Local variables:
52  * eval: (c-set-style "gnu")
53  * indent-tabs-mode: nil
54  * End:
55  */
bool get_uint(const char *psz_arg, unsigned int *pi_result, bool b_warn)
struct variable * define_variable_in_set(const char *name, size_t length, const char *value, enum variable_origin origin, int recursive, struct variable_set *set, const gmk_floc *flocp)
debug_return_t
Definition: trace.h:32
#define _(msgid)
Definition: make.h:293
Definition: trace.h:40
unsigned int i_debugger_nexting
Definition: variable.h:34
Definition: trace.h:33
unsigned int i_debugger_stepping