clayborg added a comment.

In D108061#2955707 <https://reviews.llvm.org/D108061#2955707>, @rdhindsa wrote:

> Looking further as to why executable symbols are not loaded, it looks like 
> when we read the link_map in lldb, AddSOEntries() is called for all the 
> entries in link_map read from ld.so. The first entry's name(which corresponds 
> to executable) is empty, which seems to be set by ld.so here 
> (https://github.com/bminor/glibc/blob/master/elf/rtld.c#L1389). main_map at 
> this location has the entry for respective executable, but its name is 
> removed, hence lldb while going through entries can't read entry about main 
> executable. 
> I verified that lldb does iterate through the link_map list with this patch, 
> reading that file name as empty. I also verified that if respective line is 
> commented in ld.so , and hence the name of executable is retained, lldb with 
> this patch is able to set breakpoint on main as well. Hence, it would require 
> change to glibc as well. Once that is in, we can add additional test for that 
> feature later on as a follow-up patch. Does that sound okay?

Since the executable name is empty, I wonder what would happen if we looked up 
the address in the memory region information. This information is populated by 
the /proc/<pid>/maps file, and each memory region has a name, and that name is 
usually the path to the object file on disk. As one last effort can you check 
if the address' memory region info has the path to the executable?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108061/new/

https://reviews.llvm.org/D108061

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to