Merge pull request #329 from dj3vande/gdbserver-segfault-fix

Fix segfault in gdb-server
pull/336/head
texane 2015-08-17 22:06:57 +02:00
commit 1a1f950027
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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);