--- gdb/doc/gdb.texinfo~ 2012-03-14 20:00:23.000000000 -0700 +++ gdb/doc/gdb.texinfo 2012-03-16 20:18:58.000000000 -0700 @@ -29472,7 +29472,7 @@ @smallexample -data-disassemble - [ -s @var{start-addr} -e @var{end-addr} ] + [ -s @var{start-addr} [ -e @var{end-addr} ] ] | [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ] -- @var{mode} @end smallexample @@ -29484,7 +29484,8 @@ @item @var{start-addr} is the beginning address (or @code{$pc}) @item @var{end-addr} -is the end address +is the end address. If this is omitted, then disassembly stops at the +end of the function containing @var{start-addr}. @item @var{filename} is the name of the file to disassemble @item @var{linenum} @@ -29544,6 +29545,21 @@ (gdb) @end smallexample +@smallexample +(gdb) +-data-disassemble -s $pc -- 0 +^done, +asm_insns=[ +@{address="0x000107c0",func-name="main",offset="4", +inst="mov 2, %o0"@}, +@{address="0x000107c4",func-name="main",offset="8", +inst="sethi %hi(0x11800), %o2"@}, +[@dots{}] +@{address="0x0001081c",func-name="main",offset="96",inst="ret "@}, +@{address="0x00010820",func-name="main",offset="100",inst="restore "@}] +(gdb) +@end smallexample + Disassemble the whole @code{main} function. Line 32 is part of @code{main}.