Commit Graph
345 Commits
Author SHA1 Message Date
Marius Muenchandsampl 402725ecbf Dev/v1.4.4 (#84)
* Fix version check of pydbmi

* bugfix in pypanda CI testcase

* Allow docker login in CI to fail

The login was introduced to work around rate limiting for docker pulls
on dockerhub. However, the required tokens/env variables are not present
for pull requests, resulting into the CI failing. Hence, we now allow
this to be failing, and may need to manually restart CI builds for PRs.

* fix typos

* skip executable check for pypanda target

* v1.4.4: Update Changelog and setup.py

Co-authored-by: sampl <[email protected]>
v1.4.4
2021-03-28 20:21:22 +02:00
Grant Hernandez bc3d7b8c88 Add option to configure logging (#82)
Some clients already configure logging and avatar2 will hijack the logging config leading to duplicate output. Give clients the option to disable this behavior.
2021-03-28 18:41:05 +02:00
Grant Hernandez 6181c99fea Check for active PyPanda target during shutdown (#81)
* Check for active PyPanda target during shutdown

* Call super destructor for PyPanda target

Otherwise RemoteMemory /dev/mqueue items never get deleted.
2021-03-28 18:40:50 +02:00
Adam Van ScyocandAdam Van Scyoc 3085789337 Gdb core dumper plugin (#80)
* Add gdb_core_dumper plugin dump_core functionality

* Add gdb_core_dumper plugin documentation

* Remove redundant code

Co-authored-by: Adam Van Scyoc <[email protected]>
2021-03-11 19:26:30 +01:00
Marius Muench e5711d1ef3 V1.4.3 (#79)
* Conditional support for pc in remote memory accesses to pyperipherals

Only if all registered read and write handler support pc, it is
forwarded from the message

* black autoformatting

* qemu_target: logfile kwarg is absolute

* black autoformatting

* Update setup.py and changelog

* fix cached_property import according to pyversion
v1.4.3
2021-03-08 20:58:39 +01:00
mariusmue ea30c459e0 bugfix memory_ranges interval argument v1.4.2 2021-02-26 12:19:27 +01:00
Marius MuenchandGrant Hernandez 6666119dde Dev/v1.4.2 (#77)
* allow inlining of pyperipherals into qemu via API

* unicorn_caller plugin

* wrapper for add_hook

* adjust unicorn_caller import path

* Flags for transfer state rather than absolute bools

* allow avatar-reference to be dictifyable

* added overwrite option to memory ranges

* working version of mr-overwriting

* bugfix for overwrite option

* Rename memory region on overwrite to shorter name

QEMU has a memory name limit of 255. Memory regions with many splits can
create names that exceed this, leading to conflicts.

* additional debugging output

* Add pypanda add_hook function and testcase

The CI test is currently not working due to a bug on PANDAs hooking
infrastructure, which is investigated in parallel. Once fixed, the CI
test should work as expected.

* Bump version and updated changelog

Co-authored-by: Grant Hernandez <[email protected]>
2021-02-26 10:53:08 +01:00
Marius Muench 3b4f25bda1 v1.4.1 (#76)
* bugfix: qemu_target list properties

* introduce local argument to laod_plugin

* fix: don't use bytes as objectname

* minor bugfixes for pypanda target

* Authenticate to docker service during CI build

* attempt to push to PyPI on tagged commits

* bump version and changelog.md
v1.4.1
2021-02-19 12:07:53 +01:00
mariusmue 45b5450f5c Tick version, update changelog & paper references v1.4.0 2021-02-10 15:08:41 +01:00
Marius Muench 09a9a0b413 don't fix nosetest version to 3.4 (#75) 2021-02-10 11:48:39 +01:00
Marius Muench 350e75d5a2 use MANIFEST.in to include gdb-xml files (#74) 2021-02-10 10:38:16 +01:00
Marius Muench c41e6e5399 Dev/pypanda target (#73)
* Fix cpu at 100% spinning bug

Pygdbmis new API with multilevel timeout allows us to not spin at 100%
when waiting for responses, while not experience a performance degration
at the same time.

* move qemu_cmd_line init into __init__

* allow sublcassing for pandatarget

* refactor init to mulitple steps

* initial pypanda implementation

* use modern pypanda api

* add init watch

* add callback wrappers

* resolve qemutarget executable only if it is qemutarget

* Advancements in PyPandaTarget

* saner init of PandaTarget (for resolving executable)
* disable/enable callbacks
* high-performant memory read/write
* CI testcase

* Fix threading/signal issue

* Improved signal handling
2021-02-10 10:24:50 +01:00
Marius Muench c392248dc1 Fix cpu at 100% spinning bug (#72)
Pygdbmis new API with multilevel timeout allows us to not spin at 100%
when waiting for responses, while not experience a performance degration
at the same time.
2021-02-09 22:45:40 +01:00
rawsampleandFedor Niskov 90547c193d New MIPS architecture (#71)
* Import MIPS support from angr branch (MIPS BE and LE, GDB request optimization)

* Adjust MIPS support and its definitions

Co-authored-by: Fedor Niskov <[email protected]>
2021-02-09 11:38:22 +01:00
rawsample 477a7c2f13 Merge pull request #70 from avatartwo/dev/ubuntu2004
Ubuntu 20.04 + Dockerfile
2021-02-04 16:24:28 +00:00
sampl a8642c30de Dockerfile with qemu and panda target endpoints 2021-02-04 09:21:51 +01:00
sampl 7666981d5e Update readme, avatar-qemu and PANDA submodules 2021-02-03 15:51:35 +01:00
sampl 4b74b4fda9 Merge branch 'master' into dev/ubuntu2004 2021-02-03 10:37:38 +01:00
sampl 36f36d09f8 Missing gdbserver dep. + add qemu mips build 2021-02-03 09:01:29 +01:00
sampl 2ebafeed95 Missing python nose pkg for unit tests 2021-02-02 13:24:23 +01:00
Mikhail Klementev a5bcea69c2 Fix inconsistent use of tabs and spaces in indentation (#69)
Fix for max32_usart.py
2021-02-02 10:57:21 +01:00
sampl bf1d3bd6b4 Add Dockerfile 2021-02-01 15:10:37 +01:00
aurelf 613d75f2c2 Update README.md (#68)
Siemens had some internal restructuring, "Corporate Technology" got renamed to just "Technology", so rephrasing it to "SIEMENS AG - Technology"
2021-01-29 14:27:45 +01:00
Marius MuenchandGrant Hernandez 5bab7239c3 54/two tier bp (#63)
* Make BreakpointHitMessage be two states

* Adjust synchronization to two tier breakpoint

* unroll changes of watchmen clear/set processing-callbacks Event

* Adjust wait to explicitly check if we are SYNCING

* Increase timeout for targetwait smoketest

The two-tiered breakpoint approach slows execution down, hence, we need
some more time.

Co-authored-by: Grant Hernandez <[email protected]>
2020-11-27 10:54:04 +01:00
rawsample 7420af01c2 Move timezone to yml env variables 2020-11-17 15:12:23 +00:00
rawsample d308f9b961 export timezone for tzdata during CI 2020-11-17 12:38:33 +00:00
rawsample 0a6e18bfbe Move travis CI to Ubuntu 20.04 and python 3.8 2020-11-13 16:58:27 +00:00
rawsample 92d9bf5ccb Update target build scripts and panda submodule 2020-11-13 16:52:15 +00:00
rawsample b1d68cb754 Add support for install_ubuntu.sh script for panda 2020-11-13 15:43:10 +00:00
rawsample 4bf8c4f646 Add apt-get dependencies for targets openocd and avatar-qemu when installed from git 2020-11-13 15:38:12 +00:00
rawsample 4f912d9d42 Update the installer with gdb-multiarch 2020-11-13 15:34:20 +00:00
rawsample eeeadcc8cf Update avatar-qemu submodule to rebase on 5.1 (#62) 2020-10-22 11:08:19 +02:00
Marius Muench f5217053df update publication list and adding acknowledgementsin readme.md 2020-09-09 12:08:11 +02:00
Ruud Linssen bbd740323e Fixed upstream API change in pygdbmi (#57)
* Fixed upstream API change in pygdbmi issue

* Fixes support for pre python3.5

* Python version >= 3.5 requires pygdbmi>=0.10.0.0

* Fixes python 3.5 not supported in pygdbmi 0.10.0.0
2020-08-31 12:05:56 +02:00
Marius Muench c03fc2b92e Fix/issue54 (#55)
* guard waiting for watchmen via events

In rare occasions, a race can occure where watchmen callbacks are
running while the main-thread already consumes the update-state message.
This commit guards those callback by an additional event on which target
wait() is waiting for.
However, there may still be a small TOCTOU-window on that event, as the
waiting is using a timeout (for state-updates which are not generating
watchmen callbacks).

Hence, in the long run, the full code dealing with state updates could
benefit from refactoring.

* added smoketest for #54 (thanks @redfast00)

* Remove manual keystone-library copy from CI

It seems that keystone version 0.9.2 (as in pypi) has fixed the issues
regarding the installation path of keystone.

* Various fixes found by CI

* Add processing_callbacks to dictify-ignore list
Event()-Objects cannot be serialized, so it should either be private or
part of the ignore list. As the watchman are independently accessing
this Event, it's added to the ignore list

* Fix assert statement in smoketest to be py2-compliant

* Set environment variables for the smoketest
2020-07-14 21:36:04 +02:00
rawsample b32bfe086d Inception debugger (#52)
* Inception debugger target and protocol for cortex M3

See https://github.com/Inception-framework/debugger to build the debugger

* Add tests for read/write operations with the nucleo board example

* Add mockup tests for inception protocol

* PR improvment requests for the inception target

* Add pyusb to install requirement and adjust inception import
2020-04-13 00:43:54 +02:00
mariusmue bb09108ace gdbserver: stop on target exit 2020-04-05 15:10:56 +02:00
Marius Muench abed46e095 Gdb plugin (#51)
* gdb plugin!

* Advances in gdb plugin

* x86_64 implementation
* CI testscript

* introduce log_to_stdout kwarg to avatar

* minimal additions to gdbserver

* change plugin name to gdbserver
* support C-packet
2020-04-05 14:00:00 +02:00
Fabian Freyer 48c20b0442 gdb_memory_map_loader improvements (#50)
* gdb_memory_map_loader: reformat

* gdb_memory_map_loader: add as target method

For compatibility sake, a compat wrapper is added to the avatar object
as well, so the following are equivalent:

    avatar.load_memory_mappings(target)
    target.load_memory_mappings()

* gdb_memory_map_loader: add integration test case

* added update functionality to load_memory_maps

This also allows to give avatar.add_memory_range() an interval_tree
as argument, which - if set - the range will be added to.

* added testcase for memory_map_loader to travis
2020-01-30 17:57:35 +01:00
mariusmue 1bf813f112 ticked version number and updated changelog v1.3.1 2020-01-28 22:19:18 +01:00
Marius Muench 2fedf9b20e Dev/target update (#49)
* updated ref to qemu

* updated ref to panda

* modify panda-exec path for CI

* update panda-ref

* updated references to MAINLINED avatar changeds in panda

* fix pygdbmi version for python<3.5

pygdbmi droppsed support for python 2.7 and 3.x<3.5 with v0.9.0.3,
hence we fallback to 0.9.0.2 in those cases
2020-01-28 22:07:47 +01:00
mariusmue 9908413231 hasattr->getattr for better pretender compat 2020-01-22 13:31:30 +01:00
Marius Muench f5caa51b50 Feat/tpath env (#48)
* allow setting of target executable via env

* adjust testcases to use default-env

* Bugfix: init parent before resolve executable (panda_target)

* corrected qemu test path
2020-01-22 09:08:39 +01:00
mariusmue d58e8c6e38 Better openocd-error handling on startup+debug flag 2020-01-21 15:38:48 +01:00
Marius Muench 31f0b7e2b3 Syscall catch (#47)
Support for catching syscall, and various gdb-protocol test improvements

* experimental syscall catch support

* added gdb.quit() 
* Improvements for testing gdb protocol

Don't spawn the subprocesses with shell=True, so that we can send
p.terminate() in the tear down function.

* Added parsing for gdbserver output.
2020-01-08 18:36:13 +01:00
Marius Muench c81ae094c3 Gdbci fix (#46)
* modernize: test on x86_64 binaries

* remove 32bit dependencies for CI
2020-01-08 16:17:39 +01:00
Marius Muench a02f3f777d Breakpoint number of BreakpointhitMessage should be an Integer (#45) 2019-12-12 17:58:11 +01:00
mariusmue f3aabbba5a Addition of set_break_condition() function to gdb-protocol 2019-12-12 01:15:56 +01:00
Kyle Zeng b329e480c9 wait shouldn't hang if the target somehow exits (#44)
Thanks. So far, I always made it explicit when I was waiting for an operation which could fail, but doing it as default may be the better strategy from a usability point of view.
2019-12-11 09:31:58 +01:00
mariusmue fa6084fd69 add detailed mode for capstone disassembly plugin 2019-12-11 01:23:52 +01:00