mtdbg: Backtrace implemented #315

Merged
mxlgv merged 9 commits from mxlgv/mtdbg-impl-simple-backtrace into main 2026-01-18 13:08:04 +00:00
Owner

Added support for backtrace/stacktrace output. This is useful for high-level languages ​​like C and Oberon07. If a debug file is provided, searches for the nearest debug symbol.

Added support for backtrace/stacktrace output. This is useful for high-level languages ​​like C and Oberon07. If a debug file is provided, searches for the nearest debug symbol.
mxlgv added 5 commits 2026-01-12 20:23:43 +00:00
Signed-off-by: Max Logaev <maxlogaev@proton.me>
Signed-off-by: Max Logaev <maxlogaev@proton.me>
Signed-off-by: Max Logaev <maxlogaev@proton.me>
- Added depth option for backtrace
- Fixed duplication of nearby symbols

Signed-off-by: Max Logaev <maxlogaev@proton.me>
mtdbg: Update version
All checks were successful
Build system / Build (pull_request) Successful in 16m17s
Build system / Check kernel codestyle (pull_request) Successful in 1m8s
4eb559644a
Signed-off-by: Max Logaev <maxlogaev@proton.me>
mxlgv added 1 commit 2026-01-12 20:46:16 +00:00
mtdbg: Fixed check read mem error
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m6s
Build system / Build (pull_request) Successful in 15m53s
495f08d665
Signed-off-by: Max Logaev <maxlogaev@proton.me>
mxlgv requested review from Burer 2026-01-12 20:46:39 +00:00
mxlgv requested review from Doczom 2026-01-12 20:46:39 +00:00
Burer requested changes 2026-01-12 20:57:46 +00:00
Dismissed
@@ -1148,0 +1163,4 @@
OnBacktrace:
push ebp
xor eax, eax
Owner

Maybe would be better to do it like this?

mov     [prev_bt_sym], 0
or      eax, -1
Maybe would be better to do it like this? ```asm mov [prev_bt_sym], 0 or eax, -1 ```
Author
Owner

This is 4 bytes more

This is 4 bytes more
mxlgv marked this conversation as resolved
Doczom approved these changes 2026-01-14 19:26:21 +00:00
Dismissed
mxlgv changed title from mtdbg: Backtrace implemented to WIP: mtdbg: Backtrace implemented 2026-01-15 16:42:51 +00:00
Author
Owner

TODO: Remove the check for the initial esp, as the initial esp can be changed during program execution. The end of the stack trace can be determined by ebp, since ebp at the entry point is 0.

TODO: Remove the check for the initial `esp`, as the initial `esp` can be changed during program execution. The end of the stack trace can be determined by `ebp`, since `ebp` at the entry point is 0.
mxlgv added 2 commits 2026-01-16 17:24:31 +00:00
Signed-off-by: Max Logaev <maxlogaev@proton.me>
mtdbg: Rem check prev backtrace symbol
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m15s
Build system / Build (pull_request) Successful in 16m26s
9f55dc8d4f
The symbol may be repeated during recursion

Signed-off-by: Max Logaev <maxlogaev@proton.me>
mxlgv dismissed Doczom's review 2026-01-16 17:24:32 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Author
Owner

Fixed #315 (comment) in cc66bfd864

@Burer @Doczom please review again

Fixed https://git.kolibrios.org/KolibriOS/kolibrios/pulls/315#issuecomment-3893 in https://git.kolibrios.org/KolibriOS/kolibrios/commit/cc66bfd86440a9df31ec4689ca15a4d222c73421 @Burer @Doczom please review again
mxlgv requested review from Burer 2026-01-16 17:29:13 +00:00
mxlgv requested review from Doczom 2026-01-16 17:29:21 +00:00
mxlgv changed title from WIP: mtdbg: Backtrace implemented to mtdbg: Backtrace implemented 2026-01-16 17:29:31 +00:00
mxlgv added 1 commit 2026-01-16 17:33:01 +00:00
mtdbg: Removed extra whitespace
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m8s
Build system / Build (pull_request) Successful in 18m22s
56eaa4f5c9
Signed-off-by: Max Logaev <maxlogaev@proton.me>
Doczom approved these changes 2026-01-17 18:40:45 +00:00
Burer approved these changes 2026-01-18 10:43:21 +00:00
mxlgv merged commit ccd0c183ec into main 2026-01-18 13:08:04 +00:00
mxlgv deleted branch mxlgv/mtdbg-impl-simple-backtrace 2026-01-18 13:08:04 +00:00
Sign in to join this conversation.
No Reviewers
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KolibriOS/kolibrios#315