Hello all !
I'm trying to figure out why the fossil-scm compiled with tinycc on arm
doesn't work as expected and again with my previous experience trying to
figure out why tinycc was generating bad code on X86_64 I found that having
function names on the generated .stabs is better than nothing but when we
step through the code with gdb to find bugs it's a pain not been able to
see parameters and local variables values.
I looked at the code and found that maybe would not be so hard to add more
.stabs info in this function:
-----
static void put_func_debug(TCCState* tcc_state, Sym *sym)
{
char buf[512];
/* stabs info */
/* XXX: we put here a dummy type */
snprintf(buf, sizeof(buf), "%s:%c1",
tcc_state->tccgen_funcname, sym->type.t & VT_STATIC ? 'f' :
'F');
put_stabs_r(tcc_state, buf, N_FUN, 0, tcc_state->tccpp_file->line_num,
0,
tcc_state->tccgen_cur_text_section, sym->c);
/* //gr gdb wants a line at the function */
put_stabn(tcc_state, N_SLINE, 0, tcc_state->tccpp_file->line_num, 0);
tcc_state->tccgen_last_ind = 0;
tcc_state->tccgen_last_line_num = 0;
}
-----
But as we was talking on other thread not knowing how the information is
stored in the AST to use it here is sad.
Can someone with more knowledge do this or shed a light here ?
Cheers !
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel