Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8482355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:48:18+00:00 2026-06-10T19:48:18+00:00

I am trying to debug a device driver which is crashing the kernel on

  • 0

I am trying to debug a device driver which is crashing the kernel on a Mac using a remote machine running gdb (trying to follow the instructions here). Both machines are connected to the same network by Ethernet (same router even, and both can access the network). I have also set nvram boot-args="debug=0x144" on the target and restarted.

I then load the kernel extension on the target as usual. On the host machine I start gdb like this:

$ gdb -arch i386 /Volumes/KernelDebugKit/mach_kernel

Once in gdb, I load the kernel macros and set up for remote attachment

(gdb) source /Volumes/KernelDebugKit/kgmacros
(gdb) target remote-kdp
(gdb) kdp-reattach 11.22.33.44

However, the last command then does not make a connection and I get an endless spool of

kdp_reply_wait: error from kdp_receive: receive timeout exceeded
kdp_transaction (remote_connect): transaction timed out
kdp_transaction (remote_connect): re-sending transaction

What is the correct way to get gdb connected to the target machine?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:48:20+00:00Added an answer on June 10, 2026 at 7:48 pm

    There are a number of ways to break into the target, including:

    • Kernel panic, as stated in your answer above.
    • Non-maskable interrupt, which is triggered by the cmd-option-ctrl-shift-esc key combination.
    • Code a break in your kernel extension using PE_enter_debugger(), which is declared in pexpert/pexpert.h
    • Halt at boot by setting DB_HALT (0x01) in the NVRAM boot-args value.

    Additionally, you may need to set a persistent ARP table entry, as the target is unable to respond to ARP requests while stopped in the debugger. I use the following in my debugger-launch shell script to set the ARP entry if it doesn’t already exist:

    if !(arp -a -n -i en0 | grep '10\.211\.55\.10[)] at 0:1c:42:d7:29:47 on en0 permanent' > /dev/null) ; then
        echo "Adding arp entry"
        sudo arp -s 10.211.55.10 00:1c:42:d7:29:47
    fi
    

    Someone more expert could probably improve on my bit of shell script.

    All of the above is documented in http://developer.apple.com/library/mac/documentation/Darwin/Conceptual/KernelProgramming/KernelProgramming.pdf.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to debug a device driver which apparently causes other task to
I am trying to debug a C++ native code on Android device using NDK.
I am trying to debug a multi-threaded Android app on a 2.3.6 device using
I am trying to automate a device driver's debug session in Windows XP with
I'm trying to find default Intent which device is using to support specific mime
I'm trying to debug an application on an embedded device running an old version
I'm trying to debug my app on the device. Enabled USB debugging On Computer
I'm trying to debug and test my application with a Dell Windows Mobile device
I am trying to debug an Android app that talks to a usb device.
I am trying to test an app on my iOS 4.2.1 device using XCode

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.