3

To start with - I don't have JTAG hardware debugger.

What I have:

Pandaboard and serial-USB cable to connect to console and my computer with Freebsd and GNU/Linux distribution.

What I'm looking for - convinient way to trace/debug bootprocess inside FreeBSD kernel ( I'm mostly interested in this fragment: https://github.com/freebsd/freebsd/blob/master/sys/arm/arm/locore-v6.S and https://github.com/freebsd/freebsd/blob/master/sys/arm/arm/mp_machdep.c as I'm, going to modyfy those files ).

csstudent
  • 155
  • 1
  • 8

1 Answers1

1

Based on my experience, there are few ways:

  • KDB / DDB: add call kdb_enter("A", "XYZ") to stop processing and enter interactive debug mode of DDB via serial.
  • printf-s in machine dependent (mach_dep) code
  • bootverbose, BUSDEBUG, VERBOSE_SYSINIT in machine independent code

Also it's worth to mention that DDB code contains functions to print registers, stack trace and etc.

Michael Zhilin
  • 553
  • 6
  • 9