Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ __pycache__/
# C lib
*.so

# Visual Studio
*.sln
*.suo
*.pyproj
.vs/

# Vim
*.swp

# Distribution / packaging
.Python
env/
Expand Down
20 changes: 20 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Scimitar
## Ye Distributed Debugger

### Pending merges:
* GDB/MI
* mi_parser (`8ec00bfed88d4beda1c37a516d953638`)
* Report PIDs from HPX
* hpx_pids (`4c2e6efda9334f50a97498ff3df4ca37`)
* AsyncIO
* asyncio_processing_loop (`939bad3d2718407e8b07176c14839ba0`)
* live_output (`b09de9acc7ad476fb09ce2dd4bd1ad69`)
* UI
* ui_prompt_toolkit (`26e3c2d2ae0239993eb5fe3fa015b126`)
* ui_qt (`a6774b4ac2646bf9cad9687bad92b087`)
* Pretty Printers
* natvis_transformer (`fecd531769f64374a7848815c9299e57`)
* Interaction with HPX Runtime
* pfx_counters (`a4aab1c4f49b48e396b0340924281c22`)
* ns_query (`1fea6b7c6da446538a35a98f263717fe`)

Binary file added assets/archer-fish-icon.psd
Binary file not shown.
Binary file added assets/archer-fish.ico
Binary file not shown.
Binary file added assets/archer-fish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon-2048.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-gnu-gbd-cleaned-up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-gnu-gbd-remastered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-gnu-gbd-touched.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-gnu-gbd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo-gnu-gbd.psd
Binary file not shown.
Binary file added assets/logo-gnu-gdb-archer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 3 additions & 76 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,8 @@
# Scimitar
## Ye Distributed Debugger

