Best way to inspect the parse tree from Sparse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I would like to understand the structure of the parse tree generated
by Sparse a bit better. I am looking at the output from the show_*()
functions but it is not clear to me exactly what the output means. For
example:

extern int printf(const char *, ...);

int main(int argc, const char *argv[]) {
printf("hello world!\n");
return 0;
}

Results in:

.align 4
int extern [signed] [addressable] [toplevel] main( ... )
        movi.64         v2,&"hello world!\n"
        push.64         v2
        call            printf
        add.64          vSP,vSP,$8
        mov.32          v3,retval
        movi.32         v4,$0
        addi.64         v5,vFP,$offsetof(return:00000202755B1A98)
        st.32           v4,[v5]
        ret             (00000202755B1A98)
.L00000202755B1A98:
        addi.64         v6,vFP,$offsetof(return:00000202755B1A98)
        ld.32           v7,[v6]
        mov.32          retval,7
        ret


I get the first four lines, but the rest don't make sense to me. I
suppose that the dump is trying to show the parse tree in a linear
form ...  but is that useful? Would it be better to dump the parse
tree in a different form?

Regards
Dibyendu
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux