Re: context.cr2
I still get an error, an error that doesn't mean anything to me. at
zoneminder.com they can't solve my problem. I'm a bit stuck.
this is the original code:
#if HAVE_STRUCT_SIGCONTEXT_EIP
Error(( "Signal address is %p, from %p\n", context.cr2, context.eip ));
trace_size = backtrace( trace, 16 );
// overwrite sigaction with caller's address
trace[1] = (void *)context.eip;
#elif HAVE_STRUCT_SIGCONTEXT
Error(( "Signal address is %p, no eip\n", context.cr2 ));
the modified code looks like this:
#if HAVE_STRUCT_SIGCONTEXT_EIP
Error(( "Signal address is %p, from %p\n",
context.pt_regs->dar, context.pt_regs->nip ));
trace_size = backtrace( trace, 16 );
// overwrite sigaction with caller's address
trace[1] = (void *)context.pt_regs->nip;
#elif HAVE_STRUCT_SIGCONTEXT
Error(( "Signal address is %p, no eip\n", context.pt_regs->dar));
this is the error:
zm_jpeg.c:392: warning: assignment discards qualifiers from pointer target type
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/include
-g -O2 -MT zm_regexp.o -MD -MP -MF ".deps/zm_regexp.Tpo" -c -o
zm_regexp.o zm_regexp.cpp; \
then mv -f ".deps/zm_regexp.Tpo" ".deps/zm_regexp.Po"; else rm
-f ".deps/zm_regexp.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/include
-g -O2 -MT zm_signal.o -MD -MP -MF ".deps/zm_signal.Tpo" -c -o
zm_signal.o zm_signal.cpp; \
then mv -f ".deps/zm_signal.Tpo" ".deps/zm_signal.Po"; else rm
-f ".deps/zm_signal.Tpo"; exit 1; fi
zm_signal.cpp: In function 'void zm_die_handler(int, sigcontext)':
zm_signal.cpp:95: error: 'struct sigcontext' has no member named 'pt_regs'
make[1]: *** [zm_signal.o] Error 1
make[1]: Leaving directory `/var/www/ZoneMinder-1.22.2/src'
make: *** [install-recursive] Error 1
I hope this can help...
thanks
Kasper
On 6/8/06, Gabriel Paubert <paubert@iram.es> wrote:
On Wed, Jun 07, 2006 at 03:31:04PM +0200, Kasper Jordaens wrote:
> I still get an error when compiling, but when I totally remove the
> reference, it compiles without error?? although the app doens' run and
> complains about
> [Restarting capture daemon for Cam1, shared memory not valid]
>
>
> that could be the lowlevel stuff right?
>
> tnx for helping, maybe I should ask zoneminder developer.
>
> zm_signal.cpp: In function 'void zm_die_handler(int, sigcontext)':
> zm_signal.cpp:95: error: base operand of '->' has non-pointer type
> 'sigcontext'
> make[1]: *** [zm_signal.o] Error 1
> make[1]: Leaving directory `/var/www/ZoneMinder-1.22.2/src'
Duh, my fault, sorry. I wrote it backwards, swapping the "." and
"->" operators. It should read:
context.pt_regs->nip and context.pt_regs->dar
Gabriel
Reply to: