VisualGDB ignore Format Specifiers
sample code:
#include "stdafx.h"
namespace winscard {
using byte = unsigned char;
class StatusWord {
public:
byte sw1;
byte sw2;
public:
constexpr StatusWord(byte sw1, byte sw2) :sw1(sw1), sw2(sw2) {
}
constexpr StatusWord() : StatusWord(0, 0) {
}
};
}
int main()
{
winscard::StatusWord status(0x90, 00);
printf("%d\n", status.sw1);
return 0;
}
my natfis file:
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="winscard::StatusWord">
<DisplayString>{(sw1 * 0x100)+sw2,c}</DisplayString>
</Type>
</AutoVisualizer>
VisualStudio + Win32 project:
VisualStudio + VisualGDB: