From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12307 invoked by alias); 29 Aug 2007 21:25:15 -0000 Received: (qmail 12298 invoked by uid 22791); 29 Aug 2007 21:25:15 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Aug 2007 21:25:08 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id AC2F898153; Wed, 29 Aug 2007 21:25:08 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 8859598101; Wed, 29 Aug 2007 21:25:08 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1IQV29-0004oV-Rq; Wed, 29 Aug 2007 17:25:05 -0400 Date: Wed, 29 Aug 2007 21:25:00 -0000 From: Daniel Jacobowitz To: jf Cc: gdb@sourceware.org Subject: Re: adding comments/labels? Message-ID: <20070829212505.GA18421@caradoc.them.org> Mail-Followup-To: jf , gdb@sourceware.org References: <20070829211258.GA17600@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00253.txt.bz2 On Thu, Aug 30, 2007 at 04:50:40AM +0000, jf wrote: > > > > Not really. I think you should do it with objcopy, instead. Haven't > > I suggested this to someone else recently on this list... ? > > Why would I want to do it with objcopy? I'm reversing a binary and I'd > like a label so I don't single step into the same function every time, its > that or try to remember the address of every function I've looked at. > > I'll just have to do it the hardway and cludge through the source and > figure out where symbol resolution occurs. Thanks for the typical OSS/FS > help ('no do it my way instead') If you're going to be insulting when offered advice, please don't expect to get help again. I recommended using objcopy because objcopy supports modifying symbol tables and GDB does not. You can write a GDB macro to use objcopy to add the symbol, replace the original binary, and reload it into GDB. It'll be about five lines. This will be about a million times easier than trying to add a new GDB command to modify the symbol table. -- Daniel Jacobowitz CodeSourcery