* cli/cli-cmds.c (_initialize_cli_cmds): Clarify argument to
authorDoug Evans <dje@google.com>
Thu, 7 Feb 2013 20:38:23 +0000 (20:38 +0000)
committerDoug Evans <dje@google.com>
Thu, 7 Feb 2013 20:38:23 +0000 (20:38 +0000)
disassemble command.

doc/
* gdb.texinfo (Machine Code): Clarify argument to disassemble
command.

gdb/ChangeLog
gdb/cli/cli-cmds.c
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo

index 50e5445..25b0c27 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-07  Doug Evans  <dje@google.com>
+
+       * cli/cli-cmds.c (_initialize_cli_cmds): Clarify argument to
+       disassemble command.
+
 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
 
        * aarch64-linux-tdep.c (aarch64_linux_init_abi): Call
index d9bf80f..680cf99 100644 (file)
@@ -1843,7 +1843,12 @@ With a /m modifier, source lines are included (if available).\n\
 With a /r modifier, raw instructions in hex are included.\n\
 With a single argument, the function surrounding that address is dumped.\n\
 Two arguments (separated by a comma) are taken as a range of memory to dump,\n\
-  in the form of \"start,end\", or \"start,+length\"."));
+  in the form of \"start,end\", or \"start,+length\".\n\
+\n\
+Note that the address is interpreted as an expression, not as a location\n\
+like in the \"break\" command.\n\
+So, for example, if you want to disassemble function bar in file foo.c\n\
+you must type \"disassemble 'foo.c'::bar\" and not \"disassemble foo.c:bar\"."));
   set_cmd_completer (c, location_completer);
   if (xdb_commands)
     add_com_alias ("va", "disassemble", class_xdb, 0);
index 7f5665a..7c16311 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-07  Doug Evans  <dje@google.com>
+
+       * gdb.texinfo (Machine Code): Clarify argument to disassemble
+       command.
+
 2013-02-06  Yao Qi  <yao@codesourcery.com>
 
        * gdb.texinfo (GDB/MI Async Records): Document new MI
index 2b95415..e3f336e 100644 (file)
@@ -7373,6 +7373,11 @@ Dump of assembler code from 0x400281 to 0x40028b:
 End of assembler dump.
 @end smallexample
 
+Addresses cannot be specified as a linespec (@pxref{Specify Location}).
+So, for example, if you want to disassemble function @code{bar}
+in file @file{foo.c}, you must type @samp{disassemble 'foo.c'::bar}
+and not @samp{disassemble foo.c:bar}.
+
 Some architectures have more than one commonly-used set of instruction
 mnemonics or other syntax.