From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16784 invoked by alias); 22 Jun 2004 17:36:35 -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 16768 invoked from network); 22 Jun 2004 17:36:33 -0000 Received: from unknown (HELO sark4.cc.gatech.edu) (130.207.7.19) by sourceware.org with SMTP; 22 Jun 2004 17:36:33 -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 i5MHaXLn018745 for ; Tue, 22 Jun 2004 13:36:33 -0400 (EDT) Received: from localhost (zhangtao@localhost) by gaia.cc.gatech.edu (8.12.10/8.12.8) with ESMTP id i5MHaWRT027125 for ; Tue, 22 Jun 2004 13:36:32 -0400 (EDT) Date: Tue, 22 Jun 2004 17:36:00 -0000 From: Tao Zhang To: gdb@sources.redhat.com Subject: Debug code in data section in gdb Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-06/txt/msg00221.txt.bz2 Hi, I have to copy a piece of code to a buffer in data section then execute the code. I need to debug the code in the buffer to capture the problem due to the copying of the code. I tried to use gdb to set breakpoints in the code buffer (in data section) but it doesn't work. There is no OS at all, so OS won't prevent the execution of something in data section. Is there a way to ask gdb to set break points at data section? Or is there some other work around? Thanks so much Tao -Tao Zhang (zhangtao@cc.gatech.edu)