From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13352 invoked by alias); 7 Dec 2003 22:15:31 -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 13345 invoked from network); 7 Dec 2003 22:15:30 -0000 Received: from unknown (HELO SMTP.Lamicro.com) (66.163.8.251) by sources.redhat.com with SMTP; 7 Dec 2003 22:15:30 -0000 Received: from Spooler by SMTP.Lamicro.com (Mercury/32 v3.32) ID MO00ECB4; 7 Dec 03 17:17:14 -0500 Received: from spooler by Lamicro.com (Mercury/32 v3.32); 7 Dec 03 17:16:55 -0500 Received: from Connotech.com (216.162.71.171) by SMTP.Lamicro.com (Mercury/32 v3.32) with ESMTP ID MG00ECB3; 7 Dec 03 17:16:48 -0500 Message-ID: <3FD3A988.5E3D4DED@Connotech.com> Date: Sun, 07 Dec 2003 22:15:00 -0000 From: Thierry Moreau X-Accept-Language: en MIME-Version: 1.0 To: Torsten Mohr CC: gdb@sources.redhat.com Subject: Re: remote target: compare a loaded file References: <200312071840.34366.tmohr@s.netic.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-12/txt/msg00142.txt.bz2 Torsten Mohr wrote: > Hi, > > at the moment i write some code to implement a > remote GDB server. I suspect that the program > i download into a target is changed somehow. > > Can i somehow easily "compare" the downloaded > program? > > Something like: > > bash# arm-unknown-elf-gdb main.elf > (gdb) target remote localhost:2000 // connect to target > (gdb) load main.elf > (gdb) compare_downloaded_file main.elf > > Is something like this possible? > > Can i somehow write a region of memory as binary into a > file? > Yes, you can. Reading the .ELF file for an executable software image to extract what is actually loaded in a remote embedded system is a simple programming assignement. If you need the source code example of what you whish to do, you may download the ABCD Proto-Kernel distribution http://www.connotech.com/abcd_proto_kernel/abcd_proto_kernel_intro.htm and look at the project elf_post_ld. Sincerely, -- - Thierry Moreau CONNOTECH Experts-conseils inc. 9130 Place de Montgolfier Montreal, Qc H2M 2A1 Tel.: (514)385-5691 Fax: (514)385-5900 e-mail: thierry.moreau@connotech.com