Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - gdb error: file format not recognized : (9 Items)
   
gdb error: file format not recognized  
I get the above error on the corefile createdt. This happens when I change the dumper.c to include MAP_ELF (along with 
MAP_STACK) to be included in the corefile

"file" on the corefile gives me a data file 

Any pointers why that would be the case; somehow including MAP_ELF makes gdb believe this is not a corefile ?

Re: gdb error: file format not recognized  
file corefile should show it being an ELF file - you must be messing up 
your corefile generation.

try ntoarm-readelf -l corefile - does that work?

Preeti Sharma wrote:
>
> I get the above error on the corefile createdt. This happens when I 
> change the dumper.c to include MAP_ELF (along with MAP_STACK) to be 
> included in the corefile
>
> "file" on the corefile gives me a data file
>
> Any pointers why that would be the case; somehow including MAP_ELF 
> makes gdb believe this is not a corefile ?
>
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post2549
>

-- 
cburgess@qnx.com

Re: gdb error: file format not recognized  
No...says : 

" Not an elf file it has the wrong magic bytes at the start" 

Thanks 

Preeti
Re: gdb error: file format not recognized  
This diff seems to work.  Note that i had to exclude ldd_infos that 
conflicted with the MAP_ELF sections I was now including.

Preeti Sharma wrote:
>
> No...says :
>
> " Not an elf file it has the wrong magic bytes at the start"
>
> Thanks
>
> Preeti
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post2551
>

-- 
cburgess@qnx.com

Attachment: Text dumper.diff 1.63 KB
Re: gdb error: file format not recognized  
hmm makes sense ...let me try it ...

Preeti
Re: gdb error: file format not recognized  
Hello Colin,

To be able to see globals with the -m option should I not have the check for MAP_ELF before dump_stack_memory instead of
 dump_memory....

Thanks 

Preeti.

Re: gdb error: file format not recognized  
No, MAP_STACK will never also be MAP_ELF - MAP_ELF is only used for 
mapping in the elf segments from your executable/shared libs.

Preeti Sharma wrote:
>
> Hello Colin,
>
> To be able to see globals with the -m option should I not have the 
> check for MAP_ELF before dump_stack_memory instead of dump_memory....
>
> Thanks
>
> Preeti.
>
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post2571
>

-- 
cburgess@qnx.com

Re: gdb error: file format not recognized  
Sorry for the late response .....
Yes gdb does not spew the  file format error any more.

But curiously enough I have no bt when I run with -m option.
I am looking into it... I have an older version of dumper than the one you specified diffs .... checking what else is 
done differently ....

but what I want is to be able to see globals with the -m option specified ...

Preeti 
Re: gdb error: file format not recognized  
MAP_ELF changes seem to work; with the -m option I can see the globals...

Thanks for taking the time ....

Preeti