From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13236 invoked by alias); 9 Apr 2003 20:16:08 -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 13158 invoked from network); 9 Apr 2003 20:16:04 -0000 Received: from unknown (HELO lycos.com) (209.202.220.140) by sources.redhat.com with SMTP; 9 Apr 2003 20:16:04 -0000 Received: from Unknown/Local ([?.?.?.?]) by mailcity.com; Wed, 09 Apr 2003 20:15:39 -0000 To: "Daniel Jacobowitz" Date: Wed, 09 Apr 2003 20:16:00 -0000 From: "Gautham Thavva" Message-ID: Mime-Version: 1.0 Cc: gdb@sources.redhat.com X-Sent-Mail: on Reply-To: gautham.thavva@lycos.com X-Priority: 3 Subject: Re: Debugging a Multi-threaded application on PowerPC 82xx... X-Sender-Ip: 65.200.123.8 Organization: Lycos Mail (http://www.mail.lycos.com:80) Content-Type: text/plain; charset=us-ascii Content-Language: en Content-Transfer-Encoding: 7bit X-SW-Source: 2003-04/txt/msg00082.txt.bz2 Hi Daniel, I have read in the archives that you are yet to write a FAQ and already answered this question 5 or 6 times. Please bear with me for one more time. A quick recap: I am running a multi-threaded application on PowerPC 8260 and trying to debug it with gdb-5.3 In the previous reply, you had asked me to set the solib-absolute- prefix. I set solib-absolute-prefix and still couldn't debug. I then built the application as a static executable and tried to debug it. It got stuck at the system calls in the application. I then tested the system calls with a test program. --------------------------------------------- #include #include #define NUM_THREADS 5 void *PrintHello(void *threadid) { <##3##> printf("\n%d: Hello World!\n", threadid); pthread_exit(NULL); } int main (int argc, char *argv[]) { pthread_t threads[NUM_THREADS]; int rc, t; <##1##> system("mkdir story"); system("rm -rf story"); for(t=0;t < NUM_THREADS;t++){ <##2##> printf("Creating thread %d\n", t); rc = pthread_create(&threads[t], NULL, PrintHello, (void *)t); if (rc){ printf("ERROR; return code from pthread_create() is %d\n", rc); exit(-1); } } pthread_exit(NULL); ------------------------------------------------------------------- I put a breakpoint at points shown by <##X##> in the above code. It hit breakpoint 2 and 3 but never hit breakpoint 1 I placed the system calls in the main function to exclude the possibility of gdb not handling system calls in threads. Please can you tell me how I can resolve this issue. I appreciate your help. with regards, Gautham Thavva On Mon, 24 Mar 2003 15:43:57 Daniel Jacobowitz wrote: >How does DDD invoke GDB? I bet it uses --symbols or the symbol-file >command. Don't Do That! Use "file" or just "gdb gtest" instead. >Fix DDD or say "file gtest" before saying "target remote". > >You also need to have your target libraries present on the host system >and pointed to by solib-absolute-prefix or solib-search-path. > >And I (or someone else!) should write more bulletproof documentation >about this since it is obviously a FAQ. > ____________________________________________________________ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus