Closed RadxaYuntian closed 10 months ago
Hi Zhang. (Thanks for trying out Seer).
I admit I need to improve embedded debugging.
What other debuggers have you had success with? I can look to see what they do.
Thanks.
Unfortunately none so far. I tried gdbfrontend and it can't even properly attached to it. gdbgui's AUR package is currently broken so I didn't bother.
Plain gdb can attach and execute continue
command. However, my breakpoint was not hit for whatever reason, which is why I wanted to verify with a GUI front end to rule out user error. Right now I'm back to printf...
Seer relies on gdb. If gdb can't do it natively, Seer won't be any additional help here.
I understand that. I just want to use seer to verify that the issue is indeed gdb and not user error. However, right now I cannot let kernel continue execution in seer, which was not an issue when using gdb directly.
Hi,
Just checking if you've had better success with native gdb with your debugging? Or perhaps another frontend has come along to help you?
There have been improvements to Seer's handling of connecting to a 'gdbserver' type process. You may want to give Seer another attempt by grabbing the latest "main" from github.
$ seergdb --connect localhost:6443 --sym vmlinux
It may have the continue
function fixed.
I just happen to have another driver related tasks today, and I'll see if I could find an excuse to use debugger :smile:
To help out. First run seer by itself and enable the gdb output and seer output to the log windows.
Then run Seer again when you attempt to debug. The two log views have "save-to-file" buttons. When it disconnects, save the two log files and attach it to this task. It would be greatly appreciated. It will help me debug the problem (hopefully).
Here is how I do it with note to future me. Targeting device is Radxa ROCK 4A which is based on Rockchip RK3399.
kgdbwait nokaslr kgdboc=ttyS2,460800n8 console=ttyS2,460800n8
to enable debugging. ttyFIQ0 is not supported, and 1.5M baud does not work.KGDB: Waiting for connection from remote gdb...
.agent-proxy
to split console data with debugger data, and that requires exclusive access to the serial device.agent-proxy 5550^5551 0 /dev/ttyUSB0,460800
telnet localhost 5550
to interact with serial console.aarch64-linux-gnu-gdb arch/arm64/boot/Image
to enter gdb, then run tar rem localhost:5551
to attach to remote target.c
command to continue.Seer specific part:
/usr/bin/aarch64-linux-gnu-gdb
(platform dependent).seergdb --connect localhost:5551
I'll still attach the log in case you can see how to improve the wait time between connection established and control flow available.
Although it does not seem like I can interrupt the execution flow again with Ctrl+I. I'm not familiar with gdb or Linux kernel debugging in general, so that could be some misconfiguration on my end.
Glad to hear it works. And thanks for the archive file.
The initial communication that Seer is doing can be related to two things:
Btw, thanks for the details of what steps you do to get things going. It helps me to see the "bigger picture" of this type of debugging.
I do not see any source files in the source view and that's likely because I didn't have a symbol file generated with my kernel. I also can't answer if the thread count is correct since I haven't been able to get the debugging environment set up.
Okay. Thanks for the feedback.
in case you can see how to improve the wait time between connection established and control flow available.
I'll look at the logs for that. gdb has some internal settings to enable timing of operations. I haven't played with it yet. I'll create a separate task for myself to look into it.
Thanks again for trying Seer.
I'm using
agent-proxy
withnokaslr kgdbwait console=ttyS2,460800n8 kgdboc=ttyS2,460800n8
kernel cmdline to debug an embedded platform. I can successfully attach Seer withseergdb --connect localhost:6443 vmlinux
. However, fromagent-proxy
's console port, I can see many gdb data being transmitted, and the execution control commands in Seer becomes unusable.