Using PEEDI
break add hard 0x90000398
; addr from 'nm vmlinux | grep start_kernel'
go
; start CPU
wait 30000 stop
; wait 30 seconds to enter debug
break del all
; remove previously added watchpoint
beep 500 20
; beep to signalize ready for debug
For Xscale targets use this:
break add watch 0xffff001C w 32
; watch point on setting vectors
go
; start CPU
wait 30000 stop
; wait 30 seconds to enter debug
break del all
; remove previously added watchpoint
beep 500 20
; beep to signalize ready for debug
This will set a break/watch in the beginning of the Linux kernel code and will start the kernel. This
way after target is powered the kernel will be started and a little later it will enter debug. At this
point you can start gdb/insight pointing the kernel ELF image file. Next you can use the target
command to connect to PEEDI. Make a si just for the gdb/insight to refresh its source window. Now
you can set/remove breakpoints in you source code, step-by-step examine the execution or issue
continue to start the kernel after you have set all the breakpoints you desire. If a break point is hit,
gdb/insight will highlight the source line where the execution has stopped.
3.14 Target OS thread awareness
PEEDI provides target OS thread awareness for systems that support Context Switching. Such
system is eCos for example. In these systems the Process Context is used to store information to be
able to stop and re-start the process later. Data structures in the form of Process Control Blocks are
used to save the CPU state to perform a process switch. When debugging with GDB, the info
threads command provides information for existing threads. PEEDI can be configured to display the
existing threads in the project. Before using info threads in the GDB command window, you must
first set a section in the target configuration file that tells PEEDI how to find the tasks. This section
includes addresses and offsets needed to be filled in order for PEEDI to be able to scan the OS task
list. To obtain the correct OS information copy the configuration from the following link to
the .gdbinit file of your project.
http://download.ronetix.at/peedi/doc/os_scripts
Keep in mind how the OS thread support in PEEDI works:
•
after every CPU halt PEEDI loops all threads using the NEXT pointer.
PEEDI User’s Manual
101