Thanks, setting a breakpoint at exit allowed me to get a stacktrace
which told me that
the function called before exit is xerbla_ in the dynamic library
liblapack.so.
So the LD_PRELOAD trick may work.  I can't seem to get it to work with
sage yet though.

Is there a similar command to LD_PRELOAD available on OSX. The basic
question is suppose you have a dynamic library  that has some function
f. Suppose you want to change the behaviour of f. Is there a way to
write a replacement  my_f and make sure that whenever f would be
called, my_f is called instead. LD_PRELOAD on linux accomplishes this.

 
Josh


On Jun 5, 8:43 am, "Justin C. Walker" <[EMAIL PROTECTED]> wrote:
> On Jun 5, 2007, at 01:18 , Joshua Kantor wrote:
>
>
>
> > Thanks, I had forgot about that sort of thing and  it might work. I'm
> > not sure because some of the libraries linked in are static.
>
> >  My python module links against libsuperlu.a  which  is static which
> > links against libblas. Because
> > libsuperlu.a is static I'm not sure whether the static or dynamic
> > version of libblas is linked against.
>
> > A followup question. I want to find the exact name of the function
> > that calls exit, however I can't figure
> > out how to make gdb tell me that because the program doesn't crash it
> > exits normally. Anyone know a way
> > to find the name of the last function called before a program exits.
>
> If it exits normally, it should pass through "exit()", I think.  A
> breakpoint there should tell you what the call stack looks like
> (although it may not set up the stack correctly for full symbolic
> debugging).
>
> I didn't fully grok your original question, but does "atexit()" help
> there?
>
> Justin
>
> --
> Justin C. Walker, Curmudgeon-At-Large
> Institute for the Enhancement of the Director's Income
> --------
> Experience is what you get
>    when you don't get what you want.
> --------


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to