URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [gdb/] [gdb.gdb] - Rev 330
Compare with Previous | Blame | View Log
# Examples of using gdb's command language to print out various gdb data# structures.define list-objfilesset $obj = object_filesprintf "objfile bfd msyms name\n"while $obj != 0printf "0x%-8x 0x%-8x %6d %s\n", $obj, $obj->obfd, \$obj->minimal_symbol_count, $obj->nameset var $obj = $obj->nextendenddocument list-objfilesPrint a table of the current objfiles.enddefine print-valuesprintf "Location Offset Size Lazy Contents0-3 Lval\n"set $val = $arg0while $val != 0printf "%8x %6d %10d %4d %12x ", $val->location.address, \$val->offset, \$val->type->length, $val->lazy, $val->aligner.contents[0]output $val->lvalprintf "\n"set $val = $val->nextendenddocument print-valuesPrint a list of values.Takes one argument, the value to print, and prints all the values whichare chained through the next field. Thus the most recently created valueswill be listed first. The "Contents0-3" field gives the first "int"of the VALUE_CONTENTS; not the entire contents.end
