DavidSpickett wrote:

> So lldb is sending the fields in the correct order to debugserver. I assume 
> lldb+lldb-server behaves the same way, but I didn't check.

I have the test case and docs change in 
https://github.com/llvm/llvm-project/pull/200411/changes, this PR is working on 
top of that. Forgot to mention that.

I noticed the documentation mistake while writing the test case using 
lldb+lldb-server so yes it is correct for them too.

> The only change in this PR beyond the documentation fix & the test case is a 
> change to Mach-O binaries

That looks like a mistake to me, I think it should be "if not MachO then return 
values for more symbol types". Maybe I am misreading it but even so, the intent 
is to change the behaviour of non-MachO targets (aka ELF).

At least that seemed to be the way to go after reading 
https://github.com/llvm/llvm-project/commit/358cf1ea302ebc9c2f307aa710c22821a4ab670a.

> It seems more like the problem is that Symbol::GetLoadAddress() for a symbol 
> whose base address is Absolute won't return the raw offset value. It looks 
> like this was changed with a commit by Greg

So what we have now would provide more symbol values at the risk of returning 
some completely bogus values.

That change is probably the answer to why we ended up with a switch statement 
here in the first place. It does feel like the wrong layer to be checking this 
sort of thing.

@aurore-poirier please look into f0697d7c3fb5296cfec1718206aceb77b7ca9ab8 and 
see if the symbols you have issues with are effected by it.

FWIW it does say "As far as I can tell, these symbol's values are not 
addresses, even if they do have a size.". So its concern seems to be the making 
of sections, not that the value of the symbol doesn't have any use at all.

> are we just trying to be comprehensive here, or is there a problem being 
> fixed?

https://github.com/llvm/llvm-project/pull/200134#issuecomment-4563376018 
OpenOCD is asking lldb for symbol values and gdb would provide them, but we do 
not.

@aurore-poirier please copy your explanation of the problem into the PR 
description as well, easier to find it there.

https://github.com/llvm/llvm-project/pull/200134
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to