remake  4.3+dbg-1.5
Functions | Variables
fns.h File Reference
#include "debug.h"
#include "filedef.h"
#include "trace.h"
#include "rule.h"

Go to the source code of this file.

Functions

brkpt_mask_t get_brkpt_option (const char *psz_break_type)
 
const gmk_flocget_current_floc (void)
 
const file_tget_current_target (void)
 
bool get_int (const char *psz_arg, int *pi_result, bool b_warn)
 
bool get_uint (const char *psz_arg, unsigned int *pi_result, bool b_warn)
 
char * get_word (char **ppsz_str)
 
file_tget_target (char **ppsz_args, const char **ppsz_target)
 
bool is_abbrev_of (const char *psz_substr, const char *psz_word, unsigned int i_min)
 
void on_off_toggle (const char *psz_onoff, int *var)
 
void print_debugger_location (const file_t *p_target, debug_enter_reason_t reason, const floc_stack_node_t *p_stack_floc)
 
char * stripwhite (char *string)
 
const char * var_to_on_off (int i_bool)
 
bool dbg_cmd_show_exp (char *psz_arg, bool expand)
 
void print_db_level (debug_level_mask_t e_debug_level)
 
variable_ttry_without_dollar (const char *psz_varname)
 
void dbg_print_invocation (void)
 
rule_tfind_rule (const char *psz_name)
 
void shell_rc_status (int rc)
 
void chomp (char *line)
 

Variables

gmk_flocp_target_loc
 
char * psz_target_name
 
gmk_floc fake_floc
 

Function Documentation

◆ chomp()

void chomp ( char *  line)

◆ dbg_cmd_show_exp()

bool dbg_cmd_show_exp ( char *  psz_arg,
bool  expand 
)

Show a expression. Set "expand" to 1 if you want variable definitions inside the displayed value expanded.

◆ dbg_print_invocation()

void dbg_print_invocation ( void  )

◆ find_rule()

rule_t* find_rule ( const char *  psz_name)

Referenced by dbg_cmd_info().

◆ get_brkpt_option()

brkpt_mask_t get_brkpt_option ( const char *  psz_break_type)

◆ get_current_floc()

const gmk_floc* get_current_floc ( void  )

◆ get_current_target()

const file_t* get_current_target ( void  )

Return the current target from the stack or NULL if none set.

◆ get_int()

bool get_int ( const char *  psz_arg,
int *  pi_result,
bool  b_warn 
)

Parse psz_arg for a signed integer. The value is returned in pi_result. If warn is true, then we'll give a warning if no integer found. The return value is true if parsing succeeded in any event..

Referenced by dbg_cmd_frame(), dbg_cmd_frame_down(), and dbg_cmd_where().

◆ get_target()

file_t* get_target ( char **  ppsz_args,
const char **  ppsz_target 
)

Find the target in first word of psz_args or use $@ (the current stack) if none. We also allow $@ or @ explicitly as a target name to mean the current target on the stack. NULL is returned if a lookup of the target name was not found. ppsz_target is to the name looked up.

Referenced by dbg_cmd_info(), and dbg_cmd_target().

◆ get_uint()

bool get_uint ( const char *  psz_arg,
unsigned int *  pi_result,
bool  b_warn 
)

Parse psz_arg for a unsigned integer. The value is returned in pi_result. The retun value is true if parsing succeeded.

Referenced by dbg_cmd_up().

◆ get_word()

char* get_word ( char **  ppsz_str)

Find the next "word" - skip leading blanks and the "word" is the largest non-blank characters after that. ppsz_str is modified to point after the portion returned and also the region initially pointed to by ppsz_str is modified so that word is zero-byte termintated.

Referenced by dbg_cmd_info(), and dbg_cmd_target().

◆ is_abbrev_of()

bool is_abbrev_of ( const char *  psz_substr,
const char *  psz_word,
unsigned int  i_min 
)

Return true if psz_substr is an initial prefix (abbreviation) of psz_word. The empty string is not a valid abbreviation.

Referenced by dbg_cmd_info(), dbg_cmd_show(), dbg_cmd_target(), and dbg_help_subcmd().

◆ on_off_toggle()

void on_off_toggle ( const char *  psz_onoff,
int *  var 
)

toggle var on or on or off depending on psz_onoff

◆ print_db_level()

void print_db_level ( debug_level_mask_t  e_debug_level)

Print an interpretation of the debug level mask.

Referenced by dbg_cmd_show().

◆ print_debugger_location()

void print_debugger_location ( const file_t p_target,
debug_enter_reason_t  reason,
const floc_stack_node_t p_stack_floc 
)

Print where we are in the Makefile.

◆ shell_rc_status()

void shell_rc_status ( int  rc)

◆ stripwhite()

char* stripwhite ( char *  string)

Strip whitespace from the start and end of STRING. Return a pointer into STRING.

◆ try_without_dollar()

variable_t* try_without_dollar ( const char *  psz_varname)

See if psz_varname is $varname or

◆ var_to_on_off()

const char* var_to_on_off ( int  i_bool)

Show if i_bool is "on" or "off"

Referenced by dbg_cmd_show(), and dbg_help_subcmd_entry().

Variable Documentation

◆ fake_floc

gmk_floc fake_floc

We use the if when we fake a line number because a real one hasn't been recorded on the stack.

◆ p_target_loc

gmk_floc* p_target_loc

◆ psz_target_name

char* psz_target_name