From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9948 invoked by alias); 22 Jun 2004 19:10:52 -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 9940 invoked from network); 22 Jun 2004 19:10:51 -0000 Received: from unknown (HELO sark4.cc.gatech.edu) (130.207.7.19) by sourceware.org with SMTP; 22 Jun 2004 19:10:51 -0000 Received: from gaia.cc.gatech.edu (gaia.cc.gatech.edu [130.207.3.8]) by sark4.cc.gatech.edu (8.12.10/8.12.8) with ESMTP id i5MJAnLn027689; Tue, 22 Jun 2004 15:10:51 -0400 (EDT) Received: from localhost (zhangtao@localhost) by gaia.cc.gatech.edu (8.12.10/8.12.8) with ESMTP id i5MJAmBd028195; Tue, 22 Jun 2004 15:10:48 -0400 (EDT) Date: Tue, 22 Jun 2004 19:10:00 -0000 From: Tao Zhang To: Michael Elizabeth Chastain cc: gdb@sources.redhat.com Subject: Re: Debug code in data section in gdb In-Reply-To: <20040622181936.BF6E14B104@berman.michael-chastain.com> Message-ID: References: <20040622181936.BF6E14B104@berman.michael-chastain.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-06/txt/msg00223.txt.bz2 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. So break *0x12344657 should work? Then maybe it is the problem of my gdb port rather than general gdb? Thanks a lot Tao -Tao Zhang (zhangtao@cc.gatech.edu) On Tue, 22 Jun 2004, Michael Elizabeth Chastain wrote: > > Is there a way to ask gdb to set break points at data section? > > Or is there some other work around? > > If you know the exact address where you want to set the breakpoint, > you can do: > > (gdb) break *0x12345678 > > Be sure to do this after you've copied your code into the data > section, not before. > > Michael C >