Skip to content

[GDB] Can't print builtin types on LHS of rules in K Match #746

Open
@Robertorosmaninho

Description

@Robertorosmaninho

GDB Types to Fix:

  • Int
  • Float
  • Bool
  • String
  • List
  • Map
  • Set

Given the K definition:

module TEST
  imports INT
  imports STRING
  
  syntax Foo ::= foo(Int)
  syntax FooString ::= fooString(String)

  rule [test]: foo(42) => .K
  rule [testString]: fooString("Hello World!") => .K
endmodule

Kompile:

kompile test.k --enable-llvm-debug --syntax-module TEST

Krun and GDB with Int:

krun -cPGM='foo(0)' --debugger

(gdb) k start
...
(gdb) k match TEST.test subject
INT.size_int(0) => 0
Traceback (most recent call last):
  File "<string>", line 794, in invoke
gdb.error: No type named SortMInt{Sort32{}}.

Python Exception <class 'gdb.error'>: No type named SortMInt{Sort32{}}.
Error occurred in Python: No type named SortMInt{Sort32{}}

Krun and GDB with String:

 krun -cPGM='fooString("Hi")' --debugger 

(gdb) k start
...
(gdb) k match TEST.testString subject
KEQUAL.eq(0x7ffff5400080, 0x2e5310 <token_48656c6c6f20576f726c6421>) => false
Traceback (most recent call last):
  File "<string>", line 794, in invoke
gdb.error: No type named .

Python Exception <class 'gdb.error'>: No type named .
Error occurred in Python: No type named .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdebugger

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions