[lldb-dev] "target modules load" and breakpoints not working correctly

Ted Woodward via lldb-dev lldb-dev at lists.llvm.org
Wed Mar 23 09:44:40 PDT 2016


"process launch" calls Target::Launch, which calls
PlatformHexagon::DebugProcess, which calls Target::CreateProcess, which
calls Target::DeleteCurrentProcess, which calls SectionLoadList::Clear,
which erases the section-to-addr mappings.

"gdb-remote" calls Platform::ConnectProcess, which calls
Target::CreateProcess, which calls Target::DeleteCurrentProcess, which calls
SectionLoadList::Clear, which erases the section-to-addr mappings.

--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project


-----Original Message-----
From: Greg Clayton [mailto:gclayton at apple.com] 
Sent: Tuesday, March 22, 2016 3:51 PM
To: Ted Woodward <ted.woodward at codeaurora.org>
Cc: LLDB <lldb-dev at lists.llvm.org>
Subject: Re: [lldb-dev] "target modules load" and breakpoints not working
correctly


> 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