This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: _r_debug_state getting screwed on x86_64 ?
- From: Daniel Jacobowitz <drow at false dot org>
- To: Mathieu Lacage <mathieu dot lacage at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Mon, 20 Jul 2009 08:03:23 -0400
- Subject: Re: _r_debug_state getting screwed on x86_64 ?
- References: <74fef6df0907200417q503ca457m642ebab9d953edb@mail.gmail.com>
On Mon, Jul 20, 2009 at 01:17:58PM +0200, Mathieu Lacage wrote:
> ----------- Ok, before calling, the stack contains this value for a
> local variable
>
> (gdb) disas _r_debug_state
> Dump of assembler code for function _r_debug_state:
> 0x00007ffff7df7564 <_r_debug_state+0>: push %rbp
> 0x00007ffff7df7565 <_r_debug_state+1>: mov %rsp,%rbp
> 0x00007ffff7df7568 <_r_debug_state+4>: leaveq
> 0x00007ffff7df7569 <_r_debug_state+5>: retq
> End of assembler dump.
> (gdb) si
> warning: Temporarily disabling breakpoints for unloaded shared library "../ldso"
> Stopped due to shared library event
This is your problem. You're supposed to have ldso in the list
already.
> ------------ and, yes, we can see the gdb int3 instruction in the
> function. -------------
And that's not a feature. You should never be able to observe gdb's
software breakpoints by reading memory with GDB; if you do, it means
something has already gone wrong.
--
Daniel Jacobowitz
CodeSourcery