bug-ddd
[Top][All Lists]
Advanced

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

Re: debugin perl under debian not working


From: T.Pospisek's MailLists
Subject: Re: debugin perl under debian not working
Date: Mon, 30 Apr 2001 13:09:47 +0200 (CEST)

On Mon, 30 Apr 2001, Andreas Zeller wrote:

> T.Pospisek's writes [translated by me -AZ]:
>
> > Whenever I write
> >
> >     $ cat /tmp/nix.pl
> >     #!/usr/bin/perl
> >
> >     print "Hello wordl\n";
> >
> >     $ ddd /tmp/nix.pl
> >
> > I have no effect.

[reduced to the bone :-)]

> Your `~/.ddd/log' tells me that your Perl prompt is enclosed in
> control characters (\001 and \002, as shown in the log):

These control characters make the prompt look underlined. So when I run
perl -d /tmp/nix.pl the prompt looks like this (replace the -- by
an underline):

  DB<1>
--------

> <- "main::(src/debian/dpkg-shlibdeps.pl:6):\n"
>    "6:\t$dpkglibdir=\"/usr/lib/dpkg\";\n"
> <- "\001\002  DB<1> \001\002"
> !  Interrupt
>
> I can easily setup a future DDD version to handle this.  Before I do
> this, though, I must make sure that this is not an isolated problem:
>
> * Please check whether you have any customized perl settings.  (Is
>   there some `.perlrc' file or likewise?)

No there's nothing of that sort I'm aware of - I have copied

        /usr/lib/perl/5.6.0/Config.pm

to http://sourcepole.ch/about_us/tpo/Config.pm. That's about the only
config file of any sort I can see - it comes per default with Debian's
version of Perl.

> * Please send me your environment settings, as obtained by the
>   `env' command.  Most important are the terminal settings, as well
>   as any Perl-specific environment variables.

PWD=/mnt/hda3/home/tpo
LTDL_LIBRARY_PATH=/mnt/hda3/home/tpo/.kde/lib:/usr/lib
XAUTHORITY=/home/tpo/.Xauthority
PAGER=exec /usr/bin/pager -s -q
HZ=100
HOSTNAME=tpo2
LD_LIBRARY_PATH=/mnt/hda3/home/tpo/.kde/lib:/usr/lib
CLASSPATH=/usr/lib/java/jre/lib/rt.jar:.
USER=tpo
LS_COLORS=no=00:fi=00:di=01;37:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jpg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.png=01;35:*.mpg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:
MACHTYPE=i386-pc-linux-gnu
KDE_MULTIHEAD=false
MAIL=/var/spool/mail/tpo
CVS_RSH=ssh
GTK_RC_FILES=/etc/gtk/gtkrc:/home/tpo/.gtkrc:/home/tpo/.gtkrc-kde
LANG=C
COLORTERM=
WINDOW_MANAGER=/usr/bin/enlightenment
DISPLAY=:0
LOGNAME=tpo
SHLVL=5
HUSHLOGIN=FALSE
SESSION_MANAGER=local/tpo2:/tmp/.ICE-unix/408
SHELL=/bin/bash
HOSTTYPE=i386
address@hidden:/usr/local/cvsroot
QT_XFT=0
OSTYPE=linux-gnu
TERM=xterm
HOME=/home/tpo
PATH=/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/X11R6/bin/:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/X11R6/bin/:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
SmallEiffel=/usr/lib/smalleiffel/sys/system.se
_=/usr/bin/env

But I **guess** the problem might be that perl -d somehow queries the
terminal type and when it has suffucient capabilities it does underlines.
So **maybe** you need to let perl know not to add terminal candy?

>From the perldebug manpage:

       `pager'     Program to use for output of pager-piped com-
                   mands (those beginning with a `|' character.)
                   By default, `$ENV{PAGER}' will be used.
                   Because the debugger uses your current termi-
                   nal characteristics for bold and underlining,
                   if the chosen pager does not pass escape
                   sequences through unchanged, the output of
                   some debugger commands will not be readable
                   when sent through the pager.

You can see, that I have PAGER set in my environment. But even if I "unset
PAGER; export PAGER" the (bad) behaveour of ddd doesn't change.

But further down the perldebug manpage says:

       `ornaments' Affects screen appearance of the command line
                   (see the Term::ReadLine manpage).  There is
                   currently no way to disable these, which can
                   render some output illegible on some displays,
                   or with some pagers.  This is considered a
                   bug.

If I set "TERM=dumb; export TERM" then "perl -d /tmp/nix.pl" will *not*
display the underline any more nor any bold stuff. But "ddd /tmp/nix.pl"
will still do it.

The same happens when I set:

        $ cat ~/.perldb
        parse_options("ornaments=0");

In this case as well "perl -d /tmp/nix.pl" will *not* display the
underline, but ddd will...

So I guess you somehow need to correctly set the terminal type for "perl
-d" inside ddd. OK, this is speculation, since I don't know anything about
perl nor ddd internals... but I guess we're on the right track here...

Greets & thanks,
*t

----------------------------------------------------------------------------
             Tomas Pospisek
             SourcePole   -  Linux & Open Source Solutions
             http://sourcepole.ch
             Elestastrasse 18, 7310 Bad Ragaz, Switzerland
             Tel: +41 (81) 330 77 11
----------------------------------------------------------------------------





reply via email to

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