75 #ifdef HAVE_DYNAMIC_LOADING
78 PrintS(
"is not a Singular procedure\n");
84 else lineno=
p->data.s.body_lineno;
90 Print(
"breakpoints in %s deleted(%#x)\n",
p->procname,
i &255);
97 PrintS(
"too many breakpoints set, max is 7\n");
103 p->trace_flag|=(1<<
i);
104 Print(
"breakpoint %d, at line %d in %s\n",
i,
lineno,
p->procname);
111 char * filename =
omStrDup(
"/tmp/sdXXXXXX");
115 Print(
"cannot open %s\n",filename);
121 Print(
"cannot edit type %d\n",
pi->language);
133 if (
pi->data.s.body==
NULL)
136 if (
pi->data.s.body==
NULL)
138 PrintS(
"cannot get the procedure body\n");
150 PrintS(
"cannot write the procedure body\n");
189 Print(
"cannot read from %s\n",filename);
198 pi->data.s.body=(
char *)
omAlloc((
int)len+1);
200 pi->data.s.body[len]=
'\0';
231 Print(
"<<\nbreakpoint %d (press ? for list of commands)\n",bp);
245 "b - print backtrace of calling stack\n"
246 "B <proc> [<line>] - define breakpoint\n"
248 "d - delete current breakpoint\n"
249 "D - show all breakpoints\n"
250 "e - edit the current procedure (current call will be aborted)\n"
251 "h,? - display this help screen\n"
252 "n - execute current line, break at next line\n"
253 "p <var> - display type and value of the variable <var>\n"
254 "q <flags> - quit debugger, set debugger flags(0,1,2)\n"
255 " 0: stop debug, 1:continue, 2: throw an error, return to toplevel\n"
256 "Q - quit Singular\n");
261 Print(
"breakpoint %d at line %d in %s\n",
268 Print(
"delete break point %d\n",bp);
321 Print(
"procedure `%s` ",
p);
Class used for (list of) interpreter objects.
size_t myfread(void *ptr, size_t size, size_t nmemb, FILE *stream)
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
const char * Tok2Cmdname(int tok)
idhdl ggetid(const char *n)
char * iiGetLibProcBuffer(procinfo *pi, int part)
void PrintS(const char *s)
BOOLEAN sdb_set_breakpoint(const char *pp, int given_lineno)
void sdb_edit(procinfo *pi)
void sdb(Voice *currentVoice, const char *currLine, int len)
static char * sdb_find_arg(char *p)
int sdb_checkline(char f)
STATIC_VAR char sdb_lastcmd
int status int void size_t count write