aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-11-19 14:32:53 +0000
committerPedro Alves <palves@redhat.com>2015-11-19 14:32:53 +0000
commit915ef8b18e28e6418216a582067b9fbdd6395e6a (patch)
tree3c9c9222e41286506847f951a33f6063aaeb5672 /gdb/ChangeLog
parentc2825638b6784179f191c6ee8ebbda1c49ae5271 (diff)
downloadgdb-915ef8b18e28e6418216a582067b9fbdd6395e6a.zip
gdb-915ef8b18e28e6418216a582067b9fbdd6395e6a.tar.gz
gdb-915ef8b18e28e6418216a582067b9fbdd6395e6a.tar.bz2
[C++] remote.c: Avoid enum arithmetic
Fixes: src/gdb/remote.c: In function ‘void remote_unpush_target()’: src/gdb/remote.c:4610:45: error: invalid conversion from ‘int’ to ‘strata’ [-fpermissive] pop_all_targets_above (process_stratum - 1); ^ In file included from src/gdb/inferior.h:38:0, from src/gdb/remote.c:25: src/gdb/target.h:2299:13: error: initializing argument 1 of ‘void pop_all_targets_above(strata)’ [-fpermissive] extern void pop_all_targets_above (enum strata above_stratum); ^ I used to carry a patch in the C++ branch that just did: - pop_all_targets_above (process_stratum - 1); + pop_all_targets_above ((enum strata) (process_stratum - 1)); But then thought that maybe adding a routine that does exactly what we need results in clearer code. This is the result. gdb/ChangeLog: 2015-11-19 Pedro Alves <palves@redhat.com> * remote.c (remote_unpush_target): Use pop_all_targets_at_and_above instead of pop_all_targets_above. * target.c (unpush_target_and_assert): New function, factored out from ... (pop_all_targets_above): ... here. (pop_all_targets_at_and_above): New function. * target.h (pop_all_targets_at_and_above): Declare.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d1b40b8..e6d7aac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2015-11-19 Pedro Alves <palves@redhat.com>
+
+ * remote.c (remote_unpush_target): Use
+ pop_all_targets_at_and_above instead of pop_all_targets_above.
+ * target.c (unpush_target_and_assert): New function, factored out
+ from ...
+ (pop_all_targets_above): ... here.
+ (pop_all_targets_at_and_above): New function.
+ * target.h (pop_all_targets_at_and_above): Declare.
+
2015-11-18 Simon Marchi <simon.marchi@ericsson.com>
* valops.c (value_string): Constify 'ptr' parameter.