|
|
|
|
@ -18,7 +18,7 @@ def test_context_disasm_show_fd_filepath(start_binary):
|
|
|
|
|
gdb.execute("break main")
|
|
|
|
|
gdb.execute("continue")
|
|
|
|
|
|
|
|
|
|
# Stop on read(0, ...) -> should show /dev/pts/X
|
|
|
|
|
# Stop on read(0, ...) -> should show /dev/pts/X or pipe:X on CI
|
|
|
|
|
gdb.execute("nextcall")
|
|
|
|
|
|
|
|
|
|
out = pwndbg.commands.context.context_disasm()
|
|
|
|
|
@ -32,7 +32,7 @@ def test_context_disasm_show_fd_filepath(start_binary):
|
|
|
|
|
assert "call read@plt" in line_call_read
|
|
|
|
|
|
|
|
|
|
line_fd = line_fd.strip()
|
|
|
|
|
assert re.match(r"fd:\s+0x1 \(/dev/pts/\d+\)", line_fd)
|
|
|
|
|
assert re.match(r"fd:\s+0x1 \((/dev/pts/\d+|\[pipe:\d+\])\)", line_fd)
|
|
|
|
|
|
|
|
|
|
line_buf = line_buf.strip()
|
|
|
|
|
assert re.match(r"buf:\s+0x[0-9a-f]+ ◂— 0x0", line_buf)
|
|
|
|
|
|