From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16886 invoked by alias); 22 Jun 2004 22:09:00 -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 16869 invoked from network); 22 Jun 2004 22:08:58 -0000 Received: from unknown (HELO smtp10.atl.mindspring.net) (207.69.200.246) by sourceware.org with SMTP; 22 Jun 2004 22:08:58 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by smtp10.atl.mindspring.net with esmtp (Exim 3.33 #1) id 1BctRp-0002QI-00; Tue, 22 Jun 2004 18:08:57 -0400 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 3556C4B104; Tue, 22 Jun 2004 17:05:56 -0400 (EDT) To: mec.gnu@mindspring.com, zhangtao@cc.gatech.edu Subject: Re: Debug code in data section in gdb Cc: gdb@sources.redhat.com Message-Id: <20040622210556.3556C4B104@berman.michael-chastain.com> Date: Tue, 22 Jun 2004 22:09:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-06/txt/msg00225.txt.bz2 Hi Tao, It sounds like, perhaps, you are placing the breakpoint first, and then copying the code on top of the location of the breakpoint. The way gdb sets breakpoints (usually) is that gdb writes a BREAKPOINT instruction into the memory at the address indicated. So if you set a breakpoint first, then overwrite that memory with your own contents, then you will overwrite the BREAKPOINT instruction and lose it. Can you capture a complete gdb session with the 'script' command and mail it in? Michael C GDB QA Guy