From 7de0d82b3fdea17387c5e74e9e2438dab11d7bf7 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Fri, 24 Mar 2000 19:46:53 +0000 Subject: [PATCH] Fixed basic type evaluation. --- debugger/types.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/debugger/types.c b/debugger/types.c index 676911fad2a..64f12905fbf 100644 --- a/debugger/types.c +++ b/debugger/types.c @@ -354,24 +354,21 @@ DEBUG_GetExprValue(const DBG_VALUE *_value, char ** format) assert(_value->cookie == DV_TARGET || _value->cookie == DV_HOST); rtn = 0; - value.addr.seg = 0; /* FIXME? I don't quite get this... */ + /* FIXME? I don't quite get this... + * if this is wrong, value.addr shall be linearized + */ + value.addr.seg = 0; assert(value.type != NULL); switch(value.type->type) { case DT_BASIC: - if (value.type == DEBUG_TypeIntConst) - { - assert(_value->cookie == DV_HOST); - rtn = *(int*)value.addr.off; - def_format = value.type->un.basic.output_format; - break; - } - rtn = 0; + /* FIXME: following code implies i386 byte ordering */ if (_value->cookie == DV_TARGET) { - if (!DEBUG_READ_MEM_VERBOSE((void*)value.addr.off, &rtn, value.type->un.basic.basic_size)) + if (!DEBUG_READ_MEM_VERBOSE((void*)value.addr.off, &rtn, + value.type->un.basic.basic_size)) return 0; } else { memcpy(&rtn, (void*)value.addr.off, value.type->un.basic.basic_size);