From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10697 invoked by alias); 25 May 2004 09:21:46 -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 10670 invoked from network); 25 May 2004 09:21:44 -0000 Received: from unknown (HELO mail.kovaiteam.com) (203.129.254.138) by sourceware.org with SMTP; 25 May 2004 09:21:44 -0000 Received: from mukco ([172.16.1.46]) by mail.kovaiteam.com (8.9.3/8.9.3) with ESMTP id OAA01106 for ; Tue, 25 May 2004 14:33:38 +0530 Message-ID: <021301c44239$bad6e0b0$2e0110ac@mukco> From: "MuthuKumar-15" To: Subject: thread debugging Date: Tue, 25 May 2004 09:21:00 -0000 X-SW-Source: 2004-05/txt/msg00162.txt.bz2 Hello All. I have a problem in thread debugging with GDB on HP-UX platform. *** Sample program *** /* thrd.c */ #include #include #include void *func() { printf("Thread function\n"); pthread_exit(NULL); } main() { pthread_t *t1; int result=0; t1=(pthread_t)malloc(sizeof(pthread_t)); bzero((void *)t1,sizeof(pthread_t)); result = pthread_create(t1, NULL, func, NULL); if (result == EAGAIN) { printf("EAGAIN Error\n"); free(t1); exit(1); } else if (result == -1) { printf("Negative return value\n"); free(t1); exit(1); } pthread_exit(NULL); free(t1); } ************************** $ cc -g -o thrd thrd.c gdb execution: $ gdb -q thrd gdb> b main gdb> b func gdb> r ... < After finishing the pthread_exit in main(),it is going to func()'s pthread_exit.> gdb> s It is hanging over here.........!! It is not responsing. 1. What is the problem on program? How to debug this? 2. Is it good to debug memory leaks with GDB + librtc library on HP-UX platfrom? Regards, Muthukumar. --- =============== It is a "Virus Free Mail" =============== Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.690 / Virus Database: 451 - Release Date: 5/22/2004