### GDB Integration
* The scripts are in the
[tools](`https://github.com/parsa/scimitar/tree/master/tools`) directory.
* To import the printers:
* If your GDB is set up to perform auto loading simply copy `auto-load` and
`python` directories to the appropriate locations.
* If you're not using auto-load then ensure the path to auto-load and
Python directories are in `sys.path`
* One option to add them to GDB Python's sys.path is running `python
sys.path.append(`'<PATH_TO_DIR>'`)` for both directories.
* Run `python import scimitar_gdb` inside GDB
* You can also put the commands inside your `.gdbrc`
Scimitar is a distributed debugging tool for HPX applications. It is a front-end for GDB and adds features to make common operations such as switching between several sessions (like localities in HPX) and viewing HPX's internal data structures easier.

```
python
sys.path.extend([
'<path to scimitar-gdb directory>/auto-load',
'<path to scimitar-gdb directory>/python',
])
import scimitar_gdb
end
```
### Documentation
* For documentation consult [Scimitar's wiki pages](https://github.com/STEllAR-GROUP/scimitar/wiki)

### Prerequisites
* Software:
* Python 2.7
* GDB 7.1
* Python Modules
* pexpect

### Configuration
In order to prevent having to enter the debugging environment configurations
every time it is launched and save time Scimitar uses the file
`utils/config.py` to retrieve the configurations of a cluster. You may modify
and add to it to meet your needs.

### Running
* Schedule a job to run your application. Ensure mpirun starts.
* Run `scimitar.py` on your machine
* Start a session by `remote <host> <scheduler job id>`
* Once you're connected you can switch between localities by using the command
`switch <locality id>`

## Commands
* local raw
* local <pid>[ <pid>...]
* local ls
* local ls <regex_pattern>
* remote <machine_name>
* remote <machine_name> <jobid>
* remote <machine_name> attach <app_name> <node:pid>[ <node:pid>...]

### Pending merges:
* GDB/MI
* mi_parser (`8ec00bfed88d4beda1c37a516d953638`)
* Sessions
* local_session (`8c110db273af4a81bea68ef8686f1beb`)
* switch_locality (`6d52ba7248ed48368d556620d753cbce`)
* Report PIDs from HPX
* hpx_pids (`4c2e6efda9334f50a97498ff3df4ca37`)
* AsyncIO
* asyncio_processing_loop (`939bad3d2718407e8b07176c14839ba0`)
* live_output (`b09de9acc7ad476fb09ce2dd4bd1ad69`)
* UI
* ui_wxwidgets (`f49ea035cbc845099ac8356d9147dfb0`)
* ui_curses (`c68045350edc449a90b1dbc4ddbeeb08`)
* Pretty Printers
* natvis_transformer (`fecd531769f64374a7848815c9299e57`)
* config.py
* dotsshconfig (`a6206aa120844233b986cb470013cf54`)
* stampede_config (`3c21aec9daba4bc49fd2d0d98ec0e46b`)
* edison_config (`613a076ab3254014b55f645a7d85e529`)
* cori_config (`d8459d9a002047239fb21c3c92050980`)
* bigdat_config (`406ec14fae894e66ad147245ede1abda`)
* supermike2_config (`08e71a6fd99246c7ad01e996dd79fea2`)
* Interaction with HPX Runtime
* pfx_counters (`a4aab1c4f49b48e396b0340924281c22`)
* ns_query (`1fea6b7c6da446538a35a98f263717fe`)
148 changes: 0 additions & 148 deletions scimitar.py

This file was deleted.

File renamed without changes.
Empty file added scimitar/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions util/exceptions.py → scimitar/__ver__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
class ScimitarError(Exception):
pass

VERSION = '0.3.203 build 3494'

# vim: :ai:sw=4:ts=4:sts=4:et:ft=python:fo=corqj2:sm:tw=79:
61 changes: 61 additions & 0 deletions scimitar/command_completer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
#
# Scimitar: Ye Distributed Debugger
#
# Copyright (c) 2016-2017 Parsa Amini
# Copyright (c) 2016 Hartmut Kaiser
# Copyright (c) 2016 Thomas Heller
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
from prompt_toolkit.completion import Completer, Completion


class CommandCompleter(Completer):

def __init__(self):
self.current_candidates = []

def _complete_command(self):
raise NotImplementedError('Must override _complete_command')

def _complete_command_arguments(self, command, words):
raise NotImplementedError('Must override _complete_command_arguments')

def _prune_nonmatches(self, candidates, being_completed):
if being_completed:
result = [
candidate for candidate in candidates
if candidate.startswith(being_completed)
]
else:
result = candidates

# If it's the only choice
if result and len(result) == 1:
return [result[0] + ' ']
return result

def get_completions(self, document, complete_event):
last_word = document.get_word_before_cursor()

# First token
if not document.current_line or not ' ' in document.current_line:
candidates = self._complete_command()
else:
words = document.current_line.split()

candidates = self._complete_command_arguments(
words[0], words[1:]
)

matches = self._prune_nonmatches(
candidates, last_word
)

if not matches:
return []
return [Completion(i, start_position=-len(last_word)) for i in matches]

# vim: :ai:sw=4:ts=4:sts=4:et:ft=python:fo=corqj2:sm:tw=79:
52 changes: 52 additions & 0 deletions scimitar/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
#
# Scimitar: Ye Distributed Debugger
#
# Copyright (c) 2016-2017 Parsa Amini
# Copyright (c) 2016 Hartmut Kaiser
# Copyright (c) 2016 Thomas Heller
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#

from __future__ import unicode_literals

settings = {
'ui': {
'prompts': [
'# ', # Level 0: Offline mode
'$ ', # Level 1: Debugging mode
],
},
'signals': {
'sigkill':
5,
'sigkill_last':
1,
# TODO: See if we need to handle the other signals. These maybe:
## EOF
## SIGALRM
## SIGINT
## SIGQUIT
## SIGTERM
## SIGSTOP
},
'gdb': {
# GDB command line
# Supress banner, interactive mode
'cmd': [
'gdb',
'-interpreter=mi2', # Use GDB/MI2 interface
'-quiet', # Suppress banner
'--nx', # Don't load any .gdbinits whatsoever
],
'attach':
'--pid={pid}',
},
'sessions': {
'history_length': 100
},
}

# vim: :ai:sw=4:ts=4:sts=4:et:ft=python:fo=corqj2:sm:tw=79:
Loading