Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Logging/debugging from within Src/Zle/compmatch.c
- X-seq: zsh-workers 32752
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "nicolas.canceill" <nicolas.canceill@xxxxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: Logging/debugging from within Src/Zle/compmatch.c
- Date: Sun, 08 Jun 2014 14:13:18 -0700
- In-reply-to: <24D729FF-77D8-4F38-848B-86920FE1FD11@laposte.net>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <33086926-C7D7-4D33-AF86-4B0D48977555@laposte.net> <140607105445.ZM24783@torch.brasslantern.com> <E8AF8725-DB8D-4B77-B914-B9823429614E@laposte.net> <140607123006.ZM25086@torch.brasslantern.com> <35EC1DF1-5D60-42CA-93FB-A6400E4308CF@laposte.net> <140607140205.ZM26027@torch.brasslantern.com> <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author