From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14871 invoked by alias); 22 Jun 2004 20:43:24 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 14864 invoked from network); 22 Jun 2004 20:43:23 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sourceware.org with SMTP; 22 Jun 2004 20:43:23 -0000 Received: from hermes.suse.de (hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 036FA782808; Tue, 22 Jun 2004 22:43:23 +0200 (CEST) To: Tao Zhang Cc: Michael Elizabeth Chastain , gdb@sources.redhat.com Subject: Re: Debug code in data section in gdb References: <20040622181936.BF6E14B104@berman.michael-chastain.com> From: Andreas Schwab X-Yow: I love ROCK 'N ROLL! I memorized the all WORDS to ``WIPE-OUT'' in 1965!! Date: Tue, 22 Jun 2004 20:43:00 -0000 In-Reply-To: (Tao Zhang's message of "Tue, 22 Jun 2004 15:10:48 -0400 (EDT)") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2004-06/txt/msg00224.txt.bz2 Tao Zhang writes: > Hi, Michael > > I tried that many times, it doesn't work for me. I even played some trick > so that the code buffer is actually placed in code section now. It still > doesn't work. I am very confused. The breakpoints work just fine for other > code. Please define "doesn't work". What are the symptoms? > So break *0x12344657 should work? Yes. GDB does not distinguish between "code" and "data" section when placing a breakpoint, it's all just memory. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."