You can use sprintf (but beware, it is unsafe so obsolete, and you should use snprintf, e.g. snprintf(str, sizeof(str), "%d", a); in your case).
It is just that, because your libc was not compiled with debug information, you cannot step inside the execution of sprintf (except by stepping on individual machine instructions).
The danger of sprintf is well known, it can make a buffer overflow. This is why you should not use it and use snprintf instead (or, if your platform has it and you want a dynamically allocated string, asprintf(3) which is available on most Linux systems).
BTW the Linux man page sprintf(3) explicitly says:
Because sprintf() and vsprintf() assume an arbitrarily long string,
callers must be careful not to overflow the actual space; this is
often impossible to assure. Note that the length of the strings
produced is locale-dependent and difficult to predict. Use
snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).
It is sometimes quite useful to take into account the result of snprintf (which is the number of bytes actually needed for the computed string, which could be larger than the given size limit enforced on the result).