diff options
author | Yao Qi <yao@codesourcery.com> | 2012-09-28 00:25:24 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2012-09-28 00:25:24 +0000 |
commit | 1ae0c35e7e2f707cb45c2101e560cca964a8716e (patch) | |
tree | 9abee654a5c35a41fd82ed6a9ae001ba0d89bdbd /gdb/mi | |
parent | 9782f08bbd278c0d0d56e4f5cf79b23e607eedf9 (diff) | |
download | gdb-1ae0c35e7e2f707cb45c2101e560cca964a8716e.zip gdb-1ae0c35e7e2f707cb45c2101e560cca964a8716e.tar.gz gdb-1ae0c35e7e2f707cb45c2101e560cca964a8716e.tar.bz2 |
gdb/
* mi/mi-main.c (mi_cmd_data_write_memory_bytes): Emit error
when the length of content is not an even number.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index f1d21bc..f73d4f8 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -1672,6 +1672,10 @@ mi_cmd_data_write_memory_bytes (char *command, char **argv, int argc) addr = parse_and_eval_address (argv[0]); cdata = argv[1]; + if (strlen (cdata) % 2) + error (_("Hex-encoded '%s' must have an even number of characters."), + cdata); + len = strlen (cdata)/2; data = xmalloc (len); |