public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* debugging help?
@ 2001-05-08  9:49 lehotsky
  2001-05-08 10:08 ` Frank Ch. Eigler
  2001-05-08 16:33 ` Ben Elliston
  0 siblings, 2 replies; 6+ messages in thread
From: lehotsky @ 2001-05-08  9:49 UTC (permalink / raw)
  To: cgen

the cgen code doesn't seem to issue very useful error messages.

Any suggestions on how to track down this problem?


cgen -s /export/home/lehotsky/basel/sim/tpc/../../cgen/cgen-sim.scm -s /export/home/lehotsky/basel/sim/tpc/../../cgen -v -f with-profile=fn -m tpc -a tpc -i all -C tmp-cpu.h1 -U tmp-cpu.c1 -M tmp-mod.c1 -S tmp-sem.c1 -T tmp-dec.h1 -D tmp-dec.c1 -S tmp-sem.c1 
Setting option `with-profile' to "fn".
Loading cpu file /export/home/lehotsky/basel/sim/tpc/../../cgen/tpc.cpu ...
Including file simplify.inc ...
Processing cpu file /export/home/lehotsky/basel/sim/tpc/../../cgen/tpc.cpu ...
Generating tpcbf cpu.h ...
Analyzing instruction set ...
Done analysis.
Computing sformat argument buffers ...
ERROR: bad bitsize argument to gen-ifetch 4
No backtrace available.
make[1]: *** [cgen-cpu-decode] Error 1

======

I looked at the theory that maybe one of my instruction
defines didn't describe a "32 bit" instruction.  But every one of
them lays out the full 32 bits of each fixed-length instruction.

-- Al

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: debugging help?
  2001-05-08  9:49 debugging help? lehotsky
@ 2001-05-08 10:08 ` Frank Ch. Eigler
  2001-05-08 16:33 ` Ben Elliston
  1 sibling, 0 replies; 6+ messages in thread
From: Frank Ch. Eigler @ 2001-05-08 10:08 UTC (permalink / raw)
  To: lehotsky; +Cc: cgen

Hi -

On Tue, May 08, 2001 at 12:41:50PM -0400, lehotsky@earthlink.net wrote:
: the cgen code doesn't seem to issue very useful error messages.

Yes, this happens often.


: Any suggestions on how to track down this problem?
: [...]
: ERROR: bad bitsize argument to gen-ifetch 4
: No backtrace available.
: [...]

Yes.  Build yourself a copy of guile configured with "--enable-debug",
and run cgen with CGENFLAGS including "-b" (enable backtrace), and
probably with more "-v" (increase verbosity) flags.


- FChE
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6+CezVZbdDOm/ZT0RAnLQAJ0ToN1TWVo8N2s7M18AxKeikoQTtgCeOEiV
iROUkPS8A41bhm/uAcRhZF8=
=YtV3
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: debugging help?
  2001-05-08  9:49 debugging help? lehotsky
  2001-05-08 10:08 ` Frank Ch. Eigler
@ 2001-05-08 16:33 ` Ben Elliston
  2001-05-08 16:36   ` Marc Esipovich
  2001-05-08 17:12   ` Alan Lehotsky
  1 sibling, 2 replies; 6+ messages in thread
From: Ben Elliston @ 2001-05-08 16:33 UTC (permalink / raw)
  To: lehotsky; +Cc: cgen

>>>>> "lehotsky" == lehotsky  <lehotsky@earthlink.net> writes:

  lehotsky> the cgen code doesn't seem to issue very useful error messages.
  lehotsky> Any suggestions on how to track down this problem?

I see Frank has already answered, this, however ..

  lehotsky> Computing sformat argument buffers ...
  lehotsky> ERROR: bad bitsize argument to gen-ifetch 4
  lehotsky> No backtrace available.
  lehotsky> make[1]: *** [cgen-cpu-decode] Error 1

It so happens that I recognise this one.  It is often caused by
instruction formats (the "(+ ...)" clause) missing one or more
bits--or containing overlapping ifields.

Ben

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: debugging help?
  2001-05-08 16:33 ` Ben Elliston
