Re: DTrace/FreeBSD source snapshot

From: Andrew Pogrebennyk <marduk_at_portaone.com>
Date: Sun, 03 Feb 2008 13:21:31 +0200
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 
/usr/src/sys/modules/dtrace/dtrace/../../../contrib/opensolaris/uts/common/dtrace/dtrace.c:121:
/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/dtrace_debug.c: 
In function 'dtrace_debug_lock':
/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/dtrace_debug.c:73: 
warning: implicit declaration of function 'dtrace_cmpset_long'
/usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/dtrace_debug.c:73: 
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'.

-- 
Sincerely,
Andrew Pogrebennyk

Received on Sun Feb 03 2008 - 10:21:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:26 UTC