Connection issue using GDB and VirtualBox on Linux

All development related issues welcome

Moderator: Moderator Team

Post Reply
wuhao09
Posts: 5
Joined: Thu Dec 14, 2017 4:50 am

Connection issue using GDB and VirtualBox on Linux

Post by wuhao09 »

Hello Guys,

I'm trying to run ReactOS in VirtualBox and then use GDB to remote debug it on a Linux PC. I've configured ReactOS virtual COM2 port to a Linux pipe and then used socat to redirect the pipe to a pseduo terminal. Then GDB connects to this pseduo terminal with the "target remote" command. But the GDB always shows the warning message: unrecognized item "timeout" in "qSupported" response and the connection fails. I've tried many times and don't know where is wrong. I don't know if you guys have met this before. Any help would be appreciated!

Best Regards,
Hao Wu
hbelusca
Developer
Posts: 1197
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Connection issue using GDB and VirtualBox on Linux

Post by hbelusca »

Hi! Have you checked that you're using the kdgdb stub on ReactOS side?
In https://svn.reactos.org/svn/reactos?vie ... sion=72435 it is explained how to proceed:
To enable , in CMakeCache.txt :
- Set GDB:BOOL=TRUE
- Set _WINKD_:BOOL=TRUE
- Set KDBG:BOOL=FALSE
To do : give GDB the list of loaded drivers. Loading ntoskrnl.exe symbols at 0x80801000 already does a good enough job.
Default output is on COM1. Can be configure to any othe COM port with usual kernel options.
Hope you'll like it as much as I do ;-)
wuhao09
Posts: 5
Joined: Thu Dec 14, 2017 4:50 am

Re: Connection issue using GDB and VirtualBox on Linux

Post by wuhao09 »

Hi! Thank you for the information! I tried to change the settings in CMakeCache.txt according to the link and rebuilt the code. But the timeout issue is still there. I think maybe I should try QEMU and see if it's OK. Thank you again!
wuhao09
Posts: 5
Joined: Thu Dec 14, 2017 4:50 am

Re: Connection issue using GDB and VirtualBox on Linux

Post by wuhao09 »

I've tried QEMU with GDB. It's a simpler way I think. There is no need to configure GDB, _WINKD_, and KDBG in CMakeCache.txt and no need to configure /DEBUGPORT=GDB in freeldr.ini. All I need to do is to start QEMU with -s -S switches and then GDB connects to localhost:1234 successfully.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest