From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7386 invoked by alias); 9 Jun 2003 13:21:05 -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 7371 invoked from network); 9 Jun 2003 13:21:04 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 9 Jun 2003 13:21:04 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19PMao-0008OM-00; Mon, 09 Jun 2003 08:21:47 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19PMZx-00080h-00; Mon, 09 Jun 2003 09:20:53 -0400 Date: Mon, 09 Jun 2003 13:21:00 -0000 From: Daniel Jacobowitz To: Raja Saleru Cc: Gdb Redhat Subject: Re: gdbserver Linux_low.c Message-ID: <20030609132052.GC30691@nevyn.them.org> Mail-Followup-To: Raja Saleru , Gdb Redhat References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-06/txt/msg00104.txt.bz2 On Mon, Jun 09, 2003 at 06:55:14PM +0900, Raja Saleru wrote: > > Hi > > In gdbserver source file Linux_low.c look at the following data structure > > static struct target_ops linux_target_ops = { > linux_create_inferior, > linux_attach, > linux_kill, > linux_thread_alive, > linux_resume, > linux_wait, > linux_fetch_registers, > linux_store_registers, > linux_read_memory, > linux_write_memory, > linux_look_up_symbols, > }; > > the last member linux_look_up_symbols, what this function does ? > > This is assigned to the following function > > linux_look_up_symbols (void) > { > #ifdef USE_THREAD_DB > if (using_threads) > return; > > using_threads = thread_db_init (); > #endif > } > > Actually where it does any symbol related functionality ? > > can anybody clarrify these questions ? Thanks in advance If you look at the linuxthreads_db/ directory in glibc source, you'll see the trick - thread_db_init calls back into the application. Take a look at gdbserver/proc-service.c, function ps_pglobal_lookup. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer