|
|
|
|
@ -70,7 +70,8 @@ def test_loads_pure_gdb_without_crashing():
|
|
|
|
|
def test_loads_binary_without_crashing():
|
|
|
|
|
output = run_gdb_with_script(binary=BASH_BIN).splitlines()
|
|
|
|
|
|
|
|
|
|
expected = ['Reading symbols from %s...(no debugging symbols found)...done.' % BASH_BIN]
|
|
|
|
|
expected = ['Reading symbols from %s...' % BASH_BIN,
|
|
|
|
|
'(No debugging symbols found in %s)' % BASH_BIN]
|
|
|
|
|
expected += HELLO
|
|
|
|
|
|
|
|
|
|
assert all(item in output for item in expected)
|
|
|
|
|
@ -81,13 +82,47 @@ def test_loads_binary_with_core_without_crashing():
|
|
|
|
|
output = run_gdb_with_script(binary=BASH_BIN, core=BASH_CORE).splitlines()
|
|
|
|
|
|
|
|
|
|
expected = [
|
|
|
|
|
'Reading symbols from %s...(no debugging symbols found)...done.' % BASH_BIN,
|
|
|
|
|
'''[New LWP 13562]''',
|
|
|
|
|
'''Core was generated by `/home/user/pwndbg/tests/corefiles/bash/binary'.''',
|
|
|
|
|
'''Program terminated with signal SIGINT, Interrupt.''',
|
|
|
|
|
'''#0 __addmntent (stream=0x7ffff79a7640 <_nl_global_locale+192>, ''',
|
|
|
|
|
''' mnt=<optimized out>) at mntent_r.c:257''',
|
|
|
|
|
'''257\tmntent_r.c: No such file or directory.'''
|
|
|
|
|
'Reading symbols from %s...' % BASH_BIN,
|
|
|
|
|
'(No debugging symbols found in %s)' % BASH_BIN,
|
|
|
|
|
'',
|
|
|
|
|
"warning: Can't open file /home/user/pwndbg/tests/corefiles/bash/binary "
|
|
|
|
|
'during file-backed mapping note processing', '',
|
|
|
|
|
"warning: Can't open file /lib/x86_64-linux-gnu/libnss_files-2.19.so during "
|
|
|
|
|
'file-backed mapping note processing', '',
|
|
|
|
|
"warning: Can't open file /lib/x86_64-linux-gnu/libnss_nis-2.19.so during "
|
|
|
|
|
'file-backed mapping note processing', '',
|
|
|
|
|
"warning: Can't open file /lib/x86_64-linux-gnu/libnsl-2.19.so during "
|
|
|
|
|
'file-backed mapping note processing', '',
|
|
|
|
|
"warning: Can't open file /lib/x86_64-linux-gnu/libnss_compat-2.19.so during "
|
|
|
|
|
'file-backed mapping note processing', '',
|
|
|
|
|
"warning: Can't open file /lib/x86_64-linux-gnu/libc-2.19.so during "
|
|
|
|
|
'file-backed mapping note processing', '',
|
|
|
|
|
"warning: Can't open file /lib/x86_64-linux-gnu/libdl-2.19.so during "
|
|
|
|
|
'file-backed mapping note processing', '',
|
|
|
|
|
"warning: Can't open file /lib/x86_64-linux-gnu/ld-2.19.so during file-backed "
|
|
|
|
|
'mapping note processing',
|
|
|
|
|
"[New LWP 13562]", '',
|
|
|
|
|
"warning: Unexpected size of section `.reg-xstate/13562' in core file.", '',
|
|
|
|
|
'warning: .dynamic section for "/lib/x86_64-linux-gnu/libtinfo.so.5" is not '
|
|
|
|
|
'at the expected address (wrong library or version mismatch?)', '',
|
|
|
|
|
'warning: .dynamic section for "/lib/x86_64-linux-gnu/libdl.so.2" is not at '
|
|
|
|
|
'the expected address (wrong library or version mismatch?)', '',
|
|
|
|
|
'warning: .dynamic section for "/lib/x86_64-linux-gnu/libc.so.6" is not at '
|
|
|
|
|
'the expected address (wrong library or version mismatch?)', '',
|
|
|
|
|
'warning: .dynamic section for "/lib64/ld-linux-x86-64.so.2" is not at the '
|
|
|
|
|
'expected address (wrong library or version mismatch?)', '',
|
|
|
|
|
'warning: .dynamic section for "/lib/x86_64-linux-gnu/libnss_compat.so.2" is '
|
|
|
|
|
'not at the expected address (wrong library or version mismatch?)', '',
|
|
|
|
|
'warning: .dynamic section for "/lib/x86_64-linux-gnu/libnsl.so.1" is not at '
|
|
|
|
|
'the expected address (wrong library or version mismatch?)', '',
|
|
|
|
|
'warning: .dynamic section for "/lib/x86_64-linux-gnu/libnss_nis.so.2" is not '
|
|
|
|
|
'at the expected address (wrong library or version mismatch?)', '',
|
|
|
|
|
'warning: .dynamic section for "/lib/x86_64-linux-gnu/libnss_files.so.2" is '
|
|
|
|
|
'not at the expected address (wrong library or version mismatch?)',
|
|
|
|
|
"Core was generated by `/home/user/pwndbg/tests/corefiles/bash/binary'.",
|
|
|
|
|
'Program terminated with signal SIGINT, Interrupt.', '',
|
|
|
|
|
"warning: Unexpected size of section `.reg-xstate/13562' in core file.",
|
|
|
|
|
'#0 0x00007ffff76d36b0 in ?? ()',
|
|
|
|
|
]
|
|
|
|
|
expected += HELLO
|
|
|
|
|
|
|
|
|
|
|