From owner-freebsd-threads@FreeBSD.ORG Thu Jul 14 15:19:53 2011 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF2571065672 for ; Thu, 14 Jul 2011 15:19:52 +0000 (UTC) (envelope-from schumjs@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8CE848FC0A for ; Thu, 14 Jul 2011 15:19:52 +0000 (UTC) Received: by ewy1 with SMTP id 1so289860ewy.13 for ; Thu, 14 Jul 2011 08:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=BW38beOMpsHMY2Pluhc9Z8dcJpS/LnwumAZyTXaUto0=; b=oRkz5BxjnCSpgOxhu98v0OgbsMpp1znlwDZnlci9ffpUEenRIcTk0xocil7qY9qx23 5XNSBqChZfL6WHyAHg1HxAy7pOBHZm6oD4DFkrfJ+Q1Yu6Z10ZodkdaZgNsPZEhDV54g 1xk6tqhkR/hiVQh3BftSvPW4SwfhomchNTqhM= MIME-Version: 1.0 Received: by 10.213.34.201 with SMTP id m9mr2247598ebd.100.1310656791495; Thu, 14 Jul 2011 08:19:51 -0700 (PDT) Received: by 10.213.23.16 with HTTP; Thu, 14 Jul 2011 08:19:51 -0700 (PDT) Date: Thu, 14 Jul 2011 10:19:51 -0500 Message-ID: From: John Schumacher To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: dlopen fails, dynamically linking libthread_db.so fails (gdbserver) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2011 15:19:53 -0000 Hello all, I'm having an issue in the process of making gdbserver work properly for multi-threaded applications on FreeBSD. Specifically, dynamically linking (through dlopen) the libthread_db.so library seems to be an issue, for an unknown reason. dlopen is a function in fbsd-threads called during init, on the libthread_db.so library. In my implementation I get returned the following: dlopen failed: /usr/lib/libthread_db.so: Undefined symbol > "ps_pglobal_lookup". > [GDB will not be able to debug user-mode threads: (null)] (dlerror was emptied in the first statement, because of my changes- the null should be replaced with the Undefined symbol jargon) Also, libthread_db.so is soft-linked to the relevant and existing libraries (in my case libthread_db.so.3). A quick google shows that this message is present in the beginning of the session of those running KGDB- even in normal operation! Has this always failed? This basically means that all attempts to send thread_db calls regarding threads to the kernel will fail. Is this an issue internal to FreeBSD, or is there some way a developer can add these symbols to the library? -- John Schumacher University of Minnesota (TC) Electrical Engineering