From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15069 invoked by alias); 20 Jan 2003 14:57:54 -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 15004 invoked from network); 20 Jan 2003 14:57:54 -0000 Received: from unknown (HELO relay.versatel.net) (62.250.3.110) by 172.16.49.205 with SMTP; 20 Jan 2003 14:57:54 -0000 Received: (qmail 88629 invoked from network); 20 Jan 2003 14:57:52 -0000 Received: from unknown (HELO technt.technolution.nl) (62.58.167.162) by relay.versatel.net with SMTP; 20 Jan 2003 14:57:52 -0000 Received: from frank (172.16.10.11) by technt.technolution.nl (Worldmail 1.3.167) for gdb@sources.redhat.com; 20 Jan 2003 15:57:52 +0100 Reply-To: From: "Frank van Eijkelenburg" To: "Gnu Debugger mailing list" Subject: unresolved symbols with libthread_db library Date: Mon, 20 Jan 2003 14:57:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-SW-Source: 2003-01/txt/msg00344.txt.bz2 I'm trying to compile a simple program which uses the libthread_db library (see code at the end). However I have some unresolved symbols. Does anyone know what to include to resolve these symbols. Or should I implement something myself? With this program I want to try debugging a multithreaded program with use of gdbserver. /*Specify libthread_db.so.1 on link line to access correct version. * cc thisfile.c /lib/libthread_db.so.1 */ #include #include #include #include static int thread_cb( const td_thrhandle_t *th_p, void *s ); struct ps_prochandle { pid_t pid; }; struct ps_prochandle ph = {1}; td_thragent_t *ta_p; /* * libthread_db example. * Initialize libthread_db * Create a thread agent * Call thread iterator */ int main() { td_err_e td_return; /* * td_init() */ td_return = td_init(); if ( td_return != TD_OK ) { printf("Initialization error on td_init() call\n"); return 0; } /* * td_ta_new() */ td_return = td_ta_new(&ph, &ta_p); if ( td_return == TD_OK ) { /* * td_ta_thr_iter() */ (void) td_ta_thr_iter(ta_p, thread_cb, "Import calls test", TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY, TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS); } return 0; } static int thread_cb( const td_thrhandle_t *th_p, void *s ) /* * Description: * Call back function for iterator * * Input: * *th_p - thread handle * *s - data * * Output: * none * */ { int return_val = 0; td_err_e td_return; td_thrinfo_t to; td_return = td_thr_get_info(th_p, &(to)); if ( td_return == TD_ERR ) { printf("Thread update failed\n"); return_val = 1; } return return_val; } TIA, Frank