stmhal: Use gc_dump_info() function instead of adhoc code.