From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8103 invoked by alias); 4 Jan 2002 22:14:20 -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 7812 invoked from network); 4 Jan 2002 22:14:14 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 4 Jan 2002 22:14:14 -0000 Received: from redhat.com (reddwarf.cygnus.com [205.180.231.12]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id OAA18318; Fri, 4 Jan 2002 14:14:10 -0800 (PST) Message-ID: <3C362817.F428BB93@redhat.com> Date: Fri, 04 Jan 2002 14:14:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Edward Swarthout CC: gdb@sources.redhat.com Subject: Re: A copy/save command ... References: <1010165997.16220.ezmlm@sources.redhat.com> <200201042003.g04K3F219582@pacific.somerset.sps.mot.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-01/txt/msg00021.txt.bz2 Edward Swarthout wrote: > > From Daniel: > > Perhaps read/write? But that's still not clear which way is which. > > load/store would be perfect but load is already used. > > From FChE: > > and FORMAT could be some bfd-supported forms like "srec" or "binary". > > Couldn't adding binary support to load be considered the same as thing > as "read"? AFAIK load already supports binary format. Also srec. > Then the opposite of load, is dump. > > load/dump FILE SECTIONS(S) > > The trick is to create a way to specify the layout and format of the > desired sections. Some sort of a reverse "info maint sections". > > gdb> info maint sections > Exec file: > `/h1/swarthou/prg/empty/empty1', file type elf32-powerpc. > 0x10000074->0x10000098 at 0x00000074: .text ALLOC LOAD READONLY CO > 0x10000098->0x10000098 at 0x00000098: .sdata2 ALLOC LOAD READONLY > 0x100100a0->0x100100b0 at 0x000000a0: .data ALLOC LOAD DATA HAS_CO > 0x100100b0->0x100100b0 at 0x000000b0: .sdata ALLOC LOAD DATA HAS_C > 0x100100b0->0x100100b0 at 0x000000b0: .sbss HAS_CONTENTS > 0x100100b0->0x100100c0 at 0x000000b0: .bss ALLOC > Core file: > `/h1/swarthou/prg/empty/core', file type elf32-powerpc. > 0x00000000->0x00000654 at 0x000000b4: note0 READONLY HAS_CONTENTS > 0x00000000->0x000000c0 at 0x0000010c: .reg/14104 HAS_CONTENTS > 0x00000000->0x000000c0 at 0x0000010c: .reg HAS_CONTENTS > 0x00000000->0x00000108 at 0x00000600: .reg2/14104 HAS_CONTENTS > 0x00000000->0x00000108 at 0x00000600: .reg2 HAS_CONTENTS > 0x10000000->0x10000000 at 0x00001000: load1 ALLOC LOAD READONLY CO > 0x10010000->0x10011000 at 0x00001000: load2 ALLOC LOAD HAS_CONTENT > 0x7ffff000->0x80000000 at 0x00002000: load3 ALLOC LOAD CODE HAS_CO > > Then > gdb> load BINFILE1 .bss > or > gdb> dump BINFILE2 load1 > would do the desired thing. > > It would be natural to add core file support to load/dump too. > > There is still the issue of how to specify the format (binary, > elf-core, elf-object, srec, or other bfd type). Maybe some borrow > the syntax from objcopy or the loader. > > - Ed > > Ed.Swarthout@motorola.com > Somerset Design Center