📄 gdb_regex.h
字号:
#ifndef NeXT /* if standard GDB */ /* exec with Message after */ {"\\(.*\n\\)*\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\):.+\n\\([ ]*[^0-9\n].*\n\\)\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*[ }]*}\n\\)?\\)*\\)", NULL, {6, -1, -1, 3, 2, 7} }, /* exec with Message before */ {"\\(.*\n\\)*\\([ ]*[^ \n].*\n\\)\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\):.+\n\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*[ }]*}\n\\)?\\)*\\)", NULL, {2, -1, -1, 4, 3, 7} }, /* exec without Message */ {"\\(.*\n\\)*\032\032\\(\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\):.+\n\\)\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*[ }]*}\n\\)?\\)*\\)", NULL, {2, -1, -1, 4, 3, 7} }, #else /* NeXT is a special case : same as standard except that ":0x.+" are removed. */ /* exec with Message after */ {"\\(.*\n\\)*\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\)\n\\([ ]*[^0-9\n].*\n\\)\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*[ }]*}\n\\)?\\)*\\)", NULL, {6, -1, -1, 3, 2, 7} }, /* exec with Message before */ {"\\(.*\n\\)*\\([ ]*[^ \n].*\n\\)\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\)\n\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*[ }]*}\n\\)?\\)*\\)", NULL, {2, -1, -1, 4, 3, 7} }, /* exec without Message */ {"\\(.*\n\\)*\032\032\\(\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\)\n\\)\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*[ }]*}\n\\)?\\)*\\)", NULL, {2, -1, -1, 4, 3, 7} },#endif /* NeXT */ /* done */ {"\\(.*\n\\)*\n\\(Program terminated with signal \\|Program exited with code 0\\|Program exited normally\\).*\n\\(.*\n\\)*", NULL, {-1, -1, -1, -1, -1, -1} },#if defined (NeXT) && !defined(NEXTOS_2)#if defined(NEXTOS_3_0) /* NeXT 3.0 gdb is special case : uses "file:#" intead of "file, line #" */ /* break */ {"\\(.*\n\\)*Breakpoint \\([0-9]+\\) at [^ \n]+: file \\([^ \n]+\\):\\([0-9]+\\).\n", NULL, {-1, 2, -1, 4, 3, -1} },#else /* NeXT 3.X gdb is special case : leaves out "file" label altogether */ /* break */ {"\\(.*\n\\)*Breakpoint \\([0-9]+\\) at [^ \n]+: \\([^ \n]+\\):\\([0-9]+\\).\n", NULL, {-1, 2, -1, 4, 3, -1} },#endif#else /* if standard GDB */ /* break */ {"\\(.*\n\\)*Breakpoint \\([0-9]+\\) at [^ \n]+: file \\([^ \n]+\\), line \\([0-9]+\\).\n", NULL, {-1, 2, -1, 4, 3, -1} },#endif /* NeXT */ /* info directories */ {"Source directories searched:[ ]*\\([^ \n]+\\)[ ]*\n", NULL, { -1, -1, -1, -1, 1, -1} }, #ifndef NeXT /* if standard GDB */ /* up, down */ {"\\(.*\n\\)*\\(#[0-9]+[ ]+\\(0[^ \n]+[ ]+in[ ]+\\)?\\([^ \n]+\\)[^\032]*\\)\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\):.+\n", NULL, {2, -1, 4, 6, 5, -1} },#else /* NeXT is a special case : same as standard except that ":0x.+" are removed. */ /* up, down */ {"\\(.*\n\\)*\\(#[0-9]+[ ]+\\(0[^ \n]+[ ]+in[ ]+\\)?\\([^ \n]+\\)[^\032]*\\)\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\)\n", NULL, {2, -1, 4, 6, 5, -1} },#endif /* NeXT */ /* bell */ {"\\(Undefined command: .*\n\\|Already at the \\(top\\|bottom\\) call level\n\\|\No active stack frames\n\\|no program to run\n\\|no process to run\n\\|\program is not active\n\\|can't continue execution\n\\|\.*\ncan't write to process.*\n\\|\\\(Top\\|End\\)-of-file; did not find search string:.*\n\\)", NULL, {-1, -1, -1, -1, -1, -1} }, /* search */ {"\\([0-9]+\\).*\n", NULL, {-1, -1, -1, 1, -1, -1} }, /* info line */ {"\\(\\(Line \\(number \\)?[0-9]+ \\(of\\|is out of range for\\) \"\\([^ \n]+\\)\".*\\)\\|\\(No symbol table is loaded.*\\)\\|\\(No source file specified.*\\)\\|\\(No line number.*\\)\\)\n", NULL, {-1, -1, -1, -1, 5, -1} }, /* print */ {"\\(warning: .*\n\\)?\\(\\(.*\\) = .*\n\\(.*\n\\)*\\)", NULL, { 3, -1, -1, -1, -1, 2} }, /* start gdb (debug) */ {"\\(.*\n\\)*Type \"help\" for a list of commands.\n", NULL, { -1, -1, -1, -1, -1, -1} }, /* directory */ {"\\([^ \n]+ is already in the source path.[ ]*\n\\)*Source directories searched:[ ]*\\([^ \n]+\\)[ ]*\n", NULL, { -1, -1, -1, -1, 1, -1} }, /* list : 22MAY91 put message in Token.mesg (edit again 30MAY91) */ {"\\(\\([^0-9\n]+.*\n\\)*\\)\\(.*\n\\)*\\(\\([0-9]+\\).*\n\\)", NULL, { 1, -1, -1, 5, -1, -1} },/* {"\\(\\(.*\n\\)*\\)\\(\\([0-9]+\\).*\n\\)", NULL, { 1, -1, -1, 4, -1, -1} },*/ /* display */ {"\\([0-9]+:.*\n\\)", NULL, { -1, -1, -1, -1, -1, 1} }, /* info display */ {"\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*[ }]*}\n\\)?\\)*\\)\\(\\(.*\n\\)*\\)", NULL, { 5, -1, -1, -1, -1, 1} },/* {"\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)", NULL, { -1, -1, -1, -1, -1, 1} },*/ /* pwd or cd *//* 11JUN92: Fix by Michael L. Graham : pb with symbolic link directories *//* {"Working directory[ ]+\\([^ \n]+\\).[ ]*\n\\([ ]*(canonically[ ]+\\([^ \n]+\\)).\n\\)?", *//* (PW)23NOV92 : the patch did not work when directory name includes '.' *//* {"Working directory[ ]+\\([^ \n.]+\\)\\.?[ ]*\n\\([ ]*(canonically[ ]+\\([^ \n]+\\)).\n\\)?",*/ {"Working directory[ ]+\\([^ \n]+\\)[ ]*\\(\n[ ]*(canonically[ ]+\\([^ \n]+\\))\\)?.\n", NULL, { 1, -1, -1, -1, -1, 3} }, /* program received signal */ {"\\(.*\n\\)*\n\\(Program received signal \\([-]?[0-9]+\\), [^ \n]+.*\n\\)\\(.*\n\\)*", NULL, { 2, 3, -1, -1, -1, -1} }, /* special for test in filter_display_info() */ {"\\([^0-9\n].*\n\\)*\\([0-9]+:.*\n\\)\\(.*\n\\)*", NULL, { -1, -1, -1, -1, -1, 2} }, /* special for test in filter_reading_symbols() */ {"\\(.*\n\\)*\\(Reading in symbols for .*done.\n\\)\\(.*\n\\)*", NULL, { 2, -1, -1, -1, -1, -1} }, /* core-file */ {"\\(.*\n\\)*\\(Program terminated with signal \\([-]?[0-9]+\\), [^ \n]+.*\n\\)\\(.*\n\\)*", NULL, { 2, 3, -1, -1, -1, -1} }, /* Undefined show command (for test gdb 4.0) */ {"\\(Undefined command: \"show\".\n\\)", NULL, {-1, -1, -1, -1, -1, -1} }, /* info source (for gdb 4.0) */ {"\\(.*\n\\)*Current source file is \\([^ ]+\\)\nCompilation directory is \\([^ ]+\\)\nLocated in \\([^ ]+\\)\n\\(.*\n\\)*", NULL, { 3, -1, 2, -1, 4, -1} }, /* up, down with no source file */ {"\\(.*\n\\)*\\(#[0-9]+[ ]+\\(0[^ \n]+[ ]+in[ ]+\\)?\\([^ \n]+\\).*\\)\n", NULL, {2, -1, 4, -1, -1, -1} }, { NULL, /* last one */ NULL, {-1, -1, -1, -1, -1, -1} }};/* To simplify the patterns, I used for example : "f[rame]*" instead of "frame\\|fram\\|fra||fr". This will cause 'frmeame' to be accepted. But this is no problem because 'Undefined command' output is parsed before parsing the command line (see parse() in parser.c).*/static PatternRec command_pattern[] = { /* run -r - cont - c - next - n - step - s - nexti - ni - stepi - si - return jump - until - u */ /* CRL mod 22 4/5/91 GWC - added attach to this list for gdbvx */ /* (PW) - added target to this list for gdb 4.0 */ {"[ ]*\\(run\\|r\\|cont\\|c\\|next\\|n\\|step\\|s\\|nexti\\|stepi\\|ni\\|si\\|ret[urn]*\\|j[ump]*\\|unt[il]*\\|u\\|at[tach]*\\|ta[rget]*\\)\\( .*\\)?\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* break - tbreak */ {"[ ]*\\(t\\)?\\(b\\|br\\|bre\\|brea\\|break\\)\\( .*\\)?\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* (PW)28AUG91 : add show for gdb 4.0 */ {"[ ]*\\(info\\|show\\)[ ]+directories[ ]*\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* 'frame' is special case of 'frame n' since it does not change the current frame. Else 'frame n' is like up or down. */ /* CRL mod 23 4/5/91 GWC - changed fr[ame] to f[rame] */ {"[ ]*f[rame]*[ ]*\n", NULL, {-1, -1, -1, -1, -1, -1}}, {"[ ]*\\(up\\|down\\|dow\\|do\\|f[rame]*\\)\\( .*\\)?\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* delete - d - clear - enable - disable - dis - disa */ /* gdb commands 'delete display' 'enable display' and 'delete environment' are also found here. This is superfluous, but no problem */ {"[ ]*\\(del[ete]*\\|d\\|cl[ear]*\\|en[able]*\\|disab[le]*\\|dis\\|disa\\)\\( .*\\)?\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* because of gdb 4.0 use fin[ish] instead of fi[nish] */ {"[ ]*fin[ish]*[ ]*\n", NULL, {-1, -1, -1, -1, -1, -1}}, {"[ ]*info[ ]+line[ ]*\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* symbol-file */ {"[ ]*sy.*\n", NULL, {-1, -1, -1, -1, -1, -1}}, {"[ ]*cd[ ]*[^ \n]+[ ]*\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* directory */ {"[ ]*dir.*\n", NULL, {-1, -1, -1, -1, -1, -1}}, {"[ ]*pwd[ ]*\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* list */ {"[ ]*\\(l\\|li\\|lis\\|list\\)\\( .*\\)?\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* forward-search or reverse-search or search */ {"[ ]*\\(fo[rward-search]*\\|rev[erse-search]*\\|sea[rch]*\\)[ ]*", NULL, {-1, -1, -1, -1, -1, -1}}, /* 'display' is a special case of 'display exp' since it does not add any expression to be displayed */ {"[ ]*disp[lay]*[ ]*\n", NULL, {-1, -1, -1, -1, -1, -1}}, {"[ ]*disp[lay]\\(/[^ \n]+\\)?*[ ]*[^ \n]+[ ]*.*\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* undisplay */ {"[ ]*und.*\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* Note that Token.mesg (if any) is updated with print command (see 1) */ {"[ ]*print[ ]*\\([^ \n]?\\([ ]+[^ \n]+\\)*\\)[ ]*\n", NULL, { 1, -1, -1, -1, -1, -1}}, {"[ ]*info[ ]+break[ ]*\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* source (note that Token.TK_FILE is updated here) */ {"[ ]*so[urce]*[ ]*\\(.*\\)\n", NULL, {-1, -1, -1, -1, 1, -1}}, /* exec-file (just used internally) */ {"[ ]*ex[ec-file]*.*\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* core-file */ {"[ ]*cor[e-file]*.*\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* define */ {"[ ]*def[ine]*[ ]+[^ \n]+\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* document */ {"[ ]*doc[ument]*[ ]+[^ \n]+\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* end of define or document */ {"[ ]*end[ ]*.*", NULL, {-1, -1, -1, -1, -1, -1}}, /* info source */ {"[ ]*info[ ]+source[ ]*\n", NULL, {-1, -1, -1, -1, -1, -1}}, /* file */ {"[ ]*file .*\n", NULL, {-1, -1, -1, -1, -1, -1}}, {NULL, /* last one */ NULL, {-1, -1, -1, -1, -1, -1}}};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -