This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 8/9] constify set_breakpoint_condition
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 20 Mar 2015 16:56:39 +0000
- Subject: [PATCH 8/9] constify set_breakpoint_condition
- Authentication-results: sourceware.org; auth=none
- References: <1426870600-17876-1-git-send-email-qiyaoltc at gmail dot com>
From: Pedro Alves <palves@redhat.com>
gdb:
2015-03-20 Pedro Alves <palves@redhat.com>
* breakpoint.c (set_breakpoint_condition): Make argument "exp" const.
* breakpoint.h (set_breakpoint_condition): Update declaration.
---
gdb/breakpoint.c | 2 +-
gdb/breakpoint.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 0c000f2..13c8949 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -957,7 +957,7 @@ get_first_locp_gte_addr (CORE_ADDR address)
}
void
-set_breakpoint_condition (struct breakpoint *b, char *exp,
+set_breakpoint_condition (struct breakpoint *b, const char *exp,
int from_tty)
{
xfree (b->cond_string);
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index b85939a..562a6b6 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -1525,7 +1525,7 @@ extern int breakpoints_should_be_inserted_now (void);
extern void breakpoint_retire_moribund (void);
/* Set break condition of breakpoint B to EXP. */
-extern void set_breakpoint_condition (struct breakpoint *b, char *exp,
+extern void set_breakpoint_condition (struct breakpoint *b, const char *exp,
int from_tty);
/* Checks if we are catching syscalls or not.
--
1.9.1