Bug 462834 - Kate CANNOT display value of registers while debugging OS Kernel via QEMU+GDB
Summary: Kate CANNOT display value of registers while debugging OS Kernel via QEMU+GDB
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 22.08.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-12-10 02:43 UTC by integral
Modified: 2023-02-22 02:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Use Kate to debug my tiny x86 OS (2.98 MB, image/png)
2022-12-10 02:43 UTC, integral
Details

Note You need to log in before you can comment on or make changes to this bug.
Description integral 2022-12-10 02:43:40 UTC
Created attachment 154468 [details]
Use Kate to debug my tiny x86 OS

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

STEPS TO REPRODUCE
1. Start qemu-system-i386 by adding arguments "-s" (shorthand for -gdb tcp::1234) and "-S" (freeze CPU at startup, waiting for GDB to connect).
2. Use the GDB Plugin in Kate to debug the OS Kernel (connect to QEMU, add symbol files and execute to 0x7c00)

OBSERVED RESULT
Only local variables are displayed in "Call Stack and Locals".

EXPECTED RESULT
Value of CPU registers should be displayed in "Call Stack and Locals".

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux + KDE Plasma
(available in About System)
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Another popular code editor - Visual Studio Code, can display value of CPU registers in the debug session.
Comment 1 Christoph Cullmann 2023-01-27 22:10:13 UTC
Git commit 9e6d7eae088d1815ce60b1facb17e5ec6814b95b by Christoph Cullmann, on behalf of Héctor Mesa Jiménez.
Committed on 27/01/2023 at 22:09.
Pushed by cullmann into branch 'master'.

[gdbplugin] show CPU registers for GDB backend.

This patch adds a new variable scope for CPU registers
in the GDB backend:

- Unavailable registers are not shown.
- Values are shown using the raw format.

M  +58   -0    addons/gdbplugin/debugview.cpp
M  +6    -0    addons/gdbplugin/debugview.h
M  +4    -1    addons/gdbplugin/gdbvariableparser.cpp
M  +1    -1    addons/gdbplugin/gdbvariableparser.h

https://invent.kde.org/utilities/kate/commit/9e6d7eae088d1815ce60b1facb17e5ec6814b95b
Comment 2 integral 2023-02-22 02:41:36 UTC
(In reply to Christoph Cullmann from comment #1)
> Git commit 9e6d7eae088d1815ce60b1facb17e5ec6814b95b by Christoph Cullmann,
> on behalf of Héctor Mesa Jiménez.
> Committed on 27/01/2023 at 22:09.
> Pushed by cullmann into branch 'master'.
> 
> [gdbplugin] show CPU registers for GDB backend.
> 
> This patch adds a new variable scope for CPU registers
> in the GDB backend:
> 
> - Unavailable registers are not shown.
> - Values are shown using the raw format.
> 
> M  +58   -0    addons/gdbplugin/debugview.cpp
> M  +6    -0    addons/gdbplugin/debugview.h
> M  +4    -1    addons/gdbplugin/gdbvariableparser.cpp
> M  +1    -1    addons/gdbplugin/gdbvariableparser.h
> 
> https://invent.kde.org/utilities/kate/commit/
> 9e6d7eae088d1815ce60b1facb17e5ec6814b95b

It would be better if the display format of local variables and CPU registers can be customized.