From mboxrd@z Thu Jan 1 00:00:00 1970 From: A M Subject: Access to Program Counter in C Date: Tue, 16 Nov 2004 08:38:21 -0800 (PST) Message-ID: <20041116163821.61564.qmail@web51902.mail.yahoo.com> Mime-Version: 1.0 Return-path: Sender: linux-assembly-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-c-programming@vger.kernel.org, linux-assembly@vger.kernel.org Hello, Does anybody know how to access the address of the current executing instruction in C while the program is executing? Also, is there a method to load a program image from memory not a file (an exec that works with a memory address)? Mainly I am looking for a method that brings a program image into memory modify parts of it and start the in-memory modified version. Can anybody think of a method to replace a thread image without replacing the whole process image? Thanks, Ali __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com