From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,9bb6fb2eed1f10c5 X-Google-Attributes: gid111c93,public From: Alex Rhomberg Subject: Re: gdb and 2.2 core dumps (Was: Real programmers can read core dumps?) Date: 1999/05/12 Message-ID: <37395708.A25AEDD@ife.ee.ethz.ch>#1/1 X-Deja-AN: 476954105 Content-Transfer-Encoding: 7bit References: <7ha9l7$vqk$1@nntp6.atl.mindspring.net> Content-Type: text/plain; charset=us-ascii X-Trace: 12 May 1999 12:25:12 +0100, beethoven.ee.ethz.ch Organization: Electronics Lab, ETH Zurich, Switzerland MIME-Version: 1.0 Newsgroups: comp.os.linux.alpha Marshall G. Gates wrote: > > You are correct, there was mention of a patch for gdb, but I can't find my > copy of it anywhere. I did not download it and apply it. Much to my > dismay. > > Oh well. If anyone has it, or has a link to it. Please post it. The problem is, that 2.0 kernels write the timeval with int (32 bit) fields, while 2.1/2.2 kernels write seconds and usecs as long. Nobody (me included) wants to fix gdb so that it knows both types of core files. I used the following hack to make gdb read kernel 2.2 core files. It can't read cores generated by 2.0 anymore in the gdb sources: in bfd/elfcode.h insert struct timeval { long tv_sec; long tv_usec; }; #define _STRUCT_TIMEVAL right between the comments and #include "bfd.h" This did the trick for me with both gdb-4.18 and 4.17 Hope this helps - Alex