`type' built-in command in /bin/sh
Hello there. I just hit into "problem" that built-in sh command type outputs to stdout when error occurs. I mean it returns non-0 status, but outputs to stdout! I think stderr has been made exactly for such purposes and `type' should use it in case of error .. what do you think? thanks -- lg ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
5.3 release snd_ich strange behaviour
I've installed 5.3-RELEASE recently and pretty happy with it. But i've noticed some strange behaviour. I've added snd_ich_load="YES" to my /boot/loader.conf to enable sound in boot time. Reboot machine and everything was working ok. But then i noticed that cooler on my notebook starts more often then without snd_ich. Running top shows that machine is about 15-20% in interrupts. Unloading snd_ich makes top showing interrups about 0-1%. Then i loaded snd_ich by hand (kldload snd_ich) and the problem dissapeared, top shows 0-1% and cooler starts as without snd_ich. I commented this string in /boot/loader.conf and rebooted the machine. Then load snd_ich by hand. Everything is ok! I assumed that it was some strange thing and uncommented string in loader.conf and rebooted. The situation with 15-20% inturrupts repeeted! However kldunload & kldload resolves it. So the only suitable solution for me was to load snd_ich using rc.d Thanks! PS: I have iRU intro 1214 notebook with acpi enabled. -- lg ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Stripping symbol names from /kernel
Vlad GALU <[EMAIL PROTECTED]> writes: > Is there any way to do that without affecting anything ? I'd like to > remove that information. Some people might find it interesting ... > I suspect that kvm will not work without symbols. > > If it's there, and you can see it, it's real. > If it's not there, and you can see it, it's virtual. > If it's there, and you can't see it, it's transparent. > If it's not there, and you can't see it, you erased it. -- lg ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Looking for static analysis tool to generate call graphs
Robert Watson <[EMAIL PROTECTED]> writes: > Well, using a scary combination of grep, awk, a long list of "omit this" > regexp's, and prcc from cflow, I got the following: > > http://www.watson.org/~robert/freebsd/20040302-sockets.ps Actually it looks kind a mess. Maybe use dot's clustering or ranking to organize callgraph a little? like this: Clustering output: digraph cg { a -> b; b->c; a->c; c->d; a->d; subgraph "cluster_one.c" { label="one.c"; a; b;}; subgraph "cluster_two.c" { label="two.c"; c; d;} } Layered output: digraph cg { a -> b; b->c; a->c; c->d; a->d; { rank = same; a; c; } { rank = same; b; d; } } So soXXX functions may be with same rank, also some high level functions such as `accept', `listen', `send', etc may have same rank, so callgraph will look like subroutine was designed on paper. Unfortunately there is no way in dot to use clustering and ranking for same node :(. -- lg ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Looking for static analysis tool to generate call graphs
Robert Watson <[EMAIL PROTECTED]> writes: > I'd like to generate static call graphs from sections of src/sys/kern, > src/sys/net, and src/sys/netinet, and ideally, get an output that looks > pretty when printed to a (perhaps large) piece of paper. It doesn't need > to be able to handle function pointer magic in structures (vnode > operations, socket operations, file descriptor operations, sysinits, etc); > I just want a fairly high-level graph to get a feel for particular chunks > of code spanning a couple of C files. Anyone have any recommendations? > Preferably something that can actually parse the variant of C we use in > our kernel :-). > I used patch to gcc to output call graph in dot format based on parse tree generated by gcc year or so ago. It was pretty nice, but I dont awared is this patch yet supported or not. You can find some info about it at http://luxik.cdi.cz/~devik/mm.htm > Thanks, > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > [EMAIL PROTECTED] Senior Research Scientist, McAfee Research > > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" -- lg ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: how to fool gcc?
Zajcev Evgeny <[EMAIL PROTECTED]> writes: > > Maybe just have copy of `s' inside while statement? Something like: > >> #define RETURNS(s) do { \ >> if ((s) == NULL) \ >> openpam_log(PAM_LOG_DEBUG, "returning NULL"); \ >> else \ >> openpam_log(PAM_LOG_DEBUG, "returning '%s'", (s)); \ >> return (s); \ >> } while (0) err, I mean #define RETURNS(s) do { \ char *scpy = s; \ if ((s) == NULL) \ openpam_log(PAM_LOG_DEBUG, "returning NULL"); \ else \ openpam_log(PAM_LOG_DEBUG, "returning '%s'", (scpy)); \ return (s); \ } while (0) -- lg ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: how to fool gcc?
[EMAIL PROTECTED] (Dag-Erling SmЬrgrav) writes: > I'm having trouble with some uncommitted OpenPAM patches that I'd like > to get into the tree. The problem actually doesn't occur with a > normal build, but it prevents me from building a debugging version of > libpam. > > Part of the patch declares openpam_log(3) as printf-like so gcc can > check format strings etc. However, openpam_log(3) is also used in > debugging macros such as this: > > #define RETURNS(s) do { \ > if ((s) == NULL) \ > openpam_log(PAM_LOG_DEBUG, "returning NULL"); \ > else \ > openpam_log(PAM_LOG_DEBUG, "returning '%s'", (s)); \ > return (s); \ > } while (0) > > The problem is that when it encounters RETURNS(NULL), gcc complains > that I'm passing a NULL argument to printf(3), even though it should > be obvious that I'm not: > Maybe just have copy of `s' inside while statement? Something like: > #define RETURNS(s) do { \ > if ((s) == NULL) \ > openpam_log(PAM_LOG_DEBUG, "returning NULL"); \ > else \ > openpam_log(PAM_LOG_DEBUG, "returning '%s'", (s)); \ > return (s); \ > } while (0) -- lg ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"