From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10885 invoked by alias); 29 Apr 2011 20:53:52 -0000 Received: (qmail 10860 invoked by uid 22791); 29 Apr 2011 20:53:51 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Apr 2011 20:53:36 +0000 X-Loopcount0: from 10.152.240.141 Subject: Re: teaching gdb about new types? Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Paul Koning In-Reply-To: Date: Fri, 29 Apr 2011 20:53:00 -0000 Cc: GDB Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: <0CC3B1C2-DD9F-4A4A-AA07-9E2FC72D6C9D@dell.com> References: To: Richard Silverman X-IsSubscribed: yes 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 X-SW-Source: 2011-04/txt/msg00170.txt.bz2 If you're worried about types rather than line numbers, I would think that = all you'd need is a symbol table that has the right type definitions in it.= If you know what they are supposed to be, you can supply such a symbol ta= ble easily enough.=20=20 paul On Apr 29, 2011, at 4:42 PM, Richard Silverman wrote: > On Fri, 29 Apr 2011, Paul Koning wrote: >=20 >> The simple answer is to get a copy of libc.so with debug symbols, and lo= ad that symbol table. You don't have to replace the library itself to do t= hat. >>=20 >> paul >=20 > I know, thanks; but the host is Solaris, and Oracle doesn't appear to pro= vide this (although I'm pursuing it with them.). I could also build the Op= enSolaris libc and hope they're close enough. However, it really seems as = if one ought to be able to do what I described. >=20 > - Richard >=20 >> On Apr 29, 2011, at 2:36 PM, Richard Silverman wrote: >>=20 >>> Hello, >>>=20 >>> This seems as if it should be simple, but I can't find an answer. I wo= uld like to teach gdb about new types relevant to the program being debugge= d, which are not among the debugging info in the program. A concrete examp= le: I have a program which uses pthreads from libc. It calls: >>>=20 >>> int pthread_cond_wait(pthread_cond_t *restrict cond, >>> pthread_mutex_t *restrict mutex); >>>=20 >>> ... and the argument types are defined in system header files. But lib= c.so has no debugging info, so gdb doesn't know about these types, and can'= t interpret the arguments for me. How can I teach gdb about these types? >>>=20 >>> Thanks, >>>=20 >>> - Richard >>=20 >>=20 >>=20