Reverse debugging at a large scale

β€” . Fullstack- Python , Facebook; FB LLDB, .





, , . 0,1 % , . , 0,1 % , . , .






. ( ) , , . , Facebook, , .





, , , . CPU , LLDB, β€” -.





, ?

Intel Processor Trace (Intel PT), , . β€” .





, , Intel PT . , , , :





When multiple processes (A and B) are running at the same time, the trace data is stored in a buffer.  At t + 8, process B's data starts overwriting the oldest data (process A's data) in the buffer.
(A B) , . t+8 B ( A) .

, , , Intel PT . , . , . , .





, eBPF- β€” , , , , , . , , .





, , - . , .





, ? . , . , LLDB, . . .





The trace primarily contains information about which branches were captured and which were not.  We compare this information with all instructions from the original binary and restore the instructions that were executed by the program.  Later, using the LLDB symbolization stack, we can get the relevant information about the source code and show it to the engineer in a readable form.
, , β€” . , . LLDB .

:





β€” LLDB. β€” . , , . , , .





A part of the function call tree, where each vertical segment contains instructions, and the places of the call are indicated by arrows.
, , .

, , , ; . , β€” ?





, 16 . 13, 15, , if . , , , , foo . , , . .





, . , function_a. :





, - VSCode, .





, , . , ; , ( ), , β€” .





, , . , fetch .





, (, P99). . , , , , . .





, : B .





, . , " " , Tracery. , LLDB . β€” , .





? , , 0,1 % , "Reverse debug on VSCode". , , , , if, , .





, . ( ) , . , . , .





, :





  • Data Scientist





  • Data Analyst





  • Data Engineering









  • Fullstack- Python





  • Java-





  • QA- JAVA





  • Frontend-









  • C++





  • Unity





  • -





  • iOS-





  • Android-









  • Machine Learning





  • "Machine Learning Deep Learning"





  • " Data Science"





  • " Machine Learning Data Science"





  • "Python -"





  • " "









  • DevOps








All Articles