parrotcode: Parrot debugging | |
Contents | C |
src/debug.c - Parrot debugging
This file implements Parrot debugging and is used by pdb
,
the Parrot debugger,
and the debug
ops.
static char *nextarg(char *command)
na()
,
above,
which is intended for debugger commands.
This function is used for eval
.static const char *skip_ws(const char *str)
static const char *skip_command(const char *str)
na()
macro above.)static const char *parse_int(const char *str, int *intP)
int
out of a string and return a pointer to just after the int
.static const char *parse_string(Interp *interpreter, const char *str, STRING** strP)
STRING
.static const char *parse_key(Interp *interpreter, const char *str, PMC** keyP)
static const char *parse_command(const char *command, unsigned long *cmdP)
void PDB_get_command(Interp *interpreter)
pdb->last_command
),
so it first frees the old one and updates it with the current one.pdb->cur_command
.void PDB_run_command(Interp *interpreter, const char *command)
void PDB_next(Interp *interpreter, const char *command)
void PDB_trace(Interp *interpreter, const char *command)
PDB_condition_t *PDB_cond(Interp *interpreter, const char *command)
void PDB_watchpoint(Interp *interpreter, const char *command)
void PDB_set_break(Interp *interpreter, const char *command)
void PDB_init(Interp *interpreter, const char *command)
void PDB_continue(Interp *interpreter, const char *command)
PDB_breakpoint_t *PDB_find_breakpoint(Interp *interpreter, const char *command)
NULL
if the breakpoint doesn't exist or if no breakpoint was specified.void PDB_disable_breakpoint(Interp *interpreter, const char *command)
void PDB_enable_breakpoint(Interp *interpreter, const char *command)
void PDB_delete_breakpoint(Interp *interpreter, const char *command)
void PDB_delete_condition(Interp *interpreter, PDB_breakpoint_t *breakpoint)
void PDB_skip_breakpoint(Interp *interpreter, long i)
i
times all breakpoints.char PDB_program_end(Interp *interpreter)
char PDB_check_condition(Interp *interpreter, PDB_condition_t *condition)
char PDB_break(Interp *interpreter)
char *PDB_escape(const char *string, INTVAL length)
"
,
\r
,
\n
,
\t
,
\a
and \\
.int PDB_unescape(char *string)
\r
,
\n
,
\t
,
\a
and \\
.size_t PDB_disassemble_op(Interp *interpreter, char *dest, int space, op_info_t *info, opcode_t *op, PDB_file_t *file, opcode_t *code_start, int full_name)
op
.void PDB_disassemble(Interp *interpreter, const char *command)
long PDB_add_label(PDB_file_t *file, opcode_t *cur_opcode, opcode_t offset)
void PDB_free_file(Interp *interpreter)
void PDB_load_source(Interp *interpreter, const char *command)
char PDB_hasinstruction(char *c)
void PDB_list(Interp *interpreter, const char *command)
void PDB_eval(Interp *interpreter, const char *command)
eval
s an instruction.struct PackFile *PDB_compile(Interp *interpreter, const char *command)
end
op.PDB_eval
above or from the compile opcode which generates a malloced string.int PDB_extend_const_table(Interp *interpreter)
void PDB_print_stack(Interp *interpreter, const char *command)
void PDB_print_stack_int(Interp *interpreter, const char *command)
void PDB_print_stack_num(Interp *interpreter, const char *command)
void PDB_print_stack_string(Interp *interpreter, const char *command)
void PDB_print_stack_pmc(Interp *interpreter, const char *command)
static void dump_string(Interp *interpreter, STRING *s)
void PDB_print_user_stack(Interp *interpreter, const char *command)
void PDB_print(Interp *interpreter, const char *command)
void PDB_print_int(Interp *interpreter, struct IReg *int_reg, int regnum)
void PDB_print_int_frame(Interp *interpreter, struct IRegFrame *int_reg, int regnum)
void PDB_print_num(Interp *interpreter, struct NReg *num_reg, int regnum)
void PDB_print_num_frame(Interp *interpreter, struct NRegFrame *num_reg, int regnum)
void PDB_print_string(Interp *interpreter, struct SReg *string_reg, int regnum)
void PDB_print_string_frame(Interp *interpreter, struct SRegFrame *string_reg, int regnum)
static void print_pmc(Interp *interpreter, PMC *pmc)
pmc
.void PDB_print_pmc(Interp *interpreter, struct PReg *pmc_reg, int regnum, PMC *key)
void PDB_print_pmc_frame(Interp *interpreter, struct PRegFrame *pmc_reg, int regnum, PMC *key)
void PDB_info(Interp *interpreter)
void PDB_help(Interp *interpreter, const char *command)
void PDB_backtrace(Interp *interpreter)
include/parrot/debug.h, src/pdb.c and ops/debug.ops.
Initial version by Daniel Grunblatt on 2002.5.19.
|