Closed thlorenz closed 6 years ago
If at the same V8 version you have line info on Linux and not on Mac OS X that probably means Mach-O is potentially malformed. I'd just throw some printf's into https://github.com/v8/v8-git-mirror/blob/master/src/gdb-jit.cc#L1791and see if it tries to generate it at all. Then see what it generates and what it registers.
There is also FLAG_gdbjit_dump
(in DEBUG build) that would force V8 to dump all object files it generates in memory (to verify that they reach LLDB untruncated)
I did try FLAG_gdbjit_dump
which resulted in lots of elfs in my /tmp
folder.
I wasn't sure what to do with those since after all I'm on OSX. Dumping symbols out of them lead to nothing useful.
I'll try to look at more details by logging inside gdb-jit.cc
, thanks.
@thlorenz I doubt they are elf's, they are just called this way. I suggest dumping them just to check the size it should match the size you are seeing in the LLDB.
[if they actually are elf's and not MachO that means V8 does not understand it needs to generate Mach-O files]
Ok, makes sense, as i said I was able to dwarfdump
them, so most likely not really elfs.
However as I mentioned no useful info was contained in them.
I'll dig more in that direction and possibly attach some generated object files somewhere to figure this out.
Trying to gain information here WRT to a bug I filed with lldb originally.
Basically I just want to make sure I understand the problem correctly in order to file a helpful bug report with the v8 team. I created a step by step guide to help reproduce the problem.
The latest from the mentioned bug report is that some information seems to be missing from the DWARF that is generated by v8 (I wrote the memory indicated to contain the JIT info to disk to be able to
dwarfdump
it).Quoting Greg Clayton from the lldb team:
@mraleph gave some pointers on twitter
In the above
dwarfdump
I see neither of those mentioned debug sections. So seems like it's just missing completely?Greg Clayton from the lldb team suggested:
indicating that a huge portion of the information is missing.
I personally just started diving into the land of dwarfs, elfs and machos so any help to clarify things or pointers where to look, what to read up on, etc. to figure this out is greatly appreciated.
I also have a feeling that @indutny may know a lot more about this than I do at this point ;)