@ 2001-05-08 16:36   ` Marc Esipovich
  2001-05-08 20:16     ` Ben Elliston
  2001-05-08 17:12   ` Alan Lehotsky
  1 sibling, 1 reply; 6+ messages in thread
From: Marc Esipovich @ 2001-05-08 16:36 UTC (permalink / raw)
  To: cgen

 .------[ Ben Elliston wrote (Wed, May 09, 2001 at 09:33:19AM +1000) ]------
 | 
 |    lehotsky> Computing sformat argument buffers ...
 |    lehotsky> ERROR: bad bitsize argument to gen-ifetch 4
 |    lehotsky> No backtrace available.
 |    lehotsky> make[1]: *** [cgen-cpu-decode] Error 1
 |  
 |  It so happens that I recognise this one.  It is often caused by
 |  instruction formats (the "(+ ...)" clause) missing one or more
 |  bits--or containing overlapping ifields.
 |  
 `-------------------------------------------------

 Hi,

	It would be really cool if you guys could construct a list of
such errors and possible fixes/solutions, since some of this stuff
can be a little on the non-trivial side for beginners w/ cgen and guile...


	bye,
		Marc.

-- 
marc @ corky.net

fingerprint = D1F0 5689 967F B87A 98EB  C64D 256A D6BF 80DE 6D3C

          /"\
          \ /     ASCII Ribbon Campaign
           X      Against HTML Mail
          / \

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: debugging help?
  2001-05-08 16:33 ` Ben Elliston
  2001-05-08 16:36   ` Marc Esipovich
@ 2001-05-08 17:12   ` Alan Lehotsky
  1 sibling, 0 replies; 6+ messages in thread
From: Alan Lehotsky @ 2001-05-08 17:12 UTC (permalink / raw)
  To: Ben Elliston; +Cc: lehotsky, cgen

At 9:33 AM +1000 5/9/01, Ben Elliston wrote:

> >>>>> "lehotsky" == lehotsky  <lehotsky@earthlink.net> writes:
>
>  lehotsky> the cgen code doesn't seem to issue very useful error messages.
>  lehotsky> Any suggestions on how to track down this problem?
>
>I see Frank has already answered, this, however ..
>
>  lehotsky> Computing sformat argument buffers ...
>  lehotsky> ERROR: bad bitsize argument to gen-ifetch 4
>  lehotsky> No backtrace available.
>  lehotsky> make[1]: *** [cgen-cpu-decode] Error 1
>
>It so happens that I recognise this one.  It is often caused by
>instruction formats (the "(+ ...)" clause) missing one or more
>bits--or containing overlapping ifields.
>
>Ben


	And you're right.  I had looked at all my (+ ....) patterns and discovered that
	I had entered the SAME field twice!  If I was a "schemer" (or a conniver - sorry, old
	MIT joke....), I'd try to write code that would identify that case and issue a better warning
	message.

	Frankly, I like the cgen "language", but the error diagnostics REALLY are terrible.
	It takes a lot of fumbling around to figure out what it's really complaining about most of the
	time.....

-- Al
-- 
------------------------------------------------------------------------

		    Quality Software Management
		http://home.earthlink.net/users/~qsmgmt
			apl@alum.mit.edu
			(978)287-0435 Voice
			(978)808-6836 Cell
			(978)287-0436 Fax

	Software Process Improvement and Management Consulting
	     Language Design and Compiler Implementation

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: debugging help?
  2001-05-08 16:36   ` Marc Esipovich
@ 2001-05-08 20:16     ` Ben Elliston
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Elliston @ 2001-05-08 20:16 UTC (permalink / raw)
  To: Marc Esipovich; +Cc: cgen

>>>>> "Marc" == Marc Esipovich <marc@corky.net> writes:

  Marc> 	It would be really cool if you guys could construct a list of
  Marc> such errors and possible fixes/solutions, since some of this stuff
  Marc> can be a little on the non-trivial side for beginners w/ cgen and guile...

I think we'd be better expending any effort on producing better error
messages.  If you encounter such errors, please post them along with a
test case (if you can) and we can try and enhance the error reporting.

Ben

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-05-08 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-08  9:49 debugging help? lehotsky
2001-05-08 10:08 ` Frank Ch. Eigler
2001-05-08 16:33 ` Ben Elliston
2001-05-08 16:36   ` Marc Esipovich
2001-05-08 20:16     ` Ben Elliston
2001-05-08 17:12   ` Alan Lehotsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).