[PATCH] scripts/gdb: Fix lx-timerlist after tk_core macroification

Florian Fainelli posted 1 patch 6 days, 18 hours ago
scripts/gdb/linux/timerlist.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] scripts/gdb: Fix lx-timerlist after tk_core macroification
Posted by Florian Fainelli 6 days, 18 hours ago
Commit 22c62b9a84b8 ("timekeeping: Introduce auxiliary timekeepers")
changed tk_core from being a C structure declaration to using a macro
identifier. This resulted in "lx-timerlist" to be broken and unable to
locate the "tk_core" symbol, fix that.

Fixes: 22c62b9a84b8 ("timekeeping: Introduce auxiliary timekeepers")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 scripts/gdb/linux/timerlist.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py
index ccc24d30de80..9fb3436a217c 100644
--- a/scripts/gdb/linux/timerlist.py
+++ b/scripts/gdb/linux/timerlist.py
@@ -20,7 +20,7 @@ def ktime_get():
     We can't read the hardware timer itself to add any nanoseconds
     that need to be added since we last stored the time in the
     timekeeper. But this is probably good enough for debug purposes."""
-    tk_core = gdb.parse_and_eval("&tk_core")
+    tk_core = gdb.parse_and_eval("&timekeeper_data[TIMEKEEPER_CORE]")
 
     return tk_core['timekeeper']['tkr_mono']['base']
 
-- 
2.43.0
Re: [PATCH] scripts/gdb: Fix lx-timerlist after tk_core macroification
Posted by Thomas Weißschuh 6 days, 9 hours ago
Hi Florian,

On Thu, Mar 26, 2026 at 04:01:42PM -0700, Florian Fainelli wrote:
> Commit 22c62b9a84b8 ("timekeeping: Introduce auxiliary timekeepers")
> changed tk_core from being a C structure declaration to using a macro
> identifier. This resulted in "lx-timerlist" to be broken and unable to
> locate the "tk_core" symbol, fix that.
> 
> Fixes: 22c62b9a84b8 ("timekeeping: Introduce auxiliary timekeepers")
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>

The same change is already queued in the tip tree as commit
5aa9383813ac ("scripts/gdb: timerlist: Adapt to move of tk_core").


Thomas