Discussion:
[Bug gdb/23895] New: dump binary/verilog memory does not work with symbols
mneilly at yahoo dot com
2018-11-19 01:16:12 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23895

Bug ID: 23895
Summary: dump binary/verilog memory does not work with symbols
Product: gdb
Version: 7.12
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: mneilly at yahoo dot com
Target Milestone: ---

I'm attempting to dump binary images and verilog memory files for various
sections and finding that symbols are not handled properly.

When using symbols is gdb complains that it cannot access the address after the
range which is documented to be non-inclusive of the end address.

Using real values works.

Reading symbols from hello...(no debugging symbols found)...done.
(gdb) info address __data_start
Symbol "__data_start" is at 0x201020 in a file compiled without debugging.
(gdb) info address _edata
Symbol "_edata" is at 0x201030 in a file compiled without debugging.

(gdb) dump binary memory hello.bin __data_start _edata
Cannot access memory at address 0x201030

(gdb) dump binary memory hello.bin 0x201020 0x201030

(gdb) dump verilog memory hello.mem __data_start _edata
Cannot access memory at address 0x201030

(gdb) dump verilog memory hello.mem 0x201020 0x201030

(gdb) help dump verilog memory
Write contents of memory to a verilog hex file.
Arguments are FILE START STOP. Writes the contents of memory within
the range [START .. STOP) to the specified FILE in verilog hex format.
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.
mneilly at yahoo dot com
2018-11-19 01:54:20 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23895

Mike Neilly <mneilly at yahoo dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Version|7.12 |8.2

--- Comment #1 from Mike Neilly <mneilly at yahoo dot com> ---
I've confirmed the same/similar issue exists in 8.2.50.20181119-git.

Reading symbols from hello...
(No debugging symbols found in hello)
(gdb) dump verilog memory hello.mem __data_start _edata
'__data_start' has unknown type; cast it to its declared type
(gdb) dump verilog memory hello.mem (char*)__data_start (char*)_edata
Cannot access memory at address 0x201030
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...