Commit 16876e0c authored by Yuan Zhixiang's avatar Yuan Zhixiang
Browse files

添加地址指向数据显示

parent e2d8fd71
...@@ -108,7 +108,7 @@ const highlight_addresses = ref({}) ...@@ -108,7 +108,7 @@ const highlight_addresses = ref({})
watch(current_step, () => { watch(current_step, () => {
highlight_addresses.value = {} highlight_addresses.value = {}
}) })
provide('stack_view',{highlight_addresses,check_changed}) provide('stack_view',{highlight_addresses,check_changed,current_var_map})
// function click() { // function click() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { computed, inject, ref, watch } from 'vue'; import { computed, inject, ref, watch } from 'vue';
const { current_step } = inject('app') const { current_step } = inject('app')
const { check_changed, highlight_addresses } = inject('stack_view') const { check_changed, highlight_addresses,current_var_map } = inject('stack_view')
const props = defineProps(['var_name', 'var_content', 'changed']) const props = defineProps(['var_name', 'var_content', 'changed'])
const var_name = computed(() => { const var_name = computed(() => {
...@@ -55,9 +55,15 @@ const address = computed(() => { ...@@ -55,9 +55,15 @@ const address = computed(() => {
const display_content = computed(() => { const display_content = computed(() => {
if (is_data.value) { if (is_data.value) {
let v = var_content.value[3] let v = var_content.value[3]
if(is_pointer.value){
if(v in current_var_map.value){
v = v + '' + current_var_map.value[v]
return v
}
}
return v != '<UNINITIALIZED>' ? v : '?' return v != '<UNINITIALIZED>' ? v : '?'
} }
return 'todo' return 'error'
}) })
const array_elements = computed(() => { const array_elements = computed(() => {
if (is_array.value) { if (is_array.value) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment