X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Fbreakpoints.c;h=c4a959df3ea949d4a70e93f4375126f70602f02d;hb=2934ac454e32b21b1bd624189745d9f21ee79b46;hp=5143afb7bca46f9d7a9995fe182900710d635a3a;hpb=f132fcf636361009b4125827351ef01556d49b31;p=openocd.git diff --git a/src/target/breakpoints.c b/src/target/breakpoints.c index 5143afb7bc..c4a959df3e 100644 --- a/src/target/breakpoints.c +++ b/src/target/breakpoints.c @@ -16,9 +16,7 @@ * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * along with this program. If not, see . * ***************************************************************************/ #ifdef HAVE_CONFIG_H @@ -29,12 +27,12 @@ #include #include "breakpoints.h" -static char *breakpoint_type_strings[] = { +static const char * const breakpoint_type_strings[] = { "hardware", "software" }; -static char *watchpoint_rw_strings[] = { +static const char * const watchpoint_rw_strings[] = { "read", "write", "access" @@ -50,7 +48,7 @@ int breakpoint_add_internal(struct target *target, { struct breakpoint *breakpoint = target->breakpoints; struct breakpoint **breakpoint_p = &target->breakpoints; - char *reason; + const char *reason; int retval; int n; @@ -396,7 +394,7 @@ int watchpoint_add(struct target *target, uint32_t address, uint32_t length, struct watchpoint *watchpoint = target->watchpoints; struct watchpoint **watchpoint_p = &target->watchpoints; int retval; - char *reason; + const char *reason; while (watchpoint) { if (watchpoint->address == address) { @@ -405,7 +403,7 @@ int watchpoint_add(struct target *target, uint32_t address, uint32_t length, || watchpoint->mask != mask || watchpoint->rw != rw) { LOG_ERROR("address 0x%8.8" PRIx32 - "already has watchpoint %d", + " already has watchpoint %d", address, watchpoint->unique_id); return ERROR_FAIL; }