Debugger can now connect. AngularJS: I have no idea what I'm doing.
This commit is contained in:
1
debugger/assets/ui/apu/apu-tab.html
Normal file
1
debugger/assets/ui/apu/apu-tab.html
Normal file
@@ -0,0 +1 @@
|
||||
TODO: APU
|
||||
93
debugger/assets/ui/code/code-tab.html
Normal file
93
debugger/assets/ui/code/code-tab.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<div class="debugger-main">
|
||||
<div class="debugger-header">
|
||||
debug header/toolbar/etc
|
||||
<div ui-view></div>
|
||||
</div>
|
||||
<div class="debugger-body">
|
||||
<div class="debugger-fnlist">
|
||||
<div class="debugger-fnlist-header">
|
||||
<div class="btn-group btn-group-xs full-width">
|
||||
<button type="button" class="btn btn-default dropdown-toggle full-width" data-toggle="dropdown">
|
||||
module_name.xex <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="#">module 1</a></li>
|
||||
<li><a href="#">module 2</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="debugger-fnlist-body">
|
||||
<div class="debugger-fnlist-list">
|
||||
fn<br/>fn<br/>fn
|
||||
</div>
|
||||
</div>
|
||||
<div class="debugger-fnlist-footer">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Filter">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="debugger-fnview">
|
||||
<div class="debugger-fnview-header">
|
||||
<div class="debugger-fnview-header-left">
|
||||
<span class="debugger-fnview-header-name">function name</span>
|
||||
<span class="debugger-fnview-header-address">(0x80000000-0x80000000)</span>
|
||||
</div>
|
||||
<div class="debugger-fnview-header-right">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" class="btn btn-default" ng-model="radioModel" btn-radio="'PPC'">PPC</button>
|
||||
<button type="button" class="btn btn-default" ng-model="radioModel" btn-radio="'HIR'">HIR</button>
|
||||
<button type="button" class="btn btn-default" ng-model="radioModel" btn-radio="'LIR'">LIR</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" class="btn btn-default">1</button>
|
||||
<button type="button" class="btn btn-default">2</button>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Dropdown
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
<li><a href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="debugger-fnview-body">
|
||||
<div class="debugger-fnview-codeview">
|
||||
<textarea class="debugger-fnview-textarea"></textarea>
|
||||
</div>
|
||||
<div class="debugger-fnview-graphview">
|
||||
graph!
|
||||
</div>
|
||||
</div>
|
||||
<div class="debugger-fnview-footer">
|
||||
footer
|
||||
</div>
|
||||
</div>
|
||||
<div class="debugger-tools">
|
||||
<div class="debugger-tools-threads">
|
||||
<div class="btn-group btn-group-xs full-width">
|
||||
<button type="button" class="btn btn-default dropdown-toggle full-width" data-toggle="dropdown">
|
||||
thread 0 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="#">thread 1</a></li>
|
||||
<li><a href="#">thread 2</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="debugger-tools-callstack">
|
||||
callstack
|
||||
</div>
|
||||
<div class="debugger-tools-registers">
|
||||
registers
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
2
debugger/assets/ui/code/function-view.html
Normal file
2
debugger/assets/ui/code/function-view.html
Normal file
@@ -0,0 +1,2 @@
|
||||
TODO: function
|
||||
<div ui-view></div>
|
||||
26
debugger/assets/ui/console/console.html
Normal file
26
debugger/assets/ui/console/console.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<div class="console" ng-controller="ConsoleController">
|
||||
<div class="console-part-log">
|
||||
<div class="console-log-outer">
|
||||
<ul>
|
||||
<li ng-repeat="line in log.lines track by $index">{{line}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="console-part-input">
|
||||
<div class="console-input-left">
|
||||
</div>
|
||||
<div class="console-input-middle">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Command" ng-model="commandText" ui-enter="issueCommand()">
|
||||
</div>
|
||||
</div>
|
||||
<div class="console-input-right">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" class="btn btn-default">A</button>
|
||||
<button type="button" class="btn btn-default">B</button>
|
||||
<button type="button" class="btn btn-default">C</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
34
debugger/assets/ui/console/console.js
Normal file
34
debugger/assets/ui/console/console.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('xe.ui.console', [
|
||||
'xe.log'
|
||||
]);
|
||||
|
||||
|
||||
module.controller('ConsoleController', function($scope, log) {
|
||||
$scope.log = log;
|
||||
|
||||
$scope.commandText = '';
|
||||
|
||||
$scope.issueCommand = function() {
|
||||
var command = $scope.commandText;
|
||||
$scope.commandText = '';
|
||||
if (!command) {
|
||||
return;
|
||||
}
|
||||
|
||||
log.appendLine('@' + command);
|
||||
|
||||
// TODO(benvanik): execute.
|
||||
console.log(command);
|
||||
};
|
||||
});
|
||||
1
debugger/assets/ui/gpu/gpu-tab.html
Normal file
1
debugger/assets/ui/gpu/gpu-tab.html
Normal file
@@ -0,0 +1 @@
|
||||
TODO: GPU
|
||||
1
debugger/assets/ui/kernel/kernel-tab.html
Normal file
1
debugger/assets/ui/kernel/kernel-tab.html
Normal file
@@ -0,0 +1 @@
|
||||
TODO: kernel
|
||||
1
debugger/assets/ui/memory/memory-tab.html
Normal file
1
debugger/assets/ui/memory/memory-tab.html
Normal file
@@ -0,0 +1 @@
|
||||
TODO: memory
|
||||
37
debugger/assets/ui/navbar.html
Normal file
37
debugger/assets/ui/navbar.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<nav class="navbar navbar-default" role="navigation" ng-controller="NavbarController">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="http://xenia.jp/" target="_blank">Xenia</a>
|
||||
</div>
|
||||
<ul class="nav navbar-nav" ng-show="app.session">
|
||||
<li ui-sref-active="active"><a ui-sref="session.code">Code</a></li>
|
||||
<li ui-sref-active="active"><a ui-sref="session.memory">Memory</a></li>
|
||||
<li ui-sref-active="active"><a ui-sref="session.kernel">Kernel</a></li>
|
||||
<li ui-sref-active="active"><a ui-sref="session.gpu">GPU</a></li>
|
||||
<li ui-sref-active="active"><a ui-sref="session.apu">APU</a></li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right"></p>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<div class="btn-group navbar-btn">
|
||||
<button type="button" class="btn btn-default" ng-click="connectClicked()" ng-disabled="app.loading">
|
||||
<span class="glyphicon glyphicon-link"></span> Connect
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" ng-click="openClicked()" ng-disabled="app.loading">
|
||||
<span class="glyphicon glyphicon-file"></span> Open
|
||||
</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" ng-disabled="app.loading">
|
||||
<span class="glyphicon glyphicon-cog"></span> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="navbar-text navbar-right"></p>
|
||||
<p class="navbar-text navbar-right" ng-show="app.session">{{app.session.source}}</p>
|
||||
</nav>
|
||||
52
debugger/assets/ui/navbar.js
Normal file
52
debugger/assets/ui/navbar.js
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('xe.ui.navbar', []);
|
||||
|
||||
|
||||
module.controller('NavbarController', function(
|
||||
$scope, $state, app, log) {
|
||||
|
||||
$scope.connectClicked = function() {
|
||||
// TODO(benvanik): show a fancy dialog or something.
|
||||
var oldSession = app.session;
|
||||
app.connect().then(function(session) {
|
||||
if (!oldSession || oldSession.id != session.id) {
|
||||
$state.go('session', {
|
||||
'sessionId': session.id
|
||||
}, {
|
||||
notify: true
|
||||
});
|
||||
}
|
||||
}, function(e) {
|
||||
$state.go('/', {
|
||||
}, {
|
||||
notify: true
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.openClicked = function() {
|
||||
var inputEl = document.createElement('input');
|
||||
inputEl.type = 'file';
|
||||
inputEl.accept = '.xe-trace,application/x-extension-xe-trace';
|
||||
inputEl.onchange = function(e) {
|
||||
$scope.$apply(function() {
|
||||
if (inputEl.files.length) {
|
||||
//app.open(inputEl.files[0]);
|
||||
log.info('Not implemented yet');
|
||||
}
|
||||
});
|
||||
};
|
||||
inputEl.click();
|
||||
};
|
||||
|
||||
});
|
||||
1
debugger/assets/ui/session.html
Normal file
1
debugger/assets/ui/session.html
Normal file
@@ -0,0 +1 @@
|
||||
<div ui-view></div>
|
||||
Reference in New Issue
Block a user