1. C

    Setting up a bhyve vm for kernel development and debugging

    I recently set up a bhyve vm on my workstation for kernel development and figured others might be able to make use of my notes as well, because it's really quite easy. VM setup Download a FreeBSD disk image, i.e. 13.2-RELEASE if you're running 13.2. This version should match whatever kernel...
  2. byrnejb

    Shell bash trace / debugging does not seem to display the script line

    FreeBSD-12.3p5 GNU bash, version 5.1.16(0)-release (amd64-portbld-freebsd12.3) I am working on a bash script and I wish to trace the execution to locate a problem. The default shell for the development user is also bash. I am invoking the script from the command line using: export PS4="Line...
  3. B

    Other java debugging tools

    Hello! I use a java application with http service that after some time stops. The application is started at console (ssh) and when lost connection it becomes an orphaned process. This is not a problem. The problem is how can I view the cause that halts the process. (newbie, non-english-language)
  4. qiu3344

    Solved Problems with getting a crash dump

    Hello, I am currently using FreeBSD 14.0-CURRENT and I found a bug that triggers a kernel panic. I wanted to make a kernel crash dump to further investigate the issue, but after a few tries I still did not manage to do it. I started by following the instructions in the FreeBSD Handbook. I check...
  5. I

    Solved Debug FreeBSD klds

    I'm trying to debug a function from a kld and in order to do that I use gdb, the steps that i follow in order to do that are: 1. load the debugging symbols from /boot/kernel/kernel; 2. load debugging symbols from <my_file>.ko; 3. set a breakpoint on a function that should execute when the...
  6. P

    upgrading kgdb

    As of now I have installed the latest version of gdb via the package manager (7.9.1). The binary gets installed as /usr/local/bin/gdb which is apparently a symlink to /usr/local/bin/gdb791. The version which comes with the system is at /usr/bin/gdb which is an older version (v6.1.1). I have...
  7. P

    Hacking/Debugging nullfs - KGDB cannot access memory at address

    I am trying to hack/understand the nullfs kernel module so to that end, I do the following: On the target machine: kldstat gives: Id Refs Address Size Name 1 10 0xffffffff80200000 17e10c8 kernel 2 1 0xffffffff819e2000 4cf0 vmxnet.ko 3 1 0xffffffff819e7000 16e0...
  8. P

    Toggling between remote KGDB and local DDB within a debugging session

    Hello. I think the title says it all!! :) I would like to know if there is indeed a way to toggle between gdb and ddb while debugging a remote kernel. I am already at the gdb (or rather kgdb :rolleyes:) prompt. From here how do I switch to local ddb on the debugged machine?? My kernel...
  9. P

    Solved Cannot see virtual serial port in Workstation VM

    Hello I am trying to add a virtual serial port (as a named pipe) on two FreeBSD 10 VMs in workstation. One end, I am keeping it as the server (the one VM which will actually be having the virtual serial port) and the other VM will connect to the other end. MY host is Windows 8.1. However when...