# Access the name of a symbol
define xsymname
xgetsym $arg0
- set $symname = $ptr->name
+ set $symname = $ptr->u.s.name
end
# Set up something to print out s-expressions.
xgetptr $w->buffer
set $tem = (struct buffer *) $ptr
xgetptr $tem->name_
- printf "%s", ((struct Lisp_String *) $ptr)->data
+ printf "%s", ((struct Lisp_String *) $ptr)->u.s.data
printf "\n"
xgetptr $w->start
set $tem = (struct Lisp_Marker *) $ptr
xgettype ($g.object)
if ($type == Lisp_String)
xgetptr $g.object
- printf " str=0x%x[%d]", ((struct Lisp_String *)$ptr)->data, $g.charpos
+ printf " str=0x%x[%d]", ((struct Lisp_String *)$ptr)->u.s.data, $g.charpos
else
printf " pos=%d", $g.charpos
end
xgetptr $
print (struct buffer *) $ptr
xgetptr $->name_
- output ((struct Lisp_String *) $ptr)->data
+ output ((struct Lisp_String *) $ptr)->u.s.data
echo \n
end
document xbuffer
define xcar
xgetptr $
xgettype $
- print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->car : 0)
+ print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->u.s.car : 0)
end
document xcar
Assume that $ is an Emacs Lisp pair and print its car.
define xcdr
xgetptr $
xgettype $
- print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->u.cdr : 0)
+ print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->u.s.u.cdr : 0)
end
document xcdr
Assume that $ is an Emacs Lisp pair and print its cdr.
set $nil = $ptr
set $i = 0
while $cons != $nil && $i < 10
- p/x $cons->car
+ p/x $cons->u.s.car
xpr
- xgetptr $cons->u.cdr
+ xgetptr $cons->u.s.u.cdr
set $cons = (struct Lisp_Cons *) $ptr
set $i = $i + 1
printf "---\n"
end
define xprintstr
- set $data = (char *) $arg0->data
- set $strsize = ($arg0->size_byte < 0) ? ($arg0->size & ~ARRAY_MARK_FLAG) : $arg0->size_byte
+ set $data = (char *) $arg0->u.s.data
+ set $strsize = ($arg0->u.s.size_byte < 0) ? ($arg0->u.s.size & ~ARRAY_MARK_FLAG) : $arg0->u.s.size_byte
# GDB doesn't like zero repetition counts
if $strsize == 0
output ""
else
- output ($arg0->size > 1000) ? 0 : ($data[0])@($strsize)
+ output ($arg0->u.s.size > 1000) ? 0 : ($data[0])@($strsize)
end
end
xsymname globals.f_Vinitial_window_system
xgetptr $symname
set $tem = (struct Lisp_String *) $ptr
- set $tem = (char *) $tem->data
+ set $tem = (char *) $tem->u.s.data
# If we are running in synchronous mode, we want a chance to look
# around before Emacs exits. Perhaps we should put the break
# somewhere else instead...