From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26302 invoked by alias); 11 Apr 2003 16:51:22 -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 26228 invoked from network); 11 Apr 2003 16:51:19 -0000 Received: from unknown (HELO hydra.ubicom.com) (4.20.168.98) by sources.redhat.com with SMTP; 11 Apr 2003 16:51:19 -0000 Received: FROM fenway.scenix.com BY hydra.ubicom.com ; Fri Apr 11 09:47:51 2003 -0700 Received: from nkelseyxp (nkelsey-xp.scenix.com [192.168.1.246]) by fenway.scenix.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2656.59) id 2RTF3W68; Fri, 11 Apr 2003 09:47:52 -0700 Message-ID: <043701c3004a$49ca4b00$f601a8c0@scenix.com> Reply-To: "Jafa" From: "Jafa" To: Subject: self decompressing code Date: Fri, 11 Apr 2003 16:51:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2003-04/txt/msg00117.txt.bz2 Hi all, This isn't a problem with GDB but I would appreciate your advice on a usage model.... The ip2k is an embedded processor and we compile a single elf file to be used to program and debug the ip2k which executes out of internal flash. External flash can also be used and I have just added code to remote-ip2k.c to program external flash. The image that is uploaded to external flash is a compressed upgrade image. When the chip boots up it will decompress code/data to internal flash and external flash. This scheme works well except for two problems: 1) GDB downloads the .text section even though it is not needed and is overwritten. If I change the section flags such that the .text section is not loadable then GDB complains that it can't debug the file. 2) Any breakpoints that are inserted are overwritten - I need to add a break on the reset vector. Ideas so far: 1) Modify the upgrade/decompression code so that it doesn't write the internal flash. This would solve the breakpoint problem but is noticably slower (it is faster to upload the compressed image) and the scheme will be difficult to modify. 2) Modify gdb so it ignores the fact that the .text section isn't loadable. Add an auto-inserted breakpoint on the reset vector. If you have any thoughts or ideas I would appreciate the advice. BTW - I wrote the second-generation ip2k GDB port... I am happy teaching gdb anything. Nick