Article View: gnu.gcc.bug
Article #1831Re: Does someone have generic debugging tips for GCC
From: randy
Date: Wed, 19 Oct 1988 05:49
Date: Wed, 19 Oct 1988 05:49
22 lines
1714 bytes
1714 bytes
When debugging gcc, I have almost always managed to get the uid of
the rtl which causes the abort (by going up a couple of stack frames
and doing a pr). With this, the rtl dumps are very valuable; you
simply search for the insn uid of the deadly rtl in the dump from
the last pass before the crash. Usually, this will show you which
part of the md file is screwing up (eg. this piece of rtl *should*
match this define_insn, but it doesn't. Why not?). In your case,
insn_extract is called with a specific instruction. Work out
which define_insn in the machine description it matches, and look at
it. A careful comparision of the insn insn_extract is called with
vs. the one in the machine description is matches will usually show
you the problem. (Are any of these suggestions useful?)
I will say that debugging gcc is harder than debugging any other
program I've worked with (for the reasons you've mentioned).
However, this strikes me as reasonable for a program of the
complexity of an optimizing C compiler. In fact, I think gcc is
extremely cleanly written, and as a result it is much easier to
debug than a less cleanly written optimizing compiler.
-- Randy
Technical Details
Message-ID:
<8810191949.AA04017@hobbes.ai.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!WHEATIES.AI.MIT.EDU!randyReferences:
<8810160734.AA04408@iwarpo3.intel.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!WHEATIES.AI.MIT.EDU!randy From: randy@WHEATIES.AI.MIT.EDU Newsgroups: gnu.gcc.bug Subject: Re: Does someone have generic debugging tips for GCC Message-ID: <8810191949.AA04017@hobbes.ai.mit.edu> Date: 19 Oct 88 05:49:23 GMT References: <8810160734.AA04408@iwarpo3.intel.com> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 21