From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4223 invoked by alias); 8 Apr 2002 19:12:41 -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 4214 invoked from network); 8 Apr 2002 19:12:40 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by sources.redhat.com with SMTP; 8 Apr 2002 19:12:40 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id g38JCcK16579; Mon, 8 Apr 2002 14:12:38 -0500 Date: Mon, 08 Apr 2002 12:12:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200204081912.g38JCcK16579@duracef.shout.net> To: drow@mvista.com, jnordby@caspiannetworks.com Subject: Re: Searching for pattern in memory from GDB? Cc: gdb@sources.redhat.com X-SW-Source: 2002-04/txt/msg00102.txt.bz2 You can build your executable file with symbols, then strip the symbols and ship it. Then run gdb on the unstripped executable and the core dump from the stripped executable. You could do this: static char signpost [64]; sprintf (signpost, "\nFOO_BUFFER_ADDRESS=0x%p\n", foo_buffer_address); Then when you get the core dump, you can do: strings -a core | grep FOO_BUFFER_ADDRESS If your target operating system(s) support mmap at a fixed address, then you can mmap to that address. Obviously that is not portable but if it works, it works. That would make it exceptionally easy to attach to a running process. Hope this helps, Michael C