This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdbserver Linux_low.c
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Raja Saleru <iap_sraja at access dot co dot jp>
- Cc: Gdb Redhat <gdb at sources dot redhat dot com>
- Date: Mon, 9 Jun 2003 09:20:52 -0400
- Subject: Re: gdbserver Linux_low.c
- References: <OHEKKPPLCJNKIDELCLGOMENPCAAA.iap_sraja@access.co.jp>
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