NAME=idp flags
FILE=bins/pdb/SimplePDB.exe
CMDS=<<EOF
idp bins/pdb/SimplePDB.pdb
fi 1 @ 0x00401000
fi 1 @ 0x00401010
EOF
EXPECT=<<EOF
0x00401000 4096 section..text
0x00401000 0 pdb.void___cdecl_SomeCoolFunction_void
0x00401010 0 pdb._main
EOF
RUN

NAME=idp bin state bug (#9441)
FILE=bins/pdb/SimplePDB.exe
CMDS=<<EOF
e asm.bits
idpi bins/pdb/SimplePDB.pdb~SomeCoolFunction
e asm.bits
EOF
EXPECT=<<EOF
32
0x00401000  2  .text  void __cdecl SomeCoolFunction(void)
32
EOF
RUN

NAME=idpij
FILE=
CMDS=idpij bins/pdb/minimal.pdb~{}
EXPECT=<<EOF
{
  "types": [
    {
      "type": "structure",
      "name": "struct_typedef",
      "size": 7,
      "members": [
        {
          "member_type": "char",
          "member_name": "a",
          "offset": 0
        },
        {
          "member_type": "uint16_t",
          "member_name": "b",
          "offset": 1
        },
        {
          "member_type": "int32_t",
          "member_name": "c",
          "offset": 3
        }
      ]
    },
    {
      "type": "structure",
      "name": "<unnamed-tag>",
      "size": 4,
      "members": [
        {
          "member_type": "char[4]",
          "member_name": "a",
          "offset": 0
        },
        {
          "member_type": "int32_t",
          "member_name": "b",
          "offset": 0
        }
      ]
    },
    {
      "type": "structure",
      "name": "unnamed_member_types_typedef",
      "size": 8,
      "members": [
        {
          "member_type": "union <unnamed-tag>",
          "member_name": "a",
          "offset": 0
        },
        {
          "member_type": "int32_t",
          "member_name": "b",
          "offset": 4
        }
      ]
    },
    {
      "type": "structure",
      "name": "bitfield_typedef",
      "size": 1,
      "members": [
        {
          "member_type": "bitfield uint8_t : 1",
          "member_name": "a",
          "offset": 0
        },
        {
          "member_type": "bitfield uint8_t : 2",
          "member_name": "b",
          "offset": 0
        },
        {
          "member_type": "bitfield uint8_t : 3",
          "member_name": "c",
          "offset": 0
        }
      ]
    },
    {
      "type": "structure",
      "name": "union_typedef",
      "size": 4,
      "members": [
        {
          "member_type": "char",
          "member_name": "a",
          "offset": 0
        },
        {
          "member_type": "uint16_t",
          "member_name": "b",
          "offset": 0
        },
        {
          "member_type": "int32_t",
          "member_name": "c",
          "offset": 0
        }
      ]
    }
  ],
  "gvars": [
    {
      "address": 12292,
      "symtype": 0,
      "section_name": ".data",
      "gdata_name": "_uninitialized_global"
    },
    {
      "address": 12288,
      "symtype": 0,
      "section_name": ".data",
      "gdata_name": "_initialized_global"
    },
    {
      "address": 4096,
      "symtype": 2,
      "section_name": ".text",
      "gdata_name": "_function"
    },
    {
      "address": 4182,
      "symtype": 2,
      "section_name": ".text",
      "gdata_name": "_mainCRTStartup"
    },
    {
      "address": 4120,
      "symtype": 2,
      "section_name": ".text",
      "gdata_name": "_main"
    }
  ]
}
EOF
RUN

