Skip to content

Commit d27fa12

Browse files
committed
Added frame command #43
1 parent 1ec97d6 commit d27fa12

File tree

5 files changed

+68
-1
lines changed

5 files changed

+68
-1
lines changed

syntaxes/gdb.tmLanguage.json

+39-1
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@
923923
}
924924
},
925925
{
926-
"match": "\\b(mask)[ \t]+(0x[a-fA-Z0-9]+)",
926+
"match": "\\b(mask)[ \t]+(0x\\h+)",
927927
"captures": {
928928
"1": { "name": "support.function.suboption.gdb" },
929929
"2": { "name": "constant.character.escape.mask_value.gdb" }
@@ -1345,7 +1345,45 @@
13451345
"1": { "name": "keyword.control.command.gdb" },
13461346
"2": { "patterns" : [ { "include": "#location" } ] }
13471347
}
1348+
},
1349+
{
1350+
"name": "meta.command.frame.gdb",
1351+
"begin": "(?:^|\\G)[ \t]*\\b(f(?:r(?:a(?:me?)?)?)?)\\b[ \t]*",
1352+
"beginCaptures": { "1": { "name": "keyword.control.command.gdb" } },
1353+
"patterns": [
1354+
{
1355+
"match": "\\b(l(?:e(?:v(?:el?)?)?)?[ \t]+)?\\b([0-9]+)[ \t]*$",
1356+
"captures": {
1357+
"1": { "name" : "support.function.option.gdb"},
1358+
"2": { "patterns": [ { "include": "#numeric"} ] }
1359+
}
1360+
},
1361+
{
1362+
"match": "\\b(ad(?:d(?:r(?:e(?:ss?)?)?)?)?[ \t]+)\\b(0x\\h+)[ \t]*$",
1363+
"captures": {
1364+
"1": { "name" : "support.function.option.gdb"},
1365+
"2": { "patterns": [ { "include": "#numeric"} ] }
1366+
}
1367+
},
1368+
{
1369+
"match": "\\b(f(?:u(?:n(?:c(?:t(?:i(?:on?)?)?)?)?)?)?[ \t]+)\\b(\\w+)[ \t]*$",
1370+
"captures": {
1371+
"1": { "name" : "support.function.option.gdb"},
1372+
"2": { "patterns": [ { "include": "#location"} ] }
1373+
}
1374+
},
1375+
{
1376+
"match": "\\b(v(?:i(?:ew?)?)?)\\b[ \t]+\\b(0x\\h+)\\b(?:[ \t]+\\b(0x\\h+))?[ \t]*$",
1377+
"captures": {
1378+
"1": { "name" : "support.function.option.gdb"},
1379+
"2": { "patterns": [ { "include": "#numeric"} ] },
1380+
"3": { "patterns": [ { "include": "#numeric"} ] }
1381+
}
1382+
}
1383+
],
1384+
"end": "$"
13481385
}
1386+
13491387
]
13501388
},
13511389
"block": {

tests/tests/command/frame/address.gdb

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
frame ad 0x1234
2+
frame add 0x1234
3+
frame addr 0x1234
4+
frame addre 0x1234
5+
frame addres 0x1234
6+
frame address 0x1234
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
frame f main
2+
frame fu main
3+
frame fun main
4+
frame func main
5+
frame funct main
6+
frame functi main
7+
frame functio main
8+
frame function main

tests/tests/command/frame/level.gdb

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
f 0
2+
fr 0
3+
fra 0
4+
fram 0
5+
frame 0
6+
frame l 0
7+
frame le 0
8+
frame lev 0
9+
frame leve 0
10+
frame level 0

tests/tests/command/frame/view.gdb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
frame v 0x1234
2+
frame vi 0x1234
3+
frame vie 0x1234
4+
frame view 0x1234
5+
frame view 0x1234 0x1234

0 commit comments

Comments
 (0)