[lldb-dev] Fixing cross platform mac to linux remote expression evaluation

Pavel Labath labath at google.com
Fri May 1 10:03:48 PDT 2015

Also sending to the list....

On 1 May 2015 at 18:03, Pavel Labath <labath at google.com> wrote:
> On 1 May 2015 at 15:00, Robert Flack <flackr at gmail.com> wrote:
>> I'd like to not depend on the debug symbols, but we should definitely load
>> them if we can find them (as we do when running locally). The symbol table
>> is in the stripped .so (readelf -s or objdump -T show the symbol entries for
>> mmap), but we're calling SymbolFileSymtab::FindFunctions which returns 0
>> because we don't have the full method info. When called from
>> lldb_private::InferiorCallMmap, it seems like all we need is the base
>> address which we could get that from the symbol table. To support general
>> function calls into those functions though, as far as I can tell we can't
>> tell from the symbol table what arguments are required, only the base
>> address. I haven't tested this yet but I'm hoping that if the system header
>> file for that function is included we'll find the function spec in the
>> target's debug info.
> I agree with you 100%, debug info should be loaded when present, and
> we should find out why it is not being loaded now. My comment was
> specifically about calling mmap, which should work even without debug
> symbols (and it does work when you debug linux->linux).
> I don't remember the details, but I seem to recall there are two ways
> to find symbols, one of them uses only the symbol table (.symtab or
> .dynsym section), while the other relies on debug info. The first one
> is used as a fallback when debuginfo is not present, and it normally
> finds mmap.
> cheers,
> pavel

More information about the lldb-dev mailing list