summaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-11-08 15:26:43 +0000
committerPedro Alves <palves@redhat.com>2016-11-08 15:26:43 +0000
commit896b6bda6904765f36692d76a37b99c0412ca9ae (patch)
treeb3fe8a6b186a96e8277d7a2c777c412f7154c395 /gdb/breakpoint.h
parent4f8ad951f662864884d4b11315c940c5239a4a89 (diff)
breakpoint.c:commands_command_1 constification and cleanup
This is constification needed for next patch. Adjust commands_command_1 to use std::string too because the "arg" parameter is currently overwritten and then passed to make_cleanup. The constification alone would trigger a compile error in the make_cleanup call otherwise (passing const char * to void * parameter). Using std::string gets rid of the cleanup in the first place, resulting in simpler code. gdb/ChangeLog: 2016-11-08 Pedro Alves <palves@redhat.com> * breakpoint.c (struct commands_info) <arg>: Constify. (commands_command_1): Constify 'arg' parameter. Use std::string and string_printf. (commands_from_control_command): Constify 'arg' parameter. (map_breakpoint_numbers): Constify 'args' parameter. * breakpoint.h (commands_from_control_command): Constify 'arg' parameter.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index e2e15b6a11..8e215b6b92 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -1452,7 +1452,7 @@ extern void enable_breakpoints_after_startup (void);
after they've already read the commands into a struct
command_line. */
extern enum command_control_type commands_from_control_command
- (char *arg, struct command_line *cmd);
+ (const char *arg, struct command_line *cmd);
extern void clear_breakpoint_hit_counts (void);