Quantcast
Channel: Programmers Heaven Forums RSS Feed
Viewing all articles
Browse latest Browse all 2703

Problem in getting all Section names of Elf File using sprintf()

$
0
0
plz help m only getting one section name from the below code using sprintf
i am working on qt creator ..plz help


QString set;
char xyz[399];
scn = 0 ;
while (( scn = elf_nextscn(e , scn ))!=0)
    {

    if(gelf_getshdr ( scn , &shdr )!=&shdr)
    {
        set="error";

    }


        else if((name = elf_strptr(e , shstrndx , shdr.sh_name))==0)
        {
       

        set="error";
    }
   

sprintf (xyz, " Section %-4.4jd %s \n\n" , ( uintmax_t ) elf_ndxscn(scn), name );

set=xyz;
}

    emit button3Pushed(set);


Viewing all articles
Browse latest Browse all 2703

Trending Articles