[lldb-dev] "target modules load" and breakpoints not working correctly
Greg Clayton via lldb-dev
lldb-dev at lists.llvm.org
Tue Mar 22 13:50:45 PDT 2016
> On Mar 22, 2016, at 1:45 PM, Ted Woodward <ted.woodward at codeaurora.org> wrote:
>
>
> This is the code in DynamicLoaderHexagonDYLD.cpp that is loading sections, with my change to call GetLoadBaseAddress():
>
> for (unsigned i = 0; i < num_sections; ++i)
> {
> SectionSP section_sp (sections->GetSectionAtIndex(i));
> lldb::addr_t new_load_addr = section_sp->GetFileAddress() + base_addr;
>
> if (section_sp->GetLoadBaseAddress(&target) == LLDB_INVALID_ADDRESS)
> target.SetSectionLoadAddress(section_sp, new_load_addr);
> }
>
> But section_sp->GetLoadBaseAddress() always returns LLDB_INVALID_ADDRESS, even when I set the slide with "target modules load -f dlopen -s 0x20000" and verify that it's there with " image dump sections dlopen", so I'm always calling SetSectionLoadAddress() with the section's file address.
Step through the code and let me know what isn't working.
More information about the lldb-dev
mailing list