I have tried many ways to print stacktrace / backtrace in MinGW 64 - but it seems that it is not possible anyway. Seems like backtrace library and its required includes / compiler flags are not available in MinGW - inclusion of execinfo.h states error and so is compiler flag -rdynamic . Please let me know a clean method to generate a backtrace stack of a function - it would better if there is no external dependency is there but if required we can make use as there is no such other mechanism
Thanks compiling with the mentioned flag solved the issue currently for me - c++ -D__USE_MINGW_ANSI_STDIO=1 -std=gnu++14 -Wall -Werror -ftrack-macro-expansion=0 -Og -g3 -Wall -Werror test15.cpp
I am getting below error when I make use of hhx format but GCC and VS does not states the same: http://rextester.com/YCIM64914 test15.cpp #include <stdint.h> #include <stdbool.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <stdio.h> #include <inttypes.h> #include <errno.h> int main(int argc, char *argv[]) { //printf("%2hhX\n", 250); uint8_t c[80] = {'A' , 'B' , 'C', 'D', 'E', 'F'}; printf( "%hhi", 300 ); int last = 0; sscanf((const char*)c, "%hhX:%hhX:%hhX:%hhX:%hhX:%hhX%n",...
I am getting below error when I make use of hhx format but GCC and VS does not states the same: http://rextester.com/YCIM64914 test15.cpp include <stdint.h> include <stdbool.h> include <string.h> include <stdlib.h> include <ctype.h> include <stdio.h> include <inttypes.h> include <errno.h> int main(int argc, char argv[]) { //printf("%2hhX\n", 250); uint8_t c[80] = {'A' , 'B' , 'C', 'D', 'E', 'F'}; printf( "%hhi", 300 ); int last = 0; sscanf((const char)c, "%hhX:%hhX:%hhX:%hhX:%hhX:%hhX%n", c + 0,...