This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: Improved linker-debugger interface
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: archer at sourceware dot org
- Cc: Gary Benson <gbenson at redhat dot com>
- Date: Tue, 7 Jun 2011 18:58:28 +0200
- Subject: Re: Improved linker-debugger interface
- References: <20110525153649.GB3149@redhat.com>
On Wed, 25 May 2011 17:36:50 +0200, Gary Benson wrote:
> --- a/sysdeps/generic/ldsodefs.h
> +++ b/sysdeps/generic/ldsodefs.h
[...]
> +/* The dynamic linker calls this function after having changed any
> + shared object mappings. */
> +extern void _dl_debug_state_extended (Lmid_t ns, struct r_debug *r)
> + internal_function;
> +
[...]
> --- a/elf/dl-debug.c
> +++ b/elf/dl-debug.c
> @@ -76,3 +76,19 @@ _dl_debug_state (void)
> {
> }
> rtld_hidden_def (_dl_debug_state)
> +
> +
> +/* This function exists solely to contain SystemTap probes which the
> + debugger can set breakpoints on. */
Here should be also `internal_function' otherwise on i686 it will:
dl-debug.c:84:1: error: conflicting types for '_dl_debug_state_extended'
../sysdeps/generic/ldsodefs.h:963:13: note: previous declaration of '_dl_debug_state_extended' was here
> +void
> +_dl_debug_state_extended (Lmid_t ns, struct r_debug *r)
> +{
> + if (r->r_state == RT_CONSISTENT)
> + {
> + LIBC_PROBE (r_debug_mod_complete, 2, ns, r);
> + }
> + else
> + {
> + LIBC_PROBE (r_debug_mod_starting, 2, ns, r);
> + }
> +}
Thanks,
Jan