ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] (no subject)


From: Rupert
Subject: Re: [RP] (no subject)
Date: Wed Nov 20 05:04:02 2002

On 20 Nov 2002 00:46:36 -0800
Shawn Betts <address@hidden> wrote:

> address@hidden writes:
> 
> > I'm trying to debug ratpoison from the debian archive
> > (ratpoison-1.2.0.cvs.20020425-3) on a
> > 
> >   SunOS cent1 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-4
> 
> I have ratpoison compiled for:
> 
> SunOS fraser 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-4
> 
> and I have no problems.
> 
> Have you compiled with debugging symbols?

I have now :)

> Also, as Gergely recommended, compile with --enable-debug and you'll
> get ratpoison debugging output.

Actually this was the problem: it worked without --enable-debug but
segfaulted with it.

> This can help you find out where in the source it fails. Can you
> post the debugging output?

The problem seems to be that PRINT_DEBUG can't handle NULL strings on
this platform for some reason. For example, if I put this at the top
of main.c:

  PRINT_DEBUG("Test null: '%s'", (char*) NULL);

then it segfaults thusly:

ratpoison:debug -- main.c:main():458: Test null: 'Segmentation Fault  

It was actually failing on the PRINT_DEBUG in actions.c:command() for
commands without arguments.

An ugly fix is

--- actions.c.orig      Wed Nov 20 12:48:25 2002
+++ actions.c   Wed Nov 20 12:45:45 2002
@@ -878 +878 @@
-  PRINT_DEBUG ("cmd==%s rest==%s\n", cmd, (char*) rest);
+  PRINT_DEBUG ("cmd==%s rest==%s\n", cmd, rest ? (char*) rest : "");

but I don't know if this may be a problem elsewhere in the code.

Rupert



reply via email to

[Prev in Thread] Current Thread [Next in Thread]