GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
scm-cmd.c File Reference
#include "defs.h"
#include <ctype.h>
#include "charset.h"
#include "gdbcmd.h"
#include "cli/cli-decode.h"
#include "completer.h"
#include "guile-internal.h"

Go to the source code of this file.

Classes

struct  command_smob
 
struct  cmdscm_completer
 

Macros

#define N_COMPLETERS
 

Functions

static int cmdscm_is_valid (command_smob *)
 
static int cmdscm_print_command_smob (SCM self, SCM port, scm_print_state *pstate)
 
static SCM cmdscm_make_command_smob (void)
 
static void cmdscm_release_command (command_smob *c_smob)
 
static int cmdscm_is_command (SCM scm)
 
static SCM gdbscm_command_p (SCM scm)
 
static SCM cmdscm_get_command_arg_unsafe (SCM self, int arg_pos, const char *func_name)
 
static command_smobcmdscm_get_command_smob_arg_unsafe (SCM self, int arg_pos, const char *func_name)
 
static command_smobcmdscm_get_valid_command_smob_arg_unsafe (SCM self, int arg_pos, const char *func_name)
 
static SCM gdbscm_command_valid_p (SCM self)
 
static SCM gdbscm_dont_repeat (SCM self)
 
static void cmdscm_destroyer (struct cmd_list_element *self, void *context)
 
static void cmdscm_function (const char *args, int from_tty, cmd_list_element *command)
 
static void cmdscm_bad_completion_result (const char *msg, SCM completion)
 
static int cmdscm_add_completion (SCM completion, completion_tracker &tracker)
 
static void cmdscm_completer (struct cmd_list_element *command, completion_tracker &tracker, const char *text, const char *word)
 
char * gdbscm_parse_command_name (const char *name, const char *func_name, int arg_pos, struct cmd_list_element ***base_list, struct cmd_list_element **start_list)
 
int gdbscm_valid_command_class_p (int command_class)
 
char * gdbscm_canonicalize_command_name (const char *name, int want_trailing_space)
 
static SCM gdbscm_make_command (SCM name_scm, SCM rest)
 
static SCM gdbscm_register_command_x (SCM self)
 
void gdbscm_initialize_commands (void)
 

Variables

static const char command_smob_name [] = "gdb:command"
 
static scm_t_bits command_smob_tag
 
static SCM invoke_keyword
 
static SCM command_class_keyword
 
static SCM completer_class_keyword
 
static SCM prefix_p_keyword
 
static SCM doc_keyword
 
static const struct cmdscm_completer cmdscm_completers []
 
static const scheme_integer_constant command_classes []
 
static const scheme_function command_functions []
 

Macro Definition Documentation

◆ N_COMPLETERS

#define N_COMPLETERS
Value:
(sizeof (cmdscm_completers) \
/ sizeof (cmdscm_completers[0]))
static const struct cmdscm_completer cmdscm_completers[]
Definition scm-cmd.c:111

Definition at line 121 of file scm-cmd.c.

Referenced by gdbscm_initialize_commands(), and gdbscm_make_command().

Function Documentation

◆ cmdscm_add_completion()

static int cmdscm_add_completion ( SCM completion,
completion_tracker & tracker )
static

◆ cmdscm_bad_completion_result()

static void cmdscm_bad_completion_result ( const char * msg,
SCM completion )
static

Definition at line 336 of file scm-cmd.c.

Referenced by cmdscm_add_completion(), and cmdscm_completer().

◆ cmdscm_completer()

static void cmdscm_completer ( struct cmd_list_element * command,
completion_tracker & tracker,
const char * text,
const char * word )
static

◆ cmdscm_destroyer()

static void cmdscm_destroyer ( struct cmd_list_element * self,
void * context )
static

Definition at line 284 of file scm-cmd.c.

References cmdscm_release_command().

Referenced by gdbscm_register_command_x().

◆ cmdscm_function()

static void cmdscm_function ( const char * args,
int from_tty,
cmd_list_element * command )
static

◆ cmdscm_get_command_arg_unsafe()

static SCM cmdscm_get_command_arg_unsafe ( SCM self,
int arg_pos,
const char * func_name )
static

Definition at line 202 of file scm-cmd.c.

References cmdscm_is_command(), and command_smob_name.

Referenced by cmdscm_get_command_smob_arg_unsafe().

◆ cmdscm_get_command_smob_arg_unsafe()

static command_smob * cmdscm_get_command_smob_arg_unsafe ( SCM self,
int arg_pos,
const char * func_name )
static

◆ cmdscm_get_valid_command_smob_arg_unsafe()

static command_smob * cmdscm_get_valid_command_smob_arg_unsafe ( SCM self,
int arg_pos,
const char * func_name )
static

◆ cmdscm_is_command()

static int cmdscm_is_command ( SCM scm)
static

Definition at line 185 of file scm-cmd.c.

References command_smob_tag.

Referenced by cmdscm_get_command_arg_unsafe(), and gdbscm_command_p().

◆ cmdscm_is_valid()

static int cmdscm_is_valid ( command_smob * c_smob)
static

◆ cmdscm_make_command_smob()

static SCM cmdscm_make_command_smob ( void )
static

◆ cmdscm_print_command_smob()

static int cmdscm_print_command_smob ( SCM self,
SCM port,
scm_print_state * pstate )
static

◆ cmdscm_release_command()

static void cmdscm_release_command ( command_smob * c_smob)
static

Definition at line 176 of file scm-cmd.c.

References command_smob::command, and command_smob::containing_scm.

Referenced by cmdscm_destroyer().

◆ gdbscm_canonicalize_command_name()

char * gdbscm_canonicalize_command_name ( const char * name,
int want_trailing_space )

Definition at line 583 of file scm-cmd.c.

References FUNC_NAME, and name.

Referenced by gdbscm_make_command(), and gdbscm_make_parameter().

◆ gdbscm_command_p()

static SCM gdbscm_command_p ( SCM scm)
static

Definition at line 193 of file scm-cmd.c.

References cmdscm_is_command().

◆ gdbscm_command_valid_p()

static SCM gdbscm_command_valid_p ( SCM self)
static

Definition at line 256 of file scm-cmd.c.

References cmdscm_get_command_smob_arg_unsafe(), cmdscm_is_valid(), and FUNC_NAME.

◆ gdbscm_dont_repeat()

static SCM gdbscm_dont_repeat ( SCM self)
static

Definition at line 268 of file scm-cmd.c.

References cmdscm_get_valid_command_smob_arg_unsafe(), dont_repeat(), and FUNC_NAME.

◆ gdbscm_initialize_commands()

void gdbscm_initialize_commands ( void )

◆ gdbscm_make_command()

static SCM gdbscm_make_command ( SCM name_scm,
SCM rest )
static

◆ gdbscm_parse_command_name()

char * gdbscm_parse_command_name ( const char * name,
const char * func_name,
int arg_pos,
struct cmd_list_element *** base_list,
struct cmd_list_element ** start_list )

◆ gdbscm_register_command_x()

static SCM gdbscm_register_command_x ( SCM self)
static

◆ gdbscm_valid_command_class_p()

int gdbscm_valid_command_class_p ( int command_class)

Definition at line 561 of file scm-cmd.c.

References command_classes, and scheme_integer_constant::name.

Referenced by gdbscm_make_command(), and gdbscm_make_parameter().

Variable Documentation

◆ cmdscm_completers

const struct cmdscm_completer cmdscm_completers[]
static
Initial value:
=
{
{ "COMPLETE_NONE", noop_completer },
{ "COMPLETE_FILENAME", filename_completer },
{ "COMPLETE_LOCATION", location_completer },
{ "COMPLETE_COMMAND", command_completer },
{ "COMPLETE_SYMBOL", symbol_completer },
{ "COMPLETE_EXPRESSION", expression_completer },
}
void command_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
Definition completer.c:1734
void noop_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *prefix)
Definition completer.c:195
void expression_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
Definition completer.c:1092
void location_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *)
Definition completer.c:927
void filename_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
Definition completer.c:204
void symbol_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
Definition completer.c:1110

Definition at line 111 of file scm-cmd.c.

Referenced by gdbscm_initialize_commands(), and gdbscm_register_command_x().

◆ command_class_keyword

SCM command_class_keyword
static

Definition at line 97 of file scm-cmd.c.

Referenced by gdbscm_initialize_commands(), and gdbscm_make_command().

◆ command_classes

const scheme_integer_constant command_classes[]
static
Initial value:
=
{
{ "COMMAND_NONE", no_class },
{ "COMMAND_RUNNING", class_run },
{ "COMMAND_DATA", class_vars },
{ "COMMAND_STACK", class_stack },
{ "COMMAND_FILES", class_files },
{ "COMMAND_SUPPORT", class_support },
{ "COMMAND_STATUS", class_info },
{ "COMMAND_BREAKPOINTS", class_breakpoint },
{ "COMMAND_TRACEPOINTS", class_trace },
{ "COMMAND_OBSCURE", class_obscure },
{ "COMMAND_MAINTENANCE", class_maintenance },
{ "COMMAND_USER", class_user },
}
@ class_user
Definition command.h:67
@ class_obscure
Definition command.h:64
@ class_maintenance
Definition command.h:65
@ class_breakpoint
Definition command.h:60
@ class_vars
Definition command.h:55
@ class_support
Definition command.h:58
@ class_stack
Definition command.h:56
@ class_trace
Definition command.h:61
@ class_run
Definition command.h:54
@ class_files
Definition command.h:57
@ no_class
Definition command.h:53
@ class_info
Definition command.h:59
#define END_INTEGER_CONSTANTS

Definition at line 538 of file scm-cmd.c.

Referenced by gdbscm_initialize_commands(), and gdbscm_valid_command_class_p().

◆ command_functions

const scheme_function command_functions[]
static

Definition at line 804 of file scm-cmd.c.

Referenced by gdbscm_initialize_commands().

◆ command_smob_name

const char command_smob_name[] = "gdb:command"
static

◆ command_smob_tag

scm_t_bits command_smob_tag
static

◆ completer_class_keyword

SCM completer_class_keyword
static

Definition at line 98 of file scm-cmd.c.

Referenced by gdbscm_initialize_commands(), and gdbscm_make_command().

◆ doc_keyword

SCM doc_keyword
static

Definition at line 100 of file scm-cmd.c.

Referenced by gdbscm_initialize_commands(), and gdbscm_make_command().

◆ invoke_keyword

SCM invoke_keyword
static

Definition at line 96 of file scm-cmd.c.

Referenced by gdbscm_initialize_commands(), and gdbscm_make_command().

◆ prefix_p_keyword

SCM prefix_p_keyword
static

Definition at line 99 of file scm-cmd.c.

Referenced by gdbscm_initialize_commands(), and gdbscm_make_command().