Problem in getting all Section names of Elf File using sprintf()
plz help m only getting one section name from the below code using sprintf
i am working on qt creator ..plz help
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
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);
|
You could start by reproducing the problem in a small program.
How are we to tell what a uintmax_t is or the value of name and eld_ndxscn(scn) are, or if xyz is large enough?
Topic archived. No new replies allowed.