[fixed] gdb error: "/home/wk/core.29168" is not a

Need help with C, C++, perl, python, etc?

[fixed] gdb error: "/home/wk/core.29168" is not a

Postby WK1 » 2007-02-19 22:45

gdb is giving me the error message: "/home/wk/core.29168" is not a core dump: File format not recognized

Here is what I'm doing:
I'm trying to debug a segmentation fault in chromium. I'm not the official maintainer of chromium, but I like the game.

I apt-getted the source, gave myself infinite lives (so I could crash the game before I die) and replaced -O2 with -g. And I enabled core dumps with ulimit. The package built fine, and I can play the game. And it still seg faults. And, it gives me a core dump. So far, so good.

At the command line, I run:
Code: Select all
$gdb chromium core.29168

core.29168 is the name of the file that chromium dumps. gdb gives me the error I mentioned above. Anyone know why this is, and how I can fix it?

I've tried upgrading gdb to unstable. It upgraded fine, but I still get this message.

Update: I have a bit to add.

I've core dumped chromium two more times. I get this error every time I try to load the dumps into gdb. Each of the dumps are the exact same size. And the "file" command seems to agree they that are indeed core dumps.

Here is the output of file:
Code: Select all
$file core*
core.2622:  ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style, from 'chromium'
core.29168: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style, from 'chromium'
core.29236: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style, from 'chromium'


gdb works fine when I examine a core from a simpler file, such as a "Hello, Core dump!" type file I was experimenting with earlier.

Update #2: Fixed it.

A tutorial I read said that "ulimit -c <x>" enables core dumps and sets limit. This is correct. It said that <x> was measured in megabytes. This is not correct. It recommended <x> be 1024, for a ridiculously high 1 GB limit. But, <x> is actually measured int 512-byte chunks. I ran the command "ulimit -c unlimited", then redumped chromium, and this solved the problem.
WK1
 
Posts: 25
Joined: 2006-10-29 20:10

Return to Programming

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable