From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27498 invoked by alias); 20 Jul 2009 12:03:35 -0000 Received: (qmail 26957 invoked by uid 22791); 20 Jul 2009 12:03:34 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Jul 2009 12:03:27 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 076C1109FE; Mon, 20 Jul 2009 12:03:25 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 9F3DD108CF; Mon, 20 Jul 2009 12:03:24 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MSraV-0007LN-2n; Mon, 20 Jul 2009 08:03:23 -0400 Date: Mon, 20 Jul 2009 12:03:00 -0000 From: Daniel Jacobowitz To: Mathieu Lacage Cc: gdb@sourceware.org Subject: Re: _r_debug_state getting screwed on x86_64 ? Message-ID: <20090720120323.GA27912@caradoc.them.org> Mail-Followup-To: Mathieu Lacage , gdb@sourceware.org References: <74fef6df0907200417q503ca457m642ebab9d953edb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74fef6df0907200417q503ca457m642ebab9d953edb@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00136.txt.bz2 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