annotate runtime/syntax/gdb.vim @ 20041:3601e816a569 v8.2.0576

patch 8.2.0576: some errors are not covered by tests Commit: https://github.com/vim/vim/commit/067297e16a516838dbc46aaa9d8b1a507afec28d Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 13 19:55:50 2020 +0200 patch 8.2.0576: some errors are not covered by tests Problem: Some errors are not covered by tests. Solution: Add a few more tests. (Dominique Pelle, closes https://github.com/vim/vim/issues/5920)
author Bram Moolenaar <Bram@vim.org>
date Mon, 13 Apr 2020 20:00:05 +0200
parents 46763b01cd9a
children 624439a39432
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: GDB command files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Claudio Fleiner <claudio@fleiner.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.fleiner.com/vim/syntax/gdb.vim
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
5 " Last Change: 2012 Oct 05
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3854
diff changeset
7 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3854
diff changeset
8 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
12 let s:cpo_save = &cpo
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
13 set cpo&vim
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
14
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn keyword gdbInfo contained address architecture args breakpoints catch common copying dcache
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword gdbInfo contained display files float frame functions handle line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword gdbInfo contained locals program registers scope set sharedlibrary signals
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword gdbInfo contained source sources stack symbol target terminal threads
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword gdbInfo contained syn keyword tracepoints types udot variables warranty watchpoints
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match gdbInfo contained "all-registers"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword gdbStatement contained actions apply attach awatch backtrace break bt call catch cd clear collect commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword gdbStatement contained complete condition continue delete detach directory disable disassemble display down
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword gdbStatement contained echo else enable end file finish frame handle hbreak help if ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword gdbStatement contained inspect jump kill list load maintenance make next nexti ni output overlay
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword gdbStatement contained passcount path print printf ptype pwd quit rbreak remote return run rwatch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword gdbStatement contained search section set sharedlibrary shell show si signal source step stepi stepping
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword gdbStatement contained stop target tbreak tdump tfind thbreak thread tp trace tstart tstatus tstop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword gdbStatement contained tty undisplay unset until up watch whatis where while ws x
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match gdbFuncDef "\<define\>.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match gdbStatmentContainer "^\s*\S\+" contains=gdbStatement,gdbFuncDef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match gdbStatement "^\s*info" nextgroup=gdbInfo skipwhite skipempty
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
35 " some commonly used abbreviations
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword gdbStatement c disp undisp disas p
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
38 syn region gdbDocument matchgroup=gdbFuncDef start="\<document\>.*$" matchgroup=gdbFuncDef end="^end\s*$"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match gdbStatement "\<add-shared-symbol-files\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match gdbStatement "\<add-symbol-file\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match gdbStatement "\<core-file\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match gdbStatement "\<dont-repeat\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match gdbStatement "\<down-silently\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match gdbStatement "\<exec-file\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match gdbStatement "\<forward-search\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match gdbStatement "\<reverse-search\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match gdbStatement "\<save-tracepoints\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match gdbStatement "\<select-frame\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match gdbStatement "\<symbol-file\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match gdbStatement "\<up-silently\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match gdbStatement "\<while-stepping\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword gdbSet annotate architecture args check complaints confirm editing endian
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword gdbSet environment gnutarget height history language listsize print prompt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword gdbSet radix remotebaud remotebreak remotecache remotedebug remotedevice remotelogbase
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword gdbSet remotelogfile remotetimeout remotewritesize targetdebug variable verbose
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword gdbSet watchdog width write
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match gdbSet "\<auto-solib-add\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match gdbSet "\<solib-absolute-prefix\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match gdbSet "\<solib-search-path\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match gdbSet "\<stop-on-solib-events\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match gdbSet "\<symbol-reloading\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match gdbSet "\<input-radix\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match gdbSet "\<demangle-style\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match gdbSet "\<output-radix\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
68 syn match gdbComment "^\s*#.*" contains=@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match gdbVariable "\$\K\k*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " Strings and constants
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
73 syn region gdbString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match gdbCharacter "'[^']*'" contains=gdbSpecialChar,gdbSpecialCharError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match gdbCharacter "'\\''" contains=gdbSpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match gdbCharacter "'[^\\]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match gdbNumber "\<[0-9_]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match gdbNumber "\<0x[0-9a-fA-F_]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 if !exists("gdb_minlines")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 let gdb_minlines = 10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 exec "syn sync ccomment gdbComment minlines=" . gdb_minlines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3854
diff changeset
87 " Only when an item doesn't have highlighting yet
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
88 hi def link gdbFuncDef Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
89 hi def link gdbComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
90 hi def link gdbStatement Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
91 hi def link gdbString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
92 hi def link gdbCharacter Character
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
93 hi def link gdbVariable Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
94 hi def link gdbSet Constant
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
95 hi def link gdbInfo Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
96 hi def link gdbDocument Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
97 hi def link gdbNumber Number
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 let b:current_syntax = "gdb"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3854
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
101 let &cpo = s:cpo_save
aa51675adf7e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
102 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 " vim: ts=8