Function listing and selection.
This commit is contained in:
@@ -1,75 +1,35 @@
|
||||
<div class="debugger-main" ng-controller="CodeTabController">
|
||||
<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>
|
||||
{{selectedModule.name}} <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>
|
||||
<li ng-repeat="module in moduleList"><a href="" ng-click="selectModule(module)">{{module.name}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="debugger-fnlist-body">
|
||||
<div class="debugger-fnlist-list">
|
||||
fn<br/>fn<br/>fn
|
||||
<table class="table table-hover">
|
||||
<tr ng-repeat="fn in functionList | filter:functionFilter | orderBy:'address'">
|
||||
<td><a ui-sref="session.code.function({module: selectedModule.name, function: (fn.address | hex32)})">{{fn.name}}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</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">
|
||||
<input type="text" class="form-control" placeholder="Filter" ng-model="functionFilter" ui-escape="functionFilter = ''">
|
||||
</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-fnview-outer" ui-view></div>
|
||||
<div class="debugger-tools">
|
||||
<div class="debugger-tools-threads">
|
||||
<div class="btn-group btn-group-xs full-width">
|
||||
|
||||
@@ -17,16 +17,42 @@ var module = angular.module('xe.ui.code', [
|
||||
|
||||
module.controller('CodeTabController', function(
|
||||
$rootScope, $scope, app, log) {
|
||||
$scope.moduleList = [];
|
||||
$scope.selectedModule = null;
|
||||
$scope.functionList = [];
|
||||
|
||||
$rootScope.$on('refresh', function() {
|
||||
var dataSource = app.session.dataSource;
|
||||
|
||||
dataSource.getModuleList().then(function(list) {
|
||||
console.log(list);
|
||||
$scope.moduleList = list;
|
||||
if (!$scope.selectedModule) {
|
||||
if (list.length) {
|
||||
$scope.selectModule(list[0]);
|
||||
}
|
||||
} else {
|
||||
$scope.selectModule($scope.selectedModule);
|
||||
}
|
||||
}, function(e) {
|
||||
log('Unable to fetch module list');
|
||||
log.error('Unable to fetch module list');
|
||||
});
|
||||
|
||||
console.log('refresh');
|
||||
});
|
||||
|
||||
$scope.selectModule = function(module) {
|
||||
var moduleChange = module != $scope.selectedModule;
|
||||
$scope.selectedModule = module;
|
||||
|
||||
if (moduleChange) {
|
||||
$scope.functionList = [];
|
||||
}
|
||||
|
||||
var dataSource = app.session.dataSource;
|
||||
dataSource.getFunctionList(module.name).then(function(list) {
|
||||
$scope.functionList = list;
|
||||
}, function(e) {
|
||||
log.error('Unable to fetch function list');
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,2 +1,43 @@
|
||||
TODO: function
|
||||
<div ui-view></div>
|
||||
<div class="debugger-fnview" ng-controller="FunctionViewController">
|
||||
<div class="debugger-fnview-header">
|
||||
<div class="debugger-fnview-header-left">
|
||||
<span class="debugger-fnview-header-name" ng-bind="fn.name"></span>
|
||||
<span class="debugger-fnview-header-address">(0x{{fn.startAddress | hex32}}-0x{{fn.endAddress | hex32}})</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="codeType" btn-radio="'ppc'">PPC</button>
|
||||
<button type="button" class="btn btn-default" ng-model="codeType" btn-radio="'hir'">HIR</button>
|
||||
<button type="button" class="btn btn-default" ng-model="codeType" 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 ui-view></div>
|
||||
<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>
|
||||
|
||||
33
debugger/assets/ui/code/function-view.js
Normal file
33
debugger/assets/ui/code/function-view.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* 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.code.functionView', [
|
||||
'xe.log',
|
||||
'xe.session'
|
||||
]);
|
||||
|
||||
|
||||
module.controller('FunctionViewController', function(
|
||||
$rootScope, $scope, app, log) {
|
||||
$scope.codeType = 'ppc';
|
||||
|
||||
function refresh() {
|
||||
var dataSource = app.session.dataSource;
|
||||
|
||||
dataSource.getFunction($scope.functionAddress).then(function(fn) {
|
||||
$scope.fn = fn;
|
||||
}, function(e) {
|
||||
log.error('Unable to fetch function');
|
||||
});
|
||||
};
|
||||
$rootScope.$on('refresh', refresh);
|
||||
$scope.$watch('functionAddress', refresh);
|
||||
});
|
||||
Reference in New Issue
Block a user