From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23298 invoked by alias); 29 Apr 2011 18:57:13 -0000 Received: (qmail 23183 invoked by uid 22791); 29 Apr 2011 18:57:12 -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 ausc60pc101.us.dell.com (HELO ausc60pc101.us.dell.com) (143.166.85.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Apr 2011 18:56:58 +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 18:57:00 -0000 Cc: GDB Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: 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/msg00168.txt.bz2 The simple answer is to get a copy of libc.so with debug symbols, and load = that symbol table. You don't have to replace the library itself to do that= .=20=20 paul On Apr 29, 2011, at 2:36 PM, Richard Silverman wrote: > Hello, >=20 > This seems as if it should be simple, but I can't find an answer. I woul= d like to teach gdb about new types relevant to the program being debugged,= which are not among the debugging info in the program. A concrete example= : 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 libc.= 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