Debug

共 105 篇文章。

David O'Brien to import binutils 2.15

• Development

David O’Brien has just imported binutils 2.15 snapshot into FreeBSD src repository. What’s more, he stated that he will do gdb 6.x import soon. This will drastically improve the debug and development environment in FreeBSD.

参与评论

OpenBSD to adopt gdb 6.1

• Development

It seems (still can’t access to the Internet right now, however, HTTP and cvsup works) that OpenBSD has imported gdb 6.1 into their source tree. I am not sure whether they did some hacks to the source repository (from cvsup result, there is not), but the result is really strange. It seems that the last import was done by using a “cvs add -rCYGNUS” and not “cvs import”…

I hope FreeBSD can import a newer gdb ASAP, as well as gcc 3.4 series.

参与评论

How to debug a live FreeBSD kernel?

• Kernel

To quote Matthew Dillon:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
    You can actually run gdb on a live kernel like this:

    gdb -k /dev/mem /path/to/kernel.debug

    You can then use the 'proc' command to switch to a process (give it a
    pid), and do a stack backtrace.  That part only really works if the
    process is blocked on something (i.e. not running).

    But you can also dig around kernel globals and various data structures
    and that can be quite useful on a live system.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>
参与评论

gcc bug??

• Development

发现VC上面偶尔会用到的const_cast在gcc (c++)里面竟然不能用,郁闷,遂采用C-style cast,但我希望修正这个问题。

参与评论

Resolution of Windows Update 0x80000007d Exception

• Cheatsheets

A Dell Latitude D600 computer with Windows 2003 Server Enterprise Edition is experiencing problem when installing Windows Update from website. By downloading the hotfix, and trying to install it, it fails with “Data Error, 0x8000007d”

阅读全文… ( 本文约 109 字,阅读大致需要 1 分钟 )

FreeBSD LOR page

• Kernel

What’are LORs? To quote Robert Watson:

“These warnings are generated by Witness, a run-time lock diagnostic system found in FreeBSD 5-CURRENT kernels (but removed in releases). You can read more about Witness in the WITNESS(4) man page, which talks about its capabilities. Among other things, Witness performs run-time lock order verification using a combination of hard coded lock orders, and run-time detected lock orders, and generates console warnings when lock orders are violated. The intent of this is to detect the potential for deadlocks due to lock order violations; it’s worth observing that Witness is actually slightly conservative, and so it’s possible to get false positives. In the event that Witness is accurately reporting a lock order problem, it’s basically saying “If you were unlucky, a deadlock would have happened here”. There are a couple of “well known” false positives, which we need to do a better job of documenting to prevent spurious reports. The non-well-known ones typically correspond to bugs in newly added locking, as lock order reversals usually get fixed pretty quickly because Witness is busy generating warnings :-).”

阅读全文… ( 本文约 204 字,阅读大致需要 1 分钟 )

Resuming for P4 HTT issue

• Kernel

I’m going on to track down the Pentium 4 HTT issue of FreeBSD. Currently I have setup a tinderbox (hengdm’s workstation because he is not here :-P and it’s the only box which supports HTT) and compiled a SMP kernel on it.

阅读全文… ( 本文约 87 字,阅读大致需要 1 分钟 )

Beat MSXML's utf-16 cling

• Development

Today I got in a rush to implement a XML+XSL -> HTML translation at server side. I looked at MSDN and found that there is a simple implementation which can fit my requirements, the code is the following (for some reasons I have to use ASP and not .net technologies):

阅读全文… ( 本文约 261 字,阅读大致需要 2 分钟 )