Atsushi Posted May 29, 2007 Share Posted May 29, 2007 4 months ago I built xnu-1048-semthex_2 kernel for my study though it didn't work with my PC that has a Celeron D which has SSE2 also SSE3. Recently, I got a VAIO that has Core 2 Duo so I tried xnu-1048-semthex_2 kernel(named mach_kernel.vaio) that was bulit by me then it worked so I've tried remote debugging for xnu-1048-semthex_2 but gdb can't attach the target PC. I have done the following things, used VAIO as Target and G4 Cube as Host. 1. Boot the Target with "hd(0,3)mach_kernel.vaio debug=0x144" on the Darwin/x86 boot loader for booting OSx86 10.4.9 on my VAIO. "debug=0x144" means DB_NMI, DB_ARP and DB_LOG_PI_SCRN. 2. Host, set up a permanent network connection to the target computer via ARP. $ ping -c 1 192.168.2.2 $ arp -an $ sudo arp -s 192.168.2.2 00:13:a9:a6:ec:3b $ arp -an 3. Host, Run gdb on the kernel. $ gdb -arch i386 /mach_kernel 4.Host, Tell gdb that you will be debugging remotely. (gdb) target remote-kdp 5.Target Break into the kernel debugging mode Hold down the following five keys: Alt, Windows, Ctrl, Shift and Esc. 6.Host Attach to the target computer. attach 192.168.2.2 But, gdb showed "kdp_reply_wait: error from kdp_receive: receive timeout exceeded kdp_transaction (remote_connect): transaction timed out kdp_transaction (remote_connect): re-sending transaction" After "ping 192.168.2.2" on the Host terminal so I hold down the following five keys: Alt, Windows, Ctrl, Shift and Esc on the Target then mouse doesn't work on the Target and ping stopped 192.168.2.2 ping statistics because Target didn't connect to Host. Then I think the reason is this but target actually breaks into the kernel debugging mode. If it goes well, in console, I’ll see the following message on the screen like this: ethernet MAC address: 00:13:a9:a6:ec:3b ip address: 192.168.2.2 But console.app doesn't show them. At last I think that kdp or something doesn't work though I don't know what is kdp. Actually, I changed the device ID on the kext for VAIO LAN then LAN works and debug version kernel showed 00:00:00:00:00:00 for MAC address also 00.00.00.00 for IP address when booted with kernel debug version on VAIO. Maybe I will succeed with a LAN that is recogized by kernel debug version on the other PC. Isn't there person who succeeds remote debugging for OSx86 mach_kernel? Before do this, I read Two-Machine Debugging and Hello Debugger: Debugging a Device Driver With GDB Thank you, Atsushi Link to comment Share on other sites More sharing options...
Recommended Posts