zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "nicolas.canceill" <nicolas.canceill@laposte.net>, zsh-workers@zsh.org
Subject: Re: Logging/debugging from within Src/Zle/compmatch.c
Date: Sun, 08 Jun 2014 14:13:18 -0700	[thread overview]
Message-ID: <140608141318.ZM20482@torch.brasslantern.com> (raw)
In-Reply-To: <24D729FF-77D8-4F38-848B-86920FE1FD11@laposte.net>

On Jun 8, 12:25pm, nicolas.canceill wrote:
}
} Following up on a discussion on zsh-users [1], I wish to try and debug
} the internals of Src/Zle/compmatch.c, but I am not a gdb guru so I
} prefer to log a bunch of stuff from within the C functions. Can anyone
} advise on the best way to do so? Do you think a simple syslog(3) will
} do?

Syslog would certainly do the job, but seems a bit of overkill unless
you're trying to collect logs from several zsh at once to see how they
interact.

I probably didn't understand your question properly before.  I think
what you want is to sprinkle some calls to dputs(ERRMSG(...)) around
the functions you're interested in.

If you do use syslog, using ERRMSG(...) will add helpful stuff like
the file name and line number.

For both dputs and ERRMSG you need to compile with DEBUG defined to the
preprocessor.


  reply	other threads:[~2014-06-08 21:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <33086926-C7D7-4D33-AF86-4B0D48977555@laposte.net>
     [not found] ` <140607105445.ZM24783@torch.brasslantern.com>
     [not found]   ` <E8AF8725-DB8D-4B77-B914-B9823429614E@laposte.net>
     [not found]     ` <140607123006.ZM25086@torch.brasslantern.com>
     [not found]       ` <35EC1DF1-5D60-42CA-93FB-A6400E4308CF@laposte.net>
     [not found]         ` <140607140205.ZM26027@torch.brasslantern.com>
2014-06-08 10:25           ` nicolas.canceill
2014-06-08 21:13             ` Bart Schaefer [this message]
     [not found]             ` <5902E7DB-F4FD-4486-BE0D-14BAA165FCE9@kba.biglobe.ne.jp>
2014-06-09  9:18               ` Weird completion bug in Src/Zle/compmatch.c#bld_line nicolas.canceill
2014-06-09 13:25                 ` Jun T.
2014-06-09 13:27                   ` nicolas.canceill
2014-06-09 15:44                 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=140608141318.ZM20482@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=nicolas.canceill@laposte.net \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).