From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29590 invoked by alias); 22 Jun 2004 23:17:18 -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 29558 invoked from network); 22 Jun 2004 23:17:12 -0000 Received: from unknown (HELO blount.mail.mindspring.net) (207.69.200.226) by sourceware.org with SMTP; 22 Jun 2004 23:17:12 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by blount.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BcuVr-0000We-00; Tue, 22 Jun 2004 19:17:11 -0400 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 3CB3A4B104; Tue, 22 Jun 2004 19:17:35 -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: <20040622231735.3CB3A4B104@berman.michael-chastain.com> Date: Tue, 22 Jun 2004 23:17:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-06/txt/msg00228.txt.bz2 > I can break the program just before the execution jump to the > code copied from somewhere. Then I set a breakpoint at the beginning of > the copied code. It still won't work. That's the right thing to do. It should work. > Another thing is I see the code is same as the original code. My > question is whether I can see the GDB modified instruction by > disassemble the memory ? When and How gdb modifies the instruction? gdb goes to some lengths to report the original contents of memory no matter how you examine it. > I suspect this problem is specific to my port of gdb, so maybe I need to > understand how breakpoints work in gdb to understand my problem. Could > anybody give me some pointers to articles or online books on debugger or > gdb? Mmmm, start with the gdb internals manual (doc/gdbint.texinfo). Again, it would help a lot if you could use the 'script' command to capture an entire gdb session, and then mail in the 'typescript' file. Michael C