From: Edward Swarthout <Ed.Swarthout@Motorola.com>
To: gdb@sources.redhat.com
Subject: Re: A copy/save command ...
Date: Fri, 04 Jan 2002 12:03:00 -0000 [thread overview]
Message-ID: <200201042003.g04K3F219582@pacific.somerset.sps.mot.com> (raw)
In-Reply-To: <1010165997.16220.ezmlm@sources.redhat.com> (gdb-digest-help@sources.redhat.com)
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"?
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
next parent reply other threads:[~2002-01-04 20:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1010165997.16220.ezmlm@sources.redhat.com>
2002-01-04 12:03 ` Edward Swarthout [this message]
2002-01-04 12:48 ` Andrew Cagney
2002-01-04 13:18 ` Edward Swarthout
2002-01-04 14:14 ` Michael Snyder
2002-01-03 1:02 Andrew Cagney
2002-01-03 12:58 ` Daniel Jacobowitz
2002-01-03 20:29 ` Andrew Cagney
2002-01-04 9:39 ` Frank Ch. Eigler
2002-01-04 11:54 ` Daniel Jacobowitz
2002-01-04 12:57 ` Andrew Cagney
2002-01-04 13:02 ` Frank Ch. Eigler
2002-01-04 13:24 ` Andrew Cagney
2002-01-04 14:12 ` Michael Snyder
2002-01-04 14:48 ` Grant Edwards
2002-01-04 14:10 ` Michael Snyder
2002-01-17 16:27 ` Andrew Cagney
2002-01-17 17:14 ` Frank Ch. Eigler
2002-02-08 13:55 ` Andrew Cagney
2002-02-23 10:24 ` Andrew Cagney
2002-01-17 17:29 ` Vlasios Tsiatsis
2002-02-08 13:24 ` Andrew Cagney
2002-01-17 23:20 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200201042003.g04K3F219582@pacific.somerset.sps.mot.com \
--to=ed.swarthout@motorola.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox