From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31830 invoked by alias); 28 Jun 2003 03:29:57 -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 31823 invoked from network); 28 Jun 2003 03:29:57 -0000 Received: from unknown (HELO molenda.com) (192.220.74.81) by sources.redhat.com with SMTP; 28 Jun 2003 03:29:57 -0000 Received: (qmail 43681 invoked by uid 19025); 28 Jun 2003 03:29:56 -0000 Date: Sat, 28 Jun 2003 05:32:00 -0000 From: Jason Molenda To: gdb@sources.redhat.com Subject: Re: Howdy from Apple; Fix and Continue implemented Yet Again Message-ID: <20030627202956.A42704@molenda.com> References: <20030627004003.A6119@molenda.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030627004003.A6119@molenda.com>; from jason-swarelist@molenda.com on Fri, Jun 27, 2003 at 12:40:04AM -0700 X-SW-Source: 2003-06/txt/msg00518.txt.bz2 On Fri, Jun 27, 2003 at 12:40:04AM -0700, Jason Molenda wrote: ` > Fix and continue is a feature implemented by many other debuggers, > which we added to our gdb for this release. It was pointed out that I never said what F&C _is_. It's a feature for debugging your program, where you can modify your sources mid-debug-session, and the debugger will "patch" in the new code. At a very high level, the source file you're modifying is built as a shared library, gdb executes inferior function calls to load that shared library into the program, gdb finds all old versions of all functions contained in that shared library and writes trampolines in the prologues to jump to the new versions of those functions, and gdb redirects all file-static (including global) variables in that shared library to point to the statics/globals in the original executable. >From an end user's perspective, they're running their program, they see it misbehave or they know it's about to misbehave, but it took them fifteen minutes to get to this point -- they don't want to restart from the beginning and navigate all the way back here. With F&C, they make the source change, patch it in, and continue on with their work. I don't have anything interesting planned this weekend so maybe I'll write up a short ditty about how it is implemented in gdb and some of the more technical aspects of the feature. I've been doing little else since winter, so I've got a pretty good idea of how it all fits together. :-) Jason