Re: [ng-spice] Debugging ng-spice
On Fri, Oct 29, 1999 at 10:02:21AM -0700, Anthony Wilson wrote:
> Has anyone been able to or tried to step thru ng-spice to debug it?
Apparently not.
> Well, in trying to do so I am getting a SIGSEGV error in the baseaddr()
> function in resource.c @ line 366. Not sure what is happening here. From
>my
> understanding the SIGSEGV is an "invalid access to storage error". Well, I
> guess I don't really understand what the baseaddr() function is trying to
>do.
> Can I just #def that section out of the code when debugging? I guess I could
> try that.
The segfault is quite deliberate. It lets the OS signal to the app
that it has reached its limits for memory usage. Spice uses it to
measure the data segment it has available. Under non-debugging usage,
the segfault gets caught by the function fault() which returns to the
main loop using a longjmp.
Under the debugger, however, the segfault gets caught by the debugger,
before the app sees it. You can disable the check by setting an
environment variable:
in sh:
SPICE_NO_DATASEG_CHECK=yes
export SPICE_NO_DATASEG_CHECK
(The value actually is not relevant as long as the variable exists)
Hope it helps,
--
Arno
Partial thread listing:
- Re: [ng-spice] Debugging ng-spice, (continued)