Register display.
This commit is contained in:
parent
a1da55a006
commit
5fef117aa0
|
@ -342,6 +342,68 @@ body {
|
|||
order: 3;
|
||||
flex: 1 1 auto;
|
||||
padding: 5px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.debugger-tools-registers-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-content: flex-start;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.debugger-tools-registers-entry {
|
||||
flex: 0 0 auto;
|
||||
font-family: monospace;
|
||||
padding-right: 5px;
|
||||
width: 160px;
|
||||
}
|
||||
.debugger-tools-registers-entry .name {
|
||||
font-weight: bold;
|
||||
width: 26px;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
}
|
||||
.debugger-tools-registers-entry .value {
|
||||
}
|
||||
.debugger-tools-registers-container.special {
|
||||
height: 46px;
|
||||
}
|
||||
.debugger-tools-registers-container.gpr {
|
||||
height: 332px;
|
||||
}
|
||||
.special .debugger-tools-registers-entry,
|
||||
.gpr .debugger-tools-registers-entry {
|
||||
width: 300px;
|
||||
}
|
||||
.debugger-tools-registers-entry .hex-value {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
width: 130px;
|
||||
text-align: right;
|
||||
}
|
||||
.debugger-tools-registers-entry .int-value {
|
||||
display: inline-block;
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
width: 92px;
|
||||
text-align: right;
|
||||
}
|
||||
.debugger-tools-registers-container.fpr {
|
||||
height: 172px;
|
||||
}
|
||||
.fpr .debugger-tools-registers-entry {
|
||||
width: 170px;
|
||||
}
|
||||
.fpr .debugger-tools-registers-entry .value {
|
||||
white-space: pre;
|
||||
}
|
||||
.vec .debugger-tools-registers-entry {
|
||||
width: 160px;
|
||||
}
|
||||
.vec .debugger-tools-registers-entry .name {
|
||||
width: 35px;
|
||||
}
|
||||
|
||||
.debugger-module-info {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<div class="debugger-fnlist-body">
|
||||
<div class="debugger-fnlist-list">
|
||||
<table class="table table-hover">
|
||||
<tr ng-repeat="fn in functionList | filter:functionFilter | orderBy:'address'">
|
||||
<tr ng-repeat="fn in functionList track by $index | filter:functionFilter | orderBy:'address'">
|
||||
<td><a xe-coderef="{{fn.address|hex32}}">{{fn.name}}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -72,7 +72,64 @@
|
|||
callstack
|
||||
</div>
|
||||
<div class="debugger-tools-registers">
|
||||
registers
|
||||
<div class="debugger-tools-registers-container special">
|
||||
<div class="debugger-tools-registers-entry">
|
||||
<span class="name">pc</span>
|
||||
<input class="hex-value"
|
||||
value="{{app.session.activeThread.context.pc|hex32}}"
|
||||
popover="TODO: template to link to code/memory"
|
||||
popover-trigger="focus"
|
||||
onclick="this.select()">
|
||||
</div>
|
||||
<div class="debugger-tools-registers-entry">
|
||||
<span class="name">lr</span>
|
||||
<input class="hex-value"
|
||||
value="{{app.session.activeThread.context.lr|hex32}}"
|
||||
popover="TODO: template to link to code/memory"
|
||||
popover-trigger="focus"
|
||||
onclick="this.select()">
|
||||
</div>
|
||||
<div class="debugger-tools-registers-entry">
|
||||
<span class="name">ctr</span>
|
||||
<input class="hex-value"
|
||||
value="{{app.session.activeThread.context.ctrh}}"
|
||||
popover="TODO: template to link to code/memory"
|
||||
popover-trigger="focus"
|
||||
onclick="this.select()">
|
||||
<input class="int-value"
|
||||
value="{{app.session.activeThread.context.ctrs}}"
|
||||
onclick="this.select()">
|
||||
</div>
|
||||
</div>
|
||||
<div class="debugger-tools-registers-container gpr">
|
||||
<div ng-repeat="v in app.session.activeThread.context.r track by $index"
|
||||
class="debugger-tools-registers-entry">
|
||||
<span class="name">r{{$index}}</span>
|
||||
<input class="hex-value"
|
||||
value="{{app.session.activeThread.context.rh[$index]}}"
|
||||
popover="TODO: template to link to code/memory"
|
||||
popover-trigger="focus"
|
||||
onclick="this.select()">
|
||||
<input class="int-value"
|
||||
value="{{app.session.activeThread.context.rs[$index]}}"
|
||||
onclick="this.select()">
|
||||
</div>
|
||||
</div>
|
||||
<div class="debugger-tools-registers-container fpr">
|
||||
<div ng-repeat="v in app.session.activeThread.context.f track by $index"
|
||||
class="debugger-tools-registers-entry">
|
||||
<span class="name">f{{$index}}</span>
|
||||
<span class="value" tooltip="{{app.session.activeThread.context.fh[$index]}}">{{v|exp8}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="debugger-tools-registers-container">
|
||||
<div ng-repeat="v in app.session.activeThread.context.v track by $index"
|
||||
class="debugger-tools-registers-entry vec">
|
||||
<span class="name">v{{$index}}</span> <span class="value">{{v}}</span>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -18,6 +18,7 @@ var module = angular.module('xe.ui.code', [
|
|||
|
||||
module.controller('CodeTabController', function(
|
||||
$rootScope, $scope, $modal, app, log) {
|
||||
$scope.app = app;
|
||||
$scope.moduleList = [];
|
||||
$scope.selectedModule = null;
|
||||
$scope.functionList = [];
|
||||
|
|
|
@ -31,3 +31,15 @@ module.filter('hex32', function() {
|
|||
}
|
||||
};
|
||||
});
|
||||
|
||||
module.filter('exp8', function() {
|
||||
return function(number) {
|
||||
if (number !== null && number !== undefined) {
|
||||
var str = number.toExponential(8);
|
||||
if (number >= 0) {
|
||||
str = ' ' + str;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -722,13 +722,24 @@ json_t* Processor::DumpThreadState(XenonThreadState* thread_state) {
|
|||
json_object_set_integer_new(
|
||||
result, "threadStateAddress", thread_state->thread_state_address());
|
||||
|
||||
char value[32];
|
||||
|
||||
json_t* context_json = json_object();
|
||||
auto context = thread_state->context();
|
||||
|
||||
json_object_set_new(
|
||||
context_json, "pc", json_integer(0));
|
||||
json_object_set_new(
|
||||
context_json, "lr", json_integer(context->lr));
|
||||
|
||||
json_object_set_new(
|
||||
context_json, "ctr", json_integer(context->ctr));
|
||||
xesnprintfa(value, XECOUNT(value), "%.16llX", context->ctr);
|
||||
json_object_set_new(
|
||||
context_json, "ctrh", json_string(value));
|
||||
xesnprintfa(value, XECOUNT(value), "%lld", context->ctr);
|
||||
json_object_set_new(
|
||||
context_json, "ctrs", json_string(value));
|
||||
|
||||
// xer
|
||||
// cr*
|
||||
|
@ -739,12 +750,34 @@ json_t* Processor::DumpThreadState(XenonThreadState* thread_state) {
|
|||
json_array_append_new(r_json, json_integer(context->r[n]));
|
||||
}
|
||||
json_object_set_new(context_json, "r", r_json);
|
||||
json_t* rh_json = json_array();
|
||||
for (size_t n = 0; n < 32; n++) {
|
||||
xesnprintfa(value, XECOUNT(value), "%.16llX", context->r[n]);
|
||||
json_array_append_new(rh_json, json_string(value));
|
||||
}
|
||||
json_object_set_new(context_json, "rh", rh_json);
|
||||
json_t* rs_json = json_array();
|
||||
for (size_t n = 0; n < 32; n++) {
|
||||
xesnprintfa(value, XECOUNT(value), "%lld", context->r[n]);
|
||||
json_array_append_new(rs_json, json_string(value));
|
||||
}
|
||||
json_object_set_new(context_json, "rs", rs_json);
|
||||
|
||||
json_t* f_json = json_array();
|
||||
for (size_t n = 0; n < 32; n++) {
|
||||
json_array_append_new(f_json, json_real(context->f[n]));
|
||||
}
|
||||
json_object_set_new(context_json, "f", f_json);
|
||||
json_t* fh_json = json_array();
|
||||
for (size_t n = 0; n < 32; n++) {
|
||||
union {
|
||||
double f;
|
||||
uint64_t i;
|
||||
} fi = { context->f[n] };
|
||||
xesnprintfa(value, XECOUNT(value), "%.16llX", fi.i);
|
||||
json_array_append_new(fh_json, json_string(value));
|
||||
}
|
||||
json_object_set_new(context_json, "fh", fh_json);
|
||||
|
||||
json_t* v_json = json_array();
|
||||
for (size_t n = 0; n < 128; n++) {
|
||||
|
|
Loading…
Reference in New Issue