mirror of https://github.com/pwndbg/pwndbg.git
typeinfo: more types for golang and tests (#652)
parent
493b1a063c
commit
ce96491487
@ -0,0 +1,3 @@
|
||||
package main
|
||||
|
||||
func main() {}
|
||||
@ -0,0 +1,3 @@
|
||||
package main
|
||||
|
||||
func main() {}
|
||||
@ -0,0 +1,33 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import gdb
|
||||
|
||||
import tests
|
||||
|
||||
GOSAMPLE_X64 = tests.binaries.get('gosample.x64')
|
||||
GOSAMPLE_X86 = tests.binaries.get('gosample.x86')
|
||||
|
||||
|
||||
def test_typeinfo_go_x64(start_binary):
|
||||
"""
|
||||
Tests pwndbg's typeinfo knows about the Go x64 types.
|
||||
Catches: Python Exception <class 'gdb.error'> No type named u8.:
|
||||
Test catches the issue only if the binaries are not stripped.
|
||||
"""
|
||||
gdb.execute('file ' + GOSAMPLE_X64)
|
||||
start = gdb.execute('start', to_string=True)
|
||||
assert 'Python Exception' not in start
|
||||
|
||||
|
||||
def test_typeinfo_go_x86(start_binary):
|
||||
"""
|
||||
Tests pwndbg's typeinfo knows about the Go x32 types
|
||||
Catches: Python Exception <class 'gdb.error'> No type named u8.:
|
||||
Test catches the issue only if the binaries are not stripped.
|
||||
"""
|
||||
gdb.execute('file ' + GOSAMPLE_X86)
|
||||
start = gdb.execute('start', to_string=True)
|
||||
assert 'Python Exception' not in start
|
||||
Loading…
Reference in new issue