From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12906 invoked by alias); 1 Mar 2003 17:40:37 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 12899 invoked from network); 1 Mar 2003 17:40:36 -0000 Received: from unknown (HELO gate.algorithm.aelita.com) (212.176.18.2) by 172.16.49.205 with SMTP; 1 Mar 2003 17:40:36 -0000 Received: from bagman.edm.com ([10.0.0.4]) by gate.algorithm.aelita.com (Post.Office MTA v3.5.3 release 223 ID# 0-12345L500S10000V35) with ESMTP id com for ; Sat, 1 Mar 2003 20:41:22 +0300 content-class: urn:content-classes:message Subject: RE: gdb 5.3 bug MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C2E019.C65300D8" Date: Sat, 01 Mar 2003 17:40:00 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Message-ID: <3F6F4712B759A34ABD453A8B39C10D6229DE3D@bagman.edm.com> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: From: "Lev Assinovsky" To: "Lev Assinovsky" , Cc: "Daniel Jacobowitz" X-SW-Source: 2003-03/txt/msg00008.txt.bz2 This is a multi-part message in MIME format. ------_=_NextPart_001_01C2E019.C65300D8 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Content-length: 5474 I just checked the same test case with the pair SUNWspro/CC,SUNWspro/dbx - they work. I can easily step into any function from=20 the dynamically loaded shared library :(=20 ---- Lev Assinovsky Aelita Software Corporation O&S Core Division, Programmer ICQ# 165072909 > -----Original Message----- > From: Lev Assinovsky=20 > Sent: Saturday, March 01, 2003 7:14 PM > To: gdb@sources.redhat.com > Cc: Daniel Jacobowitz > Subject: RE: gdb 5.3 bug >=20 >=20 > Gdb guys! Help me with solaris please!! >=20 > > Hmm. Your testcase works on GNU/Linux, so it must be related to > > i386-solaris shared library support. Maybe someone else on the list > > can help. >=20 > ---- > Lev Assinovsky > Aelita Software Corporation > O&S Core Division, Programmer > ICQ# 165072909 >=20 >=20 > > -----Original Message----- > > From: Daniel Jacobowitz [mailto:drow@mvista.com] > > Sent: Saturday, March 01, 2003 7:05 PM > > To: Lev Assinovsky > > Cc: gdb@sources.redhat.com > > Subject: Re: gdb 5.3 bug > >=20 > >=20 > > On Sat, Mar 01, 2003 at 06:59:45PM +0300, Lev Assinovsky wrote: > > > Dear Daniel! > > > Thank you very match for your advise! > > > Snapshot gdb+dejagnu-20030228 works just fine! > > > Thank a lot all guys who is involved in gdb development.=20 > > > I am sorry but I have to bother you with another gdb problem. > > > The problem is I can't step into the function through the pointer > > > if the function resides in dynamically loaded shared object=20 > > (library). > > > Here is the simple test case: > >=20 > > Hmm. Your testcase works on GNU/Linux, so it must be related to > > i386-solaris shared library support. Maybe someone else on the list > > can help. > >=20 > > >=20 > > > 1. Shared object: > > > ---------- cut here -------- > > > #include > > > using namespace std; > > >=20 > > > extern "C" { > > > void my_func() > > > { > > > cout << "This is my_func" << endl; > > > } > > >=20 > > > } > > > ---------- cut here -------- > > > 2. Main: > > > #include > > > #include > > > #include > > > #include > > >=20 > > > using namespace std; > > >=20 > > > void * handle; > > >=20 > > > typedef void ( *Func_t)(); > > >=20 > > > Func_t getFunc()=20 > > > { > > > Func_t p =3D (Func_t)dlsym ( handle, "my_func" ); > > > if ( NULL =3D=3D p ) > > > { > > > cout << dlerror() << endl; > > > exit(2); > > > } > > > return p; > > > } > > >=20 > > > int main() > > > { > > > handle =3D (void*)=20 > > ::dlopen("./func_so/bin/i386-sun-solaris/func_so.so",=20 > > RTLD_NOW | RTLD_LOCAL | RTLD_GROUP); > > > if (handle =3D=3D NULL) > > > { > > > cout << dlerror() << endl; > > > exit(2); > > > } > > >=20 > > > Func_t f =3D getFunc(); > > > f(); > > > } > > > ---------- cut here -------- > > >=20 > > > This testcase works, but I can't step into f() (last line) in gdb. > > > Is it possible to work around or fix this problem? > > > Thanks in advance! > > >=20 > > > ---- > > > Lev Assinovsky > > > Aelita Software Corporation > > > O&S Core Division, Programmer > > > ICQ# 165072909 > > >=20 > > >=20 > > > > -----Original Message----- > > > > From: Daniel Jacobowitz [mailto:drow@mvista.com] > > > > Sent: Friday, February 28, 2003 8:19 PM > > > > To: Lev Assinovsky; gdb@sources.redhat.com > > > > Subject: Re: gdb 5.3 bug > > > >=20 > > > >=20 > > > > On Thu, Feb 27, 2003 at 02:09:30PM -0500, Daniel=20 > Jacobowitz wrote: > > > > > On Thu, Feb 27, 2003 at 09:11:14PM +0300, Lev=20 > Assinovsky wrote: > > > > > > GNU gdb 5.3 > > > > > > Copyright 2002 Free Software Foundation, Inc. > > > > > > GDB is free software, covered by the GNU General Public=20 > > > > License, and you are > > > > > > welcome to change it and/or distribute copies of it under=20 > > > > certain conditions. > > > > > > Type "show copying" to see the conditions. > > > > > > There is absolutely no warranty for GDB. Type "show=20 > > > > warranty" for details. > > > > > > This GDB was configured as "i386-pc-solaris2.8"... > > > > > > (gdb) l > > > > > >=20 > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > > > > 0x08136671 in finish_block (symbol=3D0x6e5f5f3a,=20 > > > > listhead=3D0x82241f4, old_blocks=3D0x3a787863, start=3D1634562671,= =20 > > > > > > end=3D1634562720, objfile=3D0x8263fe0) at buildsym.c:304 > > > > > > 304 struct type *ftype =3D SYMBOL_TYPE (symbol); > > > > > > (gdb)=20 > > > > > >=20 > > > > > >=20 > > > > > > Any clue what might be the reason of gdb crash? > > > > >=20 > > > > > OK, the value of "symbol" is obviously wrong. Could you=20 > > > > privately send > > > > > me the binary? If that's not possible, at least a=20 > > > > backtrace would be > > > > > useful... > > > >=20 > > > >=20 > > > > Lev, > > > >=20 > > > > You're in luck, this has already been fixed. It appears to=20 > > > > be a bug in > > > > the Sun compilers - it outputs end-of-function markers without a > > > > corresponding beginning-of-function marker. If you get a=20 > > GDB snapshot > > > > from CVS (http://sources.redhat.com/gdb/) it should handle=20 > > > > your program > > > > gracefully. > > > >=20 > > > > --=20 > > > > Daniel Jacobowitz > > > > MontaVista Software Debian=20 > > GNU/Linux Developer > > > >=20 > > >=20 > >=20 > > --=20 > > Daniel Jacobowitz > > MontaVista Software Debian=20 > GNU/Linux Developer > >=20 >=20 ------_=_NextPart_001_01C2E019.C65300D8 Content-Type: application/octet-stream; name="load.cpp" Content-Transfer-Encoding: base64 Content-Description: load.cpp Content-Disposition: attachment; filename="load.cpp" Content-length: 781 I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWVtb3J5PgojaW5jbHVk ZSA8ZGxmY24uaD4KI2luY2x1ZGUgPGxpbmsuaD4KCnVzaW5nIG5hbWVzcGFj ZSBzdGQ7CgoKCgoKdm9pZCAqIGhhbmRsZTsKCnR5cGVkZWYgdm9pZCAgKCAq RnVuY190KSgpOwoKCkZ1bmNfdCBnZXRGdW5jKCkgCnsKICAgIEZ1bmNfdCBw ID0gKEZ1bmNfdClkbHN5bSAoIGhhbmRsZSwgIm15X2Z1bmMiICk7CiAgICBp ZiAoIE5VTEwgPT0gcCApCiAgICB7CiAgICAgICAgY291dCA8PCBkbGVycm9y KCkgPDwgZW5kbDsKICAgICAgICBleGl0KDIpOwoKICAgIH0KICAgIHJldHVy biBwOwp9CgoKaW50IG1haW4oKQp7CiAgICBoYW5kbGUgPSAodm9pZCopIDo6 ZGxvcGVuKCIuL2Z1bmNfc28vYmluL2kzODYtc3VuLXNvbGFyaXMvZnVuY19z by5zbyIsIFJUTERfTk9XIHwgUlRMRF9MT0NBTCB8IFJUTERfR1JPVVApOwog ICAgaWYgKGhhbmRsZSA9PSBOVUxMKQogICAgewogICAgICAgIGNvdXQgPDwg ZGxlcnJvcigpIDw8IGVuZGw7CiAgICAgICAgZXhpdCgyKTsKICAgIH0KCiAg ICBGdW5jX3QgZiA9IGdldEZ1bmMoKTsKICAgIGYoKTsKfQo= ------_=_NextPart_001_01C2E019.C65300D8 Content-Type: application/octet-stream; name="func.cpp" Content-Transfer-Encoding: base64 Content-Description: func.cpp Content-Disposition: attachment; filename="func.cpp" Content-length: 179 I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKZXh0 ZXJuICJDIiB7CiAgICB2b2lkIG15X2Z1bmMoKQogICAgewogICAgICAgIGNv dXQgPDwgIlRoaXMgaXMgbXlfZnVuYyIgPDwgZW5kbDsKICAgIH0KCn0K ------_=_NextPart_001_01C2E019.C65300D8--