🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1860

Re: Does someone have generic debugging tips for GCC

#1860
From: John Bunda
Date: Fri, 21 Oct 1988 04:56
19 lines
1391 bytes
This question has come up several times now.  I had emailed some
replies to these, thinking it wasn't general interest, but it seems...

The function debug_rtx() takes an rtx argument.  If you are using a
reasonable debugger (viz gdb), you should be able to muck around and find some
rtx that seems responsible for a particular problem (hint - the name
insn comes up a lot!).  In gdb you can then type "print debug_rtx(insn)"
for example to see a nice rtl display of the object.

If you don't have a decent debugger, replace the abort() that is 
forcing the dump with an appropriate call to debug_rtx().
(in fact, i might be so bold as to suggest a #ifdef DEBUGGING
or some such to have this option there all the time...)

-John
-- 
...................................
John Bunda            UT CS Dept.      
bunda@cs.utexas.edu   Austin, Texas    
Technical Details
Message-ID: <3657@cs.utexas.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bbn!rochester!cornell!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!bunda
References: <8810160734.AA04408@iwarpo3.intel.com> <8810191949.AA04017@hobbes.ai.mit.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bbn!rochester!cornell!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!bunda
From: bunda@cs.utexas.edu (John Bunda)
Newsgroups: gnu.gcc.bug
Subject: Re: Does someone have generic debugging tips for GCC
Summary: how about debug_rtx() ?
Message-ID: <3657@cs.utexas.edu>
Date: 21 Oct 88 04:56:53 GMT
References: <8810160734.AA04408@iwarpo3.intel.com> <8810191949.AA04017@hobbes.ai.mit.edu>
Distribution: gnu
Organization: U. Texas CS Dept., Austin, Texas
Lines: 17