/* Innermost block required by this expression when evaluated */
struct block *block;
/* Status of this display (enabled or disabled) */
- enum enable status;
+ int enabled_p;
};
/* Chain of expressions whose values should be displayed
else if (format != 'f')
val_long = unpack_long (type, valaddr);
+ /* If the value is a pointer, and pointers and addresses are not the
+ same, then at this point, the value's length is TARGET_ADDR_BIT, not
+ TYPE_LENGTH (type). */
+ if (TYPE_CODE (type) == TYPE_CODE_PTR)
+ len = TARGET_ADDR_BIT;
+
/* If we are printing it as unsigned, truncate it in case it is actually
a negative signed value (e.g. "print/u (short)-1" should print 65535
(if shorts are 16 bits) instead of 4294967295). */
case 'f':
if (len == sizeof (float))
- type = builtin_type_float;
+ type = builtin_type_float;
else if (len == sizeof (double))
- type = builtin_type_double;
+ type = builtin_type_double;
print_floating (valaddr, type, stream);
break;
#if defined(TUI)
if (tui_version && *exp == '$')
- display_it = ((TuiStatus) tuiDo (
- (TuiOpaqueFuncPtr) tui_vSetLayoutTo, exp) == TUI_FAILURE);
+ display_it = (tui_set_layout (exp) == TUI_FAILURE);
#endif
if (display_it)
new->next = display_chain;
new->number = ++display_number;
new->format = fmt;
- new->status = enabled;
+ new->enabled_p = 1;
display_chain = new;
if (from_tty && target_has_execution)
{
int within_current_scope;
- if (d->status == disabled)
+ if (d->enabled_p == 0)
return;
if (d->block)
for (d = display_chain; d; d = d->next)
if (d->number == num)
{
- d->status = disabled;
+ d->enabled_p = 0;
return;
}
printf_unfiltered ("No display number %d.\n", num);
for (d = display_chain; d; d = d->next)
{
- printf_filtered ("%d: %c ", d->number, "ny"[(int) d->status]);
+ printf_filtered ("%d: %c ", d->number, "ny"[(int) d->enabled_p]);
if (d->format.size)
printf_filtered ("/%d%c%c ", d->format.count, d->format.size,
d->format.format);
if (p == 0)
{
for (d = display_chain; d; d = d->next)
- d->status = enabled;
+ d->enabled_p = 1;
}
else
while (*p)
for (d = display_chain; d; d = d->next)
if (d->number == num)
{
- d->status = enabled;
+ d->enabled_p = 1;
goto win;
}
printf_unfiltered ("No display number %d.\n", num);
if (p == 0)
{
for (d = display_chain; d; d = d->next)
- d->status = disabled;
+ d->enabled_p = 0;
}
else
while (*p)
if (val)
{
- if (GDB_TARGET_IS_D10V
- && SYMBOL_CLASS (sym) == LOC_REGPARM && TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_PTR)
- TYPE_LENGTH (VALUE_TYPE (val)) = 2;
#ifdef UI_OUT
val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
VALUE_ADDRESS (val),
error ("No function contains program counter for selected frame.\n");
#if defined(TUI)
else if (tui_version)
- low = (CORE_ADDR) tuiDo ((TuiOpaqueFuncPtr) tui_vGetLowDisassemblyAddress,
- (Opaque) low,
- (Opaque) pc);
+ low = tuiGetLowDisassemblyAddress (low, pc);
#endif
low += FUNCTION_START_OFFSET;
}
error ("No function contains specified address.\n");
#if defined(TUI)
else if (tui_version)
- low = (CORE_ADDR) tuiDo ((TuiOpaqueFuncPtr) tui_vGetLowDisassemblyAddress,
- (Opaque) low,
- (Opaque) pc);
+ low = tuiGetLowDisassemblyAddress (low, pc);
#endif
#if 0
if (overlay_debugging)
}
#if defined(TUI)
- if (!tui_version ||
- m_winPtrIsNull (disassemWin) || !disassemWin->generic.isVisible)
+ if (!tui_is_window_visible (DISASSEM_WIN))
#endif
{
printf_filtered ("Dump of assembler code ");
#if defined(TUI)
else
{
- tuiDo ((TuiOpaqueFuncPtr) tui_vAddWinToLayout, DISASSEM_WIN);
- tuiDo ((TuiOpaqueFuncPtr) tui_vUpdateSourceWindowsWithAddr, low);
+ tui_show_assembly (low);
}
#endif
}
TARGET_PRINT_INSN_INFO->mach = TARGET_ARCHITECTURE->mach;
/* else: should set .mach=0 but some disassemblers don't grok this */
+ TARGET_PRINT_INSN_INFO->stream = stream;
+
return TARGET_PRINT_INSN (memaddr, TARGET_PRINT_INSN_INFO);
}
\f