From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16836 invoked by alias); 16 May 2013 12:30:12 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 16826 invoked by uid 89); 16 May 2013 12:30:11 -0000 X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from smtp.checkpoint.com (HELO smtp.checkpoint.com) (194.29.34.68) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 16 May 2013 12:30:10 +0000 Received: from DAG-EX10.ad.checkpoint.com ([194.29.34.150]) by smtp.checkpoint.com (8.13.8/8.13.8) with ESMTP id r4GCU6du027096 for ; Thu, 16 May 2013 15:30:06 +0300 X-CheckPoint: {5194CF4E-A-1B221DC2-1FFFF} Received: from IL-EX10.ad.checkpoint.com ([169.254.2.54]) by DAG-EX10.ad.checkpoint.com ([169.254.3.48]) with mapi id 14.02.0342.003; Thu, 16 May 2013 15:30:06 +0300 From: Avi Gozlan To: "gdb@sourceware.org" CC: Avi Gozlan Subject: GDB and libthread_db.so.1 issue Date: Thu, 16 May 2013 12:30:00 -0000 Message-ID: <71C49BB0B847984EAADFE43F93C6BF081196ED31@IL-EX10.ad.checkpoint.com> x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: Clean x-cpdlp: 11a0a162072e9c7d683c0a6615f9003cbf99aa5b4e Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2013-05/txt/msg00072.txt.bz2 Hello, I have got a problem with debugging 32bit applications on a target x86_64 m= achine. I use 64bit gdb 7.1 on a x86_64 machine (running 'file `which gdb`' returns= ELF 64-bit LSB executable, AMD x86-64...) I can debug 64bit applications successfully on this target machine. However= , when trying to debug 32bit applications, I get the following error messag= e: Cannot find new threads: generic error Both libpthread.so.0 and libthread_db.so.1 were copied from another machine= , both are located in /lib64. (for the sake of trouble shooting I replaced = also libc.so.6 and ld-linux-x86.so.2 with libraries copied from that same m= achine). When debugging gdb itself, I saw that indeed these shared libraries are loa= ded by gdb (by running 'info shared'). Yet debugging fails with 32bit progr= ams. The top of the gdb's backtrace for the failure is the following: #0 thread_db_err_str (err=3DTD_ERR) at linux-thread-db.c:264 #1 0x0000000000497897 in find_new_threads_callback (th_p=3D0x7fffffffb760, data=3D0x7fffffffb840) at linux-thread-db.c:1306 #2 0x0000003154202000 in iterate_thread_list () from /lib64/libthread_db.s= o.1 #3 0x00000031542020b5 in td_ta_thr_iter () from /lib64/libthread_db.so.1 #4 0x0000000000497aea in find_new_threads_once (info=3D0xd38a50, iteration= =3D0, errp=3D0x7fffffffb8c0) at linux-thread-db.c:1378 #5 0x0000000000497ccc in thread_db_find_new_threads_2 (ptid=3D..., until_no_new=3D0) at linux-thread-db.c:1445 #6 0x0000000000497d2b in thread_db_find_new_threads_1 (ptid=3D...) at linux-thread-db.c:1454 #7 0x00000000004976d9 in thread_db_wait (ops=3D0xb21ca0, ptid=3D..., ourstatus=3D0x7fffffffbad0, options=3D0) at linux-thread-db.c:1247 #8 0x0000000000588734 in target_wait (ptid=3D..., status=3D0x7fffffffbad0, options=3D0) at target.c:2132 #9 0x0000000000551de6 in wait_for_inferior (treat_exec_as_sigtrap=3D0) at infrun.c:2270 #10 0x0000000000551468 in proceed (addr=3D18446744073709551615, siggnal=3DTARGET_SIGNAL_0, step=3D0) at infrun.c:1896 #11 0x000000000054ad68 in run_command_1 (args=3D0x0, from_tty=3D1, tbreak_at_main=3D0) at infcmd.c:585 #12 0x000000000054ad9b in run_command (args=3D0x0, from_tty=3D1) at infcmd.= c:595 #13 0x00000000004bc730 in do_cfunc (c=3D0xb80070, args=3D0x0, from_tty=3D1) It appears that the libthread_db library is called by gdb but identifies a = problem. As said, the very same libraries are loaded by gdb for a successf= ul 64bit applications debugging. I would be thankful if you could shed light on this issue. Thanks, Avi