aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2009-11-23 18:44:11 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2009-11-23 18:44:11 +0000
commit21a0512e533ac4e5d504e6674ff1361da59535fc (patch)
tree0650553121666c6029553f7f92bcc620fd151a23 /gdb/cli
parent1338dd10efb7f5b6ab29142fa07004ff900a20b4 (diff)
downloadgdb-21a0512e533ac4e5d504e6674ff1361da59535fc.zip
gdb-21a0512e533ac4e5d504e6674ff1361da59535fc.tar.gz
gdb-21a0512e533ac4e5d504e6674ff1361da59535fc.tar.bz2
gdb/ChangeLog:
2009-11-23 Paul Pluzhnikov <ppluzhnikov@google.com> * cli/cli-cmds.c (disassemble_command): Split on comma. (init_cli_cmds): Update help. * NEWS: Mention incompatible change to 'disassemble'. gdb/testsuite/ChangeLog: 2009-11-23 Paul Pluzhnikov <ppluzhnikov@google.com> * gdb.asm/asm-source.exp: Adjust. * gdb.base/help.exp: Adjust. gdb/doc/ChangeLog: 2009-11-23 Paul Pluzhnikov <ppluzhnikov@google.com> * gdb.texinfo (Machine Code): Adjust.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-cmds.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index acdbc82..865623b 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -983,7 +983,6 @@ disassemble_command (char *arg, int from_tty)
CORE_ADDR low, high;
char *name;
CORE_ADDR pc, pc_masked;
- char *space_index;
int flags;
name = NULL;
@@ -1022,13 +1021,12 @@ disassemble_command (char *arg, int from_tty)
return;
}
- /* FIXME: 'twould be nice to allow spaces in the expression for the first
- arg. Allow comma separater too? */
-
- if (!(space_index = (char *) strchr (arg, ' ')))
+ pc = value_as_address (parse_to_comma_and_eval (&arg));
+ if (arg[0] == ',')
+ ++arg;
+ if (arg[0] == '\0')
{
/* One argument. */
- pc = parse_and_eval_address (arg);
if (find_pc_partial_function (pc, &name, &low, &high) == 0)
error (_("No function contains specified address."));
#if defined(TUI)
@@ -1044,9 +1042,8 @@ disassemble_command (char *arg, int from_tty)
else
{
/* Two arguments. */
- *space_index = '\0';
- low = parse_and_eval_address (arg);
- high = parse_and_eval_address (space_index + 1);
+ low = pc;
+ high = parse_and_eval_address (arg);
}
print_disassembly (gdbarch, name, low, high, flags);
@@ -1461,7 +1458,7 @@ Default is the function surrounding the pc of the selected frame.\n\
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 are taken as a range of memory to dump."));
+Two arguments (separated by a comma) are taken as a range of memory to dump."));
set_cmd_completer (c, location_completer);
if (xdb_commands)
add_com_alias ("va", "disassemble", class_xdb, 0);