NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-evbarm/59419: KGDB build fails for evbarm
>Number: 59419
>Category: port-evbarm
>Synopsis: KGDB build fails for evbarm
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-evbarm-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 13 19:55:00 +0000 2025
>Originator: James Browning
>Release: hg src-draft trunk tip (as of April 7th 2025)
>Organization:
>Environment:
Linux phobos 6.12.21-gentoo #1 SMP PREEMPT_DYNAMIC Sun Apr 27 20:43:52
PDT 2025 x86_64 AMD Ryzen 5 PRO 4650U with Radeon Graphics
AuthenticAMD GNU/Linux
>Description:
When attempting to enable kgdb support for evbarm, I run into a couple of build failures:
1. conflicting definitions of "db_active"
2. unrecognized symbol "db_error"
Here is the output for error 1:
--- db_interface.o ---
/home/james/NetBSD/src-draft/sys/arch/arm/arm32/db_interface.c:77:9:
error: conflicting type qualifiers for 'db_active'
77 | int db_active = 0;
| ^~~~~~~~~
In file included from
/home/james/NetBSD/src-draft/sys/arch/arm/arm32/db_interface.c:59:
/home/james/NetBSD/src-draft/sys/ddb/db_active.h:41:18: note: previous
definition of 'db_active' with type 'int'
41 | static const int db_active __unused = 0;
|
And after adding a work around for error 1, here is error 2:
/home/james/NetBSD/tools/bin/armv7--netbsdelf-eabihf-ld: db_access.o:
in function `db_get_qvalue':
/home/james/NetBSD/src-draft/sys/ddb/db_access.c:99:(.text+0xd8):
undefined reference to `db_error'
+ exit 1
Not sure if it matters, but I'm cross compiling from gentoo. I've never encountered any other issues with my build environment besides this.
>How-To-Repeat:
In your GENERIC.local, add the following to enable KGDB in the build:
no options DDB
no options DDB_ONPANIC
no options DDB_HISTORY_SIZE
options KGDB
options KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x48022000,KGDB_DEVRATE=115200,KGDB_DEV=123 #DEVADDR is UART1 on AM335x
makeoptions DEBUG="-g"
Compile the GENERIC kernel with "evbarm" as the machine and "earmv7hf" for the architecture.
>Fix:
Temporary work around:
diff -r d708c4dcdd7d sys/arch/arm/arm32/db_interface.c
--- a/sys/arch/arm/arm32/db_interface.c Sun Apr 27 23:30:39 2025 +0000
+++ b/sys/arch/arm/arm32/db_interface.c Tue May 13 12:08:07 2025 -0700
@@ -74,7 +74,7 @@
int db_trapper(u_int, u_int, trapframe_t *, int);
-int db_active = 0;
+//int db_active = 0;
db_regs_t ddb_regs; /* register state */
db_regs_t *ddb_regp;
diff -r d708c4dcdd7d sys/ddb/db_access.c
--- a/sys/ddb/db_access.c Sun Apr 27 23:30:39 2025 +0000
+++ b/sys/ddb/db_access.c Tue May 13 12:08:07 2025 -0700
@@ -93,10 +93,12 @@
return (uint32_t)db_get_value(addr, size, false);
}
- if (size != sizeof(data)) {
- db_error("unsupported size\n");
- /*NOTREACHED*/
- }
+
+// if (size != sizeof(data)) {
+//
+// db_error("unsupported size\n");
+// /*NOTREACHED*/
+// }
db_read_bytes(addr, sizeof(data), (char *)&data);
return data;
Home |
Main Index |
Thread Index |
Old Index