From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28990 invoked by alias); 16 Oct 2005 15:00:58 -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 28977 invoked by uid 22791); 16 Oct 2005 15:00:56 -0000 Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.196) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 16 Oct 2005 15:00:56 +0000 Received: by wproxy.gmail.com with SMTP id 68so403801wri for ; Sun, 16 Oct 2005 08:00:54 -0700 (PDT) Received: by 10.54.123.4 with SMTP id v4mr1488234wrc; Sun, 16 Oct 2005 08:00:54 -0700 (PDT) Received: by 10.54.86.4 with HTTP; Sun, 16 Oct 2005 08:00:54 -0700 (PDT) Message-ID: Date: Sun, 16 Oct 2005 15:00:00 -0000 From: "Dmitry S. Vasilchenko" To: gdb@sources.redhat.com Subject: ppc64 gdbserver NPTL problem MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-SW-Source: 2005-10/txt/msg00093.txt.bz2 Hello! I have met some problems with gdbserver and multithread debugging. The problem is that on ppc64 td_ta_event_addr from glibc returns the pointer to function descriptor, not the address of the function. As a result, gdbserver installs breakpoint at the memory address in .opd section, not at the function glibs expects. So gdbserver will never receive information about new threads creation on ppc64. It is easy to fix, but I am not sure, maybe this should be fixed in glibc. Your thoughts? from gdb/gdbserver/thread-tb.c: /* ************************************ */ static int thread_db_enable_reporting () { ... /* Get address for thread creation breakpoint. */ err =3D td_ta_event_addr (thread_agent, TD_CREATE, ¬ify); ... set_breakpoint_at ((CORE_ADDR) (unsigned long) notify.u.bptaddr, thread_db_create_event); >From glibc, nptl_db/td_ta_event_addr.c: /* ************************************ */ td_err_e td_ta_event_addr (const td_thragent_t *ta_arg, td_event_e event, td_notify_t *addr) { ... err =3D DB_GET_SYMBOL (taddr, ta, __nptl_create_event); ... addr->u.bptaddr =3D taddr; -- Best regards, Dmitry Vasilchenko