Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable resolves #115

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Variable resolves #115

wants to merge 5 commits into from

Conversation

richo
Copy link
Contributor

@richo richo commented Mar 23, 2016

Enough machinery to resolve pointers and locate global syms on lldb.

lmk if you want a gdb implementation, I'm not like.. against writing one but I kinda cbf.

I added some tests but I can't run them on my machine :/

@snare
Copy link
Owner

snare commented Mar 24, 2016

tests.lldb_api_tests.test_version ... ok
tests.lldb_api_tests.test_state_invalid ... ok
tests.lldb_api_tests.test_targets_not_running ... ok
tests.lldb_api_tests.test_targets_stopped ... ok
tests.lldb_api_tests.test_registers ... ok
tests.lldb_api_tests.test_stack_pointer ... ok
tests.lldb_api_tests.test_program_counter ... ok
tests.lldb_api_tests.test_memory ... ok
tests.lldb_api_tests.test_stack ... ok
tests.lldb_api_tests.test_disassemble ... ok
tests.lldb_api_tests.test_command ... ok
tests.lldb_api_tests.test_resolve_variable ... ERROR
tests.lldb_api_tests.test_deref_variable ... ERROR
tests.lldb_api_tests.test_dereference_main ... ok
tests.lldb_api_tests.test_dereference_rsp ... ok
tests.lldb_api_tests.test_dereference_string ... ok
tests.lldb_api_tests.test_breakpoints ... ok
tests.lldb_api_tests.test_capabilities ... ok

======================================================================
ERROR: tests.lldb_api_tests.test_resolve_variable
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/Data/Users/snare/Library/Python/2.7/lib/python/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Volumes/Data/Users/snare/code/voltron/voltron/tests/lldb_api_tests.py", line 132, in test_resolve_variable
    assert output.load_addr > 0
AttributeError: 'NoneType' object has no attribute 'load_addr'

======================================================================
ERROR: tests.lldb_api_tests.test_deref_variable
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/Data/Users/snare/Library/Python/2.7/lib/python/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Volumes/Data/Users/snare/code/voltron/voltron/tests/lldb_api_tests.py", line 140, in test_deref_variable
    value = adaptor.read_pointer(output)
  File "/Volumes/Data/Users/snare/code/voltron/voltron/voltron/dbg.py", line 61, in inner
    return func(self, *args, **kwargs)
  File "/Volumes/Data/Users/snare/code/voltron/voltron/voltron/dbg.py", line 35, in inner
    return func(self, *args, **kwargs)
  File "/Volumes/Data/Users/snare/code/voltron/voltron/voltron/dbg.py", line 77, in inner
    raise e
TypeError: in method 'SBProcess_ReadPointerFromMemory', argument 2 of type 'lldb::addr_t'

----------------------------------------------------------------------
Ran 18 tests in 5.902s

FAILED (errors=2)
zsh: segmentation fault  nosetests -sv tests/lldb_api_tests.py

@snare
Copy link
Owner

snare commented Mar 24, 2016

$ lldb --version
lldb-buildbot-2015-12-31 (LLDB 57ccfa8536, LLVM 3ebdbb2c7e, Clang f66c5bb67b, Swift-2.2 1f2908b4f7)

@snare
Copy link
Owner

snare commented Mar 24, 2016

I was gonna say I haven't had time to really look at it but I've basically been staring at nothing all day so I might try and look at it tonight :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants