diff options
author | Markus Metzger <mmetzger@sourceware.org> | 2013-03-27 09:42:47 +0000 |
---|---|---|
committer | Markus Metzger <mmetzger@sourceware.org> | 2013-03-27 09:42:47 +0000 |
commit | 0ccfeeae972c51bf2c8c3bc5a66d72d62f75398d (patch) | |
tree | da7460822ce4bd9c6283b7ce43d36cc7224482c7 /gdb | |
parent | 40653b35683fa5de89f40ebea274d2bb375a62b0 (diff) | |
download | gdb-0ccfeeae972c51bf2c8c3bc5a66d72d62f75398d.zip gdb-0ccfeeae972c51bf2c8c3bc5a66d72d62f75398d.tar.gz gdb-0ccfeeae972c51bf2c8c3bc5a66d72d62f75398d.tar.bz2 |
record: fix instruction-history-size regression
* record.c (command_size_to_target_size): Fix size comparison.
Change parameter type from pointer to integer to integer.
Update all users.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/record.c | 16 |
2 files changed, 14 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 180b330..35b7010 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2013-03-27 Markus Metzger <markus.t.metzger@intel.com> + + * record.c (command_size_to_target_size): Fix size comparison. + Change parameter type from pointer to integer to integer. + Update all users. + 2013-03-27 Pierre Muller <muller@sourceware.org> * windows-nat.c (handle_output_debug_string): Avoid typecast diff --git a/gdb/record.c b/gdb/record.c index b64f3bc..2736a1e 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -442,18 +442,18 @@ get_insn_history_modifiers (char **arg) meaning unlimited. The target interfaces works with signed int though, to indicate direction, so map "unlimited" to INT_MAX, which is about the same as unlimited in practice. If the user does have - a log that huge, she can can fetch it in chunks across several - requests, but she'll likely have other problems first... */ + a log that huge, she can fetch it in chunks across several requests, + but she'll likely have other problems first... */ static int -command_size_to_target_size (unsigned int *command) +command_size_to_target_size (unsigned int size) { - gdb_assert (*command <= INT_MAX || *command == UINT_MAX); + gdb_assert (size <= INT_MAX || size == UINT_MAX); - if (record_call_history_size == UINT_MAX) + if (size == UINT_MAX) return INT_MAX; else - return *command; + return size; } /* The "record instruction-history" command. */ @@ -467,7 +467,7 @@ cmd_record_insn_history (char *arg, int from_tty) flags = get_insn_history_modifiers (&arg); - size = command_size_to_target_size (&record_insn_history_size); + size = command_size_to_target_size (record_insn_history_size); if (arg == NULL || *arg == 0 || strcmp (arg, "+") == 0) target_insn_history (size, flags); @@ -583,7 +583,7 @@ cmd_record_call_history (char *arg, int from_tty) flags = get_call_history_modifiers (&arg); - size = command_size_to_target_size (&record_call_history_size); + size = command_size_to_target_size (record_call_history_size); if (arg == NULL || *arg == 0 || strcmp (arg, "+") == 0) target_call_history (size, flags); |