From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 337 invoked by alias); 27 Sep 2010 09:16:43 -0000 Received: (qmail 329 invoked by uid 22791); 27 Sep 2010 09:16:42 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_05,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Sep 2010 09:16:37 +0000 Received: (qmail 12226 invoked from network); 27 Sep 2010 09:16:35 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 27 Sep 2010 09:16:35 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: GDB remote debugging stub: Question about memory read Date: Mon, 27 Sep 2010 09:16:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: Niklas Quarfot Nielsen References: <1257E26A-12FB-432E-A18C-137440C02080@qni.dk> In-Reply-To: <1257E26A-12FB-432E-A18C-137440C02080@qni.dk> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201009271016.32726.pedro@codesourcery.com> 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: 2010-09/txt/msg00146.txt.bz2 On Monday 27 September 2010 09:54:04, Niklas Quarfot Nielsen wrote: > GDB tries to read 0x40 bytes starting at address 0xffffffff6effffc0, which (I guess) is from the RSP. > Packet: mffffffff6effffc0,40 > > My question is: > Why does GDB try to read 0x40 bytes, when there is only 0x20 bytes on the stack (RBP-RSP)? > > The architecture is an AMD64 and the version of GDB is 7.1(x86_64-gnu-linux). > > I appreciate any answer and/or clue to why GDB behaves like this. > I have tried to look through the remote debugging source code of GDB, but this has not given me any answers. > If needed, I can post debugging information from the target code in GDB. > 0x40 bytes is GDB's stack cache line size (dcache.c). Try "(gdb) set stack-cache off". -- Pedro Alves