#include "block.h"
#include "dictionary.h"
#include "varobj.h"
+#include "arch-utils.h"
#include <tcl.h>
#include "gdbtk.h"
char *addr;
Tcl_Obj *elt = Tcl_NewListObj (0, NULL);
- xasprintf (&addr, "0x%s", paddr_nz (BLOCK_START (block)));
+ addr = xstrprintf ("%s", paddress (get_current_arch (),
+ BLOCK_START (block)));
Tcl_ListObjAppendElement (interp, elt,
Tcl_NewStringObj (addr, -1));
free(addr);
- xasprintf (&addr, "0x%s", paddr_nz (BLOCK_END (block)));
+ addr = xstrprintf ("%s", paddress (get_current_arch (),
+ BLOCK_END (block)));
Tcl_ListObjAppendElement (interp, elt,
Tcl_NewStringObj (addr, -1));
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr, elt);
return TCL_ERROR;
}
- arguments = (int) clientData;
+ arguments = (long) clientData;
/* Initialize the result pointer to an empty list. */
if (!target_has_registers)
{
- xasprintf (&start, "%s", "");
- xasprintf (&end, "%s", "");
+ start = xstrprintf ("%s", "");
+ end = xstrprintf ("%s", "");
}
else
{
struct block *block;
block = get_frame_block (get_selected_frame (NULL), 0);
- xasprintf (&start, "0x%s", paddr_nz (BLOCK_START (block)));
- xasprintf (&end, "0x%s", paddr_nz (BLOCK_END (block)));
+ start = xstrprintf ("%s", paddress (get_current_arch (),
+ BLOCK_START (block)));
+ end = xstrprintf ("%s", paddress (get_current_arch (),
+ BLOCK_END (block)));
}
Tcl_SetListObj (result_ptr->obj_ptr, 0, NULL);
char *frame;
if (!target_has_registers)
- xasprintf (&frame, "%s","");
+ frame = xstrprintf ("%s","");
else
/* FIXME: cagney/2002-11-19: This should be using get_frame_id()
to identify the frame and *NOT* get_frame_base(). */
- xasprintf (&frame, "0x%s",
- paddr_nz (get_frame_base (get_selected_frame (NULL))));
+ frame = xstrprintf ("%s",paddress (get_current_arch (),
+ get_frame_base (get_selected_frame (NULL))));
Tcl_SetStringObj (result_ptr->obj_ptr, frame, -1);