22 #define DEPENDS_COMMANDS " depends commands" 24 dbg_cmd_list(
char *psz_arg)
26 const char *psz_target = NULL;
27 char *target_cmd = NULL;
30 if (psz_arg && 0 == strcmp(psz_arg,
"-")) {
37 dbg_errmsg(
_(
"We don't seem to have a target to get parent of."));
43 dbg_errmsg(
_(
"We don't seem to have a parent target."));
47 psz_target = p_target->
name;
49 dbg_errmsg(
_(
"We don't seem to have a target stack to get parent of."));
53 unsigned int u_lineno=0;
55 if (
get_uint(psz_arg, &u_lineno,
false)) {
58 u_lineno, &entry_type);
60 dbg_errmsg(
"Can't find target or pattern on line %s.\n" 61 "Use 'info lines' to get a list of and pattern lines.",
65 psz_target = p_target->
name;
67 dbg_errmsg(
_(
"We don't seem to have a target stack to get parent of."));
75 dbg_errmsg(
_(
"Trouble getting a target name for %s."), psz_target);
86 dbg_cmd_list_init(
unsigned int c)
88 short_command[c].func = &dbg_cmd_list;
89 short_command[c].use =
_(
"list [TARGET|LINE-NUMBER]");
file_t * p_target
Definition: trace.h:81
file_t * target_for_file_and_line(const char *psz_filename, unsigned int lineno, f2l_entry_t *entry_type)
const char * name
Definition: filedef.h:36
bool get_uint(const char *psz_arg, unsigned int *pi_result, bool b_warn)
#define CALLOC(t, n)
Definition: types.h:83
gmk_floc floc
Definition: filedef.h:39
void print_floc_prefix(const gmk_floc *p_floc)
target_stack_node_t * p_stack
debug_return_t
Definition: trace.h:32
f2l_entry_t
Definition: file2line.h:24
#define DEPENDS_COMMANDS
Definition: list.h:22
#define _(msgid)
Definition: make.h:293
file_t * get_target(char **ppsz_args, const char **ppsz_target)
Node for an item in the target call stack.
Definition: trace.h:79
const char * filenm
Definition: gnuremake.h:25
struct target_stack_node * p_parent
Definition: trace.h:83
target_stack_node_t * p_stack_top
const char * description
Definition: filedef.h:43
debug_return_t dbg_cmd_target(char *psz_args)
Definition: target.h:21