OK, I now successfully build gdb.exe and gdbserver.exe! To handle the INT32_MAX and INT32_MIN macro definition issue, I just have: #ifndef INT32_MIN #define INT32_MIN INT_MIN #endif #ifndef INT32_MAX #define INT32_MAX INT_MAX #endif Before #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." #endif In either: mybuildcpp\gdb\gdbserver\build-gnulib-gdbserver\import\inttypes.h and mybuildcpp\gdb\build-gnulib\import\inttypes.h The total patch I use is in attachment. Yuanhui Zhang