From: Doug Evans Date: Thu, 7 Feb 2013 20:38:23 +0000 (+0000) Subject: * cli/cli-cmds.c (_initialize_cli_cmds): Clarify argument to X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e1e03400a951a8508e6ff822a1705ac0745a50f;p=binutils-gdb.git * cli/cli-cmds.c (_initialize_cli_cmds): Clarify argument to disassemble command. doc/ * gdb.texinfo (Machine Code): Clarify argument to disassemble command. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 50e54453ae2..25b0c27c9dc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-02-07 Doug Evans + + * cli/cli-cmds.c (_initialize_cli_cmds): Clarify argument to + disassemble command. + 2013-02-07 Marcus Shawcroft * aarch64-linux-tdep.c (aarch64_linux_init_abi): Call diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index d9bf80f97aa..680cf992de9 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -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); diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 7f5665a5634..7c163116e58 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2013-02-07 Doug Evans + + * gdb.texinfo (Machine Code): Clarify argument to disassemble + command. + 2013-02-06 Yao Qi * gdb.texinfo (GDB/MI Async Records): Document new MI diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 2b954156642..e3f336ea7e1 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -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.