Nida M | 8 Mar 11:33 2007
Picon

problem in try..throw..catch related C++ test scenarios on MIPS arch with Netbsd 3.0

Hi, All

I am trying to execute c++ testcase, which is using
{try..throw..catch} exception mechanism in MIPS arch. but when
exception has been thrown, it has not been caught by {catch} block and
giving Abort .(SIGABRT)

I need help to debug this problem.

I think problem is with respect to (netbsd 3.0/rtld) dynamic linker,
becose with statically link binary below program (test.cc) is working
fine, but with shared link binary it is giving SIGABRT.

Any problem in {try..throw..catch} related scenarios on MIPS arch with
Netbsd 3.0 ??

test.cc
============
#include <cstdlib>
#include <exception>
#include <stdio.h>

static void
no_uncaught ()
{
    if (std::uncaught_exception ())
    abort ();
}

int
(Continue reading)

Simon Burge | 8 Mar 12:12 2007
Picon

Re: problem in try..throw..catch related C++ test scenarios on MIPS arch with Netbsd 3.0

"Nida M" wrote:

> I am trying to execute c++ testcase, which is using
> {try..throw..catch} exception mechanism in MIPS arch. but when
> exception has been thrown, it has not been caught by {catch} block and
> giving Abort .(SIGABRT)
> 
> I need help to debug this problem.
> 
> I think problem is with respect to (netbsd 3.0/rtld) dynamic linker,
> becose with statically link binary below program (test.cc) is working
> fine, but with shared link binary it is giving SIGABRT.
> 
> Any problem in {try..throw..catch} related scenarios on MIPS arch with
> Netbsd 3.0 ??

Unfortunately, I know no c++, but I can confirm that I see the same
problem on a sbmips NetBSD 3.0 box with gcc 3.3.3, but that a -current
sbmips (NetBSD 4.99.13) with gcc 4.1.2 that same test program works OK.

Also, an i386 NetBSD 3.0 with same gcc (3.3.3) fails the same way too,
so it would appear to be a general c++ issue with gcc 3.3.3, rather than
a MIPS issue.

Simon.

Simon Burge | 8 Mar 13:47 2007
Picon

Re: problem in try..throw..catch related C++ test scenarios on MIPS arch with Netbsd 3.0

Simon Burge wrote:

> [ ... ]
> so it would appear to be a general c++ issue with gcc 3.3.3, rather than
> a MIPS issue.

Jared McNeill pointed out these GCC mailing list emails:

  http://gcc.gnu.org/ml/gcc-bugs/2004-02/msg00610.html
  http://gcc.gnu.org/ml/gcc-bugs/2004-02/msg00673.html

Is "use a more recent NetBSD with a more recent compiler" an option for
you?

Cheers,
Simon.

Nida M | 9 Mar 10:11 2007
Picon

Re: problem in try..throw..catch related C++ test scenarios on MIPS arch with Netbsd 3.0

Hi

Thank you for the information.
but problem is , I can not change my setup of Netbsd and compiler.

I have to work on this issue with Netbsd 3.0 and gcc 3.4.4.
Any suggestion w.r.t dynamic linker (rtld)  in netbsd 3.0 for solving
this issue.?

On 3/8/07, Simon Burge <simonb <at> netbsd.org> wrote:
> Simon Burge wrote:
>
> > [ ... ]
> > so it would appear to be a general c++ issue with gcc 3.3.3, rather than
> > a MIPS issue.
>
> Jared McNeill pointed out these GCC mailing list emails:
>
>  http://gcc.gnu.org/ml/gcc-bugs/2004-02/msg00610.html
>  http://gcc.gnu.org/ml/gcc-bugs/2004-02/msg00673.html
>
> Is "use a more recent NetBSD with a more recent compiler" an option for
> you?
>
> Cheers,
> Simon.
>

Jared D. McNeill | 9 Mar 13:17 2007
Picon

Re: problem in try..throw..catch related C++ test scenarios on MIPS arch with Netbsd 3.0

On Fri, 9 Mar 2007, Nida M wrote:
> Thank you for the information.
> but problem is , I can not change my setup of Netbsd and compiler.
>
> I have to work on this issue with Netbsd 3.0 and gcc 3.4.4.
> Any suggestion w.r.t dynamic linker (rtld)  in netbsd 3.0 for solving
> this issue.?

Since it appears to be a libstdc++ issue, you could use the dynamic linker 
to load a patched version of the library (ie using LD_LIBRARY_PATH) 
before running your application. You'd just have to patch it yourself.. ;-)

Suppose you have:
   /usr/lib/libstdc++.so.5.0
   $HOME/lib/libstdc++.so.5.1
   $HOME/bin/myapp

Then:
   $ LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH $HOME/bin/myapp

Should load the newer version.

Cheers,
Jared

Andrew Doran | 30 Mar 16:39 2007
Picon

MIPS curlwp

Hi,

I've been making changes for MIPS on the yamt-idlelwp branch and got stung
by the fact that there's no ci_curlwp pointer in struct cpu_info. That's
easy to solve, but I wonder if it's useful to store the value of curlwp in
gp or another register. That would allow defining curcpu as curlwp->l_cpu.

I think it's worthwhile doing since the new locking primitives want to know
what curlwp is quite often, and I've slowly been coming around to the idea
that passing "struct lwp *" about all over the place leads to confusion.

Thoughts?

Andrew


Gmane