From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27905 invoked by alias); 4 Jun 2012 09:33:25 -0000 Received: (qmail 27895 invoked by uid 22791); 4 Jun 2012 09:33:24 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.securitas-direct.com (HELO mail.securitas-direct.com) (91.199.64.45) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Jun 2012 09:32:58 +0000 Received: from unknown (HELO sdwands2.sec.intra) ([172.30.40.21]) by mail.securitas-direct.com with ESMTP; 04 Jun 2012 11:32:56 +0200 MIME-Version: 1.0 In-Reply-To: References: Subject: Simple suggestion to get basic core-file alike functionality for bare-metal targets From: Fredrik Hederstierna To: gdb@sourceware.org Message-ID: Date: Mon, 04 Jun 2012 09:33:00 -0000 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1 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: 2012-06/txt/msg00022.txt.bz2 When debugging with bare-metal targets often core-file alike support would = be nice. Though many targets lack core-file support. If GDB is connected you could eg. store RAM using dump memory filename.bin start_addr end_addr restore filename.bin binary start_addr then save registers by hand to save 'basic' core-file data. Wouldn't it be great to 1. Have similar command to dump also all registers / CPU-states to file? Eg. dump registers filename.reg Then be able to restore them restore filename.reg registers 2. Perhaps have a generic 'core-light-file' format. This could contain memory + registers (+ maybe more basic CPU states)? Note though, that the dump files needs to be generated by debugged code its= elf, if running without connection to GDB. This to examine eg. crashes off-line = later. The point is to get some kind of standard format and to ease the restoring = of registers etc. I can consider to look into adding the dump-register command and put some o= wn time into this, if the community think its a good idea? Thanks and Best Regards Fredrik