[Lldb-commits] [lldb] Add new API in SBTarget for loading core from SBFile (PR #71769)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 17 10:23:40 PST 2023


clayborg wrote:

I am not sure how this actually works? We pass in a SBFile and then get the FileSpec from it and then somehow that allows us to open a file that doesn't actually exist on disk? Or does this work _because_ the `fd` we had is actually backed by some file on disk? In that case we didn't even need this new API as we could have extracted the file path from the descriptor and just passed that into LLDB.

The story is that linux allows a tool to get run when a core file is created and it gets a integer file descriptor for the core file that is used to access the core file. Prior to this fix we would write the file to disk and then load it into the debugger. Now we want to use the "fd" to load the core file, so our SBFile must be able to extract the actual backing file and then we will need to re-open this file in lldb???

https://github.com/llvm/llvm-project/pull/71769


More information about the lldb-commits mailing list