Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clamp gdb memory reads to 0x1800 #372

Merged
merged 1 commit into from
Feb 19, 2016
Merged

Conversation

gtalusan
Copy link
Contributor

Similar to #371.

I'm trying to backup the flash memory on an EMW3165 with an eBay ST-Link v2 using the following command:

$ gdb
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin15.0.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) target extended-remote :4242
Remote debugging using :4242
0x00000000 in ?? ()
(gdb) dump binary memory out.bin 0x8000000 0x8080000

st-util -v99 shows the USB transfer erring out with a -6. The gdbserver output shows that 0x1ffff chunks of bytes are being requested but this exceeds the magic 0x1800 in the code.

This patch will return at most 0x1800 bytes. In my testing, it looks like gdb generates the same output file as st-flash does after #371.

texane added a commit that referenced this pull request Feb 19, 2016
clamp gdb memory reads to 0x1800
@texane texane merged commit 37876a1 into stlink-org:master Feb 19, 2016
@Nightwalker-87 Nightwalker-87 added this to the v1.2.0 and older milestone Feb 26, 2020
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants