facebook / facebook/hhvm

DumpTC is not dumping bytescodes

Open
#7,302 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

### HHVM Version

HipHop VM 3.15.0-dev (rel)
Compiler: heads/master-0-gd8591b1bae517929a27474fc103180d57e6328f2
Repo schema: ca03b9d0005f83442a55f54ab604919695f40474
### Standalone code, or other way to reproduce the problem

`$ nano hhvm/hphp/test/quick/echo.php`

```
/dev/null
`$ hphp/tc-print
### Expected result

Bytecodes dumped before disassembled code (something like):

```
ReleaseVVAndSkip
0x6c004a1: cmpq $0x0, 0x28(%rbp)
0x6c004a6: jnz 0xe800856
```
### Actual result (trimmed)

```
# Read 0 symbols from file /tmp/tc_dump_helpers_addrs.txt
# Config file:
# Repo schema: ca03b9d0005f83442a55f54ab604919695f40474

====================
Translation 0 {
src.md5 = 61633864303138646139396434353164
src.funcId = 6361
src.funcName = Pseudo-main
src.resumed = false
src.bcStartOffset = 0
src.guards = 0
kind = TransLive
hasLoop = 0
aStart = 0x560045a
aLen = 0x7b
coldStart = 0xd200841
coldLen = 0x4d
frozenStart = 0xea000ab
frozenLen = 0x0
}

----------
bytecode:
----------
<<< couldn't find unit 61633864303138646139396434353164 to print bytecode range [0,19) >>>
----------
x64: main
----------
<<< couldn't find unit 61633864303138646139396434353164 to print bytecode at offset 0 >>>
0x560045a: mov $0x7f48ccd75060, %rax
0x5600464: movq %rax, -0x20(%rbp)
0x5600468: movl $0x0, -0x14(%rbp)
<<< couldn't find unit 61633864303138646139396434353164 to print bytecode at offset 6 >>>
0x560046f: movq %rbp, -0x30(%rbp)
0x5600473: movl $0x8, -0x18(%rbp)
0x560047a: leaq -0x30(%rbp), %rbp
0x560047e: data16 nop
0x5600480: callq 0x9200014 # SYMBOL @ 0x9200014
<<< couldn't find unit 61633864303138646139396434353164 to print bytecode at offset 8 >>>
0x5600485: cmp $0x39, %dl
0x5600488: jle 0x56004a1
0x560048e: cmpl $0x1, 0xc(%rax)
0x5600492: jz 0xd200841
0x5600498: jl 0x56004a1
0x560049e: decl 0xc(%rax)
<<< couldn't find unit 61633864303138646139396434353164 to print bytecode at offset 18 >>>
0x56004a1: cmpq $0x0, 0x28(%rbp)
0x56004a6: jnz 0xd200856
<<< couldn't find unit 61633864303138646139396434353164 to print bytecode at offset 9 >>>
0x56004ac: movb $0x11, -0x8(%rbp)
0x56004b0: movq $0x1, -0x10(%rbp)
<<< couldn't find unit 61633864303138646139396434353164 to print bytecode at offset 18 >>>
....
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.