DTrace/FreeBSD source snapshot

Andrew Pogrebennyk marduk at portaone.com
Sun Feb 3 03:21:12 PST 2008

John Birrell wrote:
> On Sat, Feb 02, 2008 at 03:28:43PM +0200, Andrew Pogrebennyk wrote:
>> In these lines we are trying to case pointer to struct trapframe to 
>> pointer to u_char like:
>> frame->tf_eip += dtrace_instr_size((u_char *) frame->tf_eip);
>> What do i do to get it to work?
> Looks like I'm missing:
> #include <machine/frame.h>

Thanks. Attached patch summarizes what I've done so far on i386 for 
compilation to succeed. But one thing remains unresolved:

cc1: warnings being treated as errors
In file included from 
In function 'dtrace_debug_lock':
warning: implicit declaration of function 'dtrace_cmpset_long'
warning: nested extern declaration of 'dtrace_cmpset_long'
*** Error code 1

I see that in dtrace_debug.c definition of dtrace_cmpset_long() is 
enclosed in #if defined(__amd64__) and there is no such definition for 
i386. If I make gcc ignore errors, the kernel does not boot: it 
complains on unresolved symbol 'dtrace_cmpset_long'.

Andrew Pogrebennyk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i386.patch
Type: text/x-patch
Size: 1331 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20080203/961d1eda/i386.bin

More information about the freebsd-current mailing list