Ensure memories are printed at most once for -p */S

This commit is contained in:
Stefan Rueger 2022-08-10 22:25:19 +01:00
parent c9cf308037
commit ccb576ebc1
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
1 changed files with 3 additions and 3 deletions

View File

@ -383,7 +383,7 @@ static int avrpart_deep_copy(AVRPARTdeep *d, AVRPART *p) {
// Fill in all memories we got in defined order
di = 0;
for(size_t mi=0; mi < sizeof avr_mem_order/sizeof *avr_mem_order && avr_mem_order[mi]; mi++) {
m = p->mem? avr_locate_mem(p, avr_mem_order[mi]): NULL;
m = p->mem? avr_locate_mem_noalias(p, avr_mem_order[mi]): NULL;
if(m) {
if(di >= sizeof d->mems/sizeof *d->mems) {
avrdude_message(MSG_INFO, "%s: ran out of mems[] space, increase size in AVRMEMdeep of developer_opts.c and recompile\n", progname);
@ -553,8 +553,8 @@ static void dev_part_strct(AVRPART *p, bool tsv, AVRPART *base) {
for(size_t mi=0; mi < sizeof avr_mem_order/sizeof *avr_mem_order && avr_mem_order[mi]; mi++) {
AVRMEM *m, *bm;
m = p->mem? avr_locate_mem(p, avr_mem_order[mi]): NULL;
bm = base && base->mem? avr_locate_mem(base, avr_mem_order[mi]): NULL;
m = p->mem? avr_locate_mem_noalias(p, avr_mem_order[mi]): NULL;
bm = base && base->mem? avr_locate_mem_noalias(base, avr_mem_order[mi]): NULL;
if(!m && bm && !tsv)
dev_info("\n memory \"%s\" = NULL;\n", bm->desc);