Skip to contentSkip to conversation

scripts/gdb: Fix lx-timerlist after tk_core macroification

PATCH In review Florian Fainelli 2 participants 2 messages Mar 26 – Mar 27 GDB kernel debugging helper scripts

lore
Share & tools
lore
#0 lore raw

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

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")
---
 scripts/gdb/linux/timerlist.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/gdb/linux/timerlist.py +1 -1
index ccc24d30de80..9fb3436a217c 100644
@@ -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']
 
Signature · 1 line
2.43.0
#1 lore raw

Hi Florian,

Quoted 7 lines · Florian Fainelli

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")

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

Thomas