Date: Thu, 22 Dec 1994 01:29:02 +1100 (EDT) From: "Gasparovski / Daniel (ISE)" <u923168@student.canberra.edu.au> To: freebsd-hackers@freebsd.org Subject: ktrace Message-ID: <Pine.SOL.3.91.941222003717.24265A-100000@student>
next in thread | raw e-mail | index | archive | help
Hi all. I have a problem: ktrace sucks :) When trying to debug apps (well, not really "debug", just figure out why they don't work) ktrace doesn't give enough info. For example, I want to know why XYZ doesn't want to connect to a host. ktrace gives me: ... 1764 xyz CALL connect(0x4,0xefbfd8fc,0x10) 1764 xyz RET connect -1 errno 61 Connection refused ... This tells me nothing that the error printed on the screen couldn't. Which address/port did it try to connect to? So, now I have to edit the sources and put a few printf's in, or whip out gdb etc. Sometimes, even these aren't an option. I'd like to see ktrace act little more like "strace", which is available on Sun's and Linux I beleive. strace in this case would have shown: ... connect(4, AF_INET(20480, 127.0.0.1), 16) = -1 (Connection refused) ... aha! It should be trying to connect to port 80, but this suggests a missing ntohs. Also, this has a nice "C code" feel to it, which although neat, isn't THAT important. So a few questions: 1) is there any reason that ktrace can't do this? (other than lack of time to implement) 2) Is there any reason strace can't be ported to FreeBSD? (ditto) Thanks. Dan ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.91.941222003717.24265A-100000>