kopia lustrzana https://github.com/stlink-org/stlink
Merge pull request #329 from dj3vande/gdbserver-segfault-fix
Fix segfault in gdb-serverpull/336/head
commit
1a1f950027
|
@ -705,8 +705,8 @@ static int flash_go(stlink_t *sl) {
|
||||||
for(struct flash_block* fb = flash_root; fb; fb = fb->next) {
|
for(struct flash_block* fb = flash_root; fb; fb = fb->next) {
|
||||||
DLOG("flash_do: block %08x -> %04x\n", fb->addr, fb->length);
|
DLOG("flash_do: block %08x -> %04x\n", fb->addr, fb->length);
|
||||||
|
|
||||||
unsigned length = fb->length;
|
|
||||||
for(stm32_addr_t page = fb->addr; page < fb->addr + fb->length; page += FLASH_PAGE) {
|
for(stm32_addr_t page = fb->addr; page < fb->addr + fb->length; page += FLASH_PAGE) {
|
||||||
|
unsigned length = fb->length - (page - fb->addr);
|
||||||
|
|
||||||
//Update FLASH_PAGE
|
//Update FLASH_PAGE
|
||||||
stlink_calculate_pagesize(sl, page);
|
stlink_calculate_pagesize(sl, page);
|
||||||
|
|
Ładowanie…
Reference in New Issue