[Lldb-commits] [PATCH] D42145: [lldb] Use vFlash commands when writing to target's flash memory regions
Owen Shaw via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 22 10:47:10 PST 2018
owenpshaw added inline comments.
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:3478
+ auto header = GetProgramHeaderByIndex(i);
+ if (header->p_paddr != 0)
+ return true;
> Can't p_paddr be zero and still be valid? Would a better test be "header->p_memsz > 0"?
Yes, a 0 paddr can be valid. This check will only ignore paddr if all segments have a 0 paddr, suggesting the linker didn't populate that field.
This decision is similar to what I did in llvm-objcopy for binary output, which in turn was based on GNU objcopy behavior: https://bugs.llvm.org/show_bug.cgi?id=35708#c4
More information about the lldb-commits