summaryrefslogtreecommitdiff
path: root/sys/arch/sh
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2024-11-07 16:02:30 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2024-11-07 16:02:30 +0000
commit3997efc3b96796a7b3c7119ea89732bad107d8e6 (patch)
tree610310ee141a3cd1fc6f76acff7fc1f0457fbf34 /sys/arch/sh
parent4b64df74e27c132c8ee8abc403a495d4ee7d575a (diff)
Constify strings in symbol-related ddb interfaces, and make the iterator
callback interface a bit simpler. ok beck@ claudio@ mpi@
Diffstat (limited to 'sys/arch/sh')
-rw-r--r--sys/arch/sh/sh/db_disasm.c4
-rw-r--r--sys/arch/sh/sh/db_interface.c4
-rw-r--r--sys/arch/sh/sh/db_trace.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/sh/sh/db_disasm.c b/sys/arch/sh/sh/db_disasm.c
index 0fba4d63b09..142148548d4 100644
--- a/sys/arch/sh/sh/db_disasm.c
+++ b/sys/arch/sh/sh/db_disasm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_disasm.c,v 1.6 2019/11/07 16:08:07 mpi Exp $ */
+/* $OpenBSD: db_disasm.c,v 1.7 2024/11/07 16:02:29 miod Exp $ */
/* $NetBSD: db_disasm.c,v 1.13 2006/01/21 02:09:06 uwe Exp $ */
/*
@@ -151,7 +151,7 @@ disasm_branch(char *buf, size_t bufsiz, const char *opstr, vaddr_t addr)
{
size_t len;
db_expr_t d, value;
- char *name;
+ const char *name;
Elf_Sym *cursym;
extern unsigned long db_lastsym;
extern unsigned int db_maxoff;
diff --git a/sys/arch/sh/sh/db_interface.c b/sys/arch/sh/sh/db_interface.c
index 4290dfff0e6..2ec55cfe063 100644
--- a/sys/arch/sh/sh/db_interface.c
+++ b/sys/arch/sh/sh/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.15 2022/04/14 19:47:11 naddy Exp $ */
+/* $OpenBSD: db_interface.c,v 1.16 2024/11/07 16:02:29 miod Exp $ */
/* $NetBSD: db_interface.c,v 1.37 2006/09/06 00:11:49 uwe Exp $ */
/*-
@@ -579,7 +579,7 @@ db_frame_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
void
__db_print_symbol(db_expr_t value)
{
- char *name;
+ const char *name;
db_expr_t offset;
db_find_sym_and_offset((vaddr_t)value, &name, &offset);
diff --git a/sys/arch/sh/sh/db_trace.c b/sys/arch/sh/sh/db_trace.c
index 316157a705d..1076883c6eb 100644
--- a/sys/arch/sh/sh/db_trace.c
+++ b/sys/arch/sh/sh/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.10 2019/11/07 16:08:08 mpi Exp $ */
+/* $OpenBSD: db_trace.c,v 1.11 2024/11/07 16:02:29 miod Exp $ */
/* $NetBSD: db_trace.c,v 1.19 2006/01/21 22:10:59 uwe Exp $ */
/*-
@@ -111,7 +111,7 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
if ((tf->tf_ssr & PSL_MD) == 0)
break;
} else {
- char *name;
+ const char *name;
db_expr_t offset;
Elf_Sym *sym;