gdb: xxx is not a core dump: File format is ambiguous
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Dear linosaurusroot:
thanks your feedback. I wrote one "hello" program to test gdb, it seams that same error information. I have paste all the information here. Could you help check why? thanks.
xinhua@xinhua-ThinkCentre-M81:~/test$ gcc -Wall -g hello.c -c
xinhua@xinhua-ThinkCentre-M81:~/test$ gdb hello.o hello
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/xinhua/test/hello.o...done.
"/home/xinhua/test/hello" is not a core dump: File format not recognized
Assuming you are successful with the block just above here then your original problem may be to do with how you called gdb or to do with using it on the kernel as opposed to a userspace program.
and actually ./hello must procude a corefile (named core). Using any other file (including any other core file) will give you an error message, the core and app should belong to each other (the name of the corefile is not relevant)
Dear linosaurusroot and pan64:
Thanks your mention. It seams that gdb enviroment is ok. The follow is my new try. But when i use it for android kernel dump. still has issue. And crash tool is ok.
$ ulimit -a
$ gcc -Wall -g hello.c
there is new file a.out
$ ./a.out -> there will be one new file "core"
$ gdb a.out core
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/xinhua/test/a.out...done.
[New LWP 28132]
warning: Can't read pathname for load map: Input/output error.
Core was generated by `./a.out'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000400508 in main () at hello.c:5
5 printf("p=%d\n",*p);
that looks like the normal (expected) behaviour. I can't see your hello.c, but in line 5 printf("p=%d\n",*p); there is an error which caused the segmentation fault. That was reported by gdb.
I do not know what does that warning means:
warning: Can't read pathname for load map: Input/output error.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.