debug_stubs and gcov: Refactor and add support for RISCV (v4.4) See merge request espressif/esp-idf!17068