Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
soc:2008:stefanha:journal:week3 [2008/06/12 09:33]
stefanha
soc:2008:stefanha:journal:week3 [2008/06/13 09:11]
stefanha
Line 84: Line 84:
  
 Implementing watchpoints has paid off ;-)! Implementing watchpoints has paid off ;-)!
 +
 +==== Fri Jun 13 ====
 +Git commits:
 +  * [[http://​git.etherboot.org/?​p=people/​stefanha/​gpxe.git;​a=commit;​h=8ec13694a44779156d679af99a104aeb3bbfdb53|[GDB] Zero-extend 16-bit segment registers]]
 +  * [[http://​git.etherboot.org/?​p=people/​stefanha/​gpxe.git;​a=commit;​h=03d22bf5e31348e3f3ede48500c981761f367651|[GDB] UDP clean up and add netdev refcnt]]
 +
 +**Segment registers sometimes contained junk values**. ​ The test suite reported that the ''​DS''​ segment register had the wrong value when running on real hardware. ​ Most of my past development and testing has been in QEMU.
 +
 +Upon closer inspection the lower 16 bits of ''​DS''​ were correct. ​ On older processors, the upper 16 bits are undefined whereas they are guaranteed to be zero on newer processors. ​ gPXE runs correctly since only the lower 16 bits of segment selectors are used by the CPU.
 +
 +Although it is technically okay for the upper 16 bits to be undefined, I think it is nicer if we zero-extend segment registers when reporting their values to GDB.  This makes it easier to write test cases and is less confusing for users.
 +
 +**Weekly meeting with mdc and mcb30**. ​ Things are looking good for cleaning up and merging the second round of GDB stub work:
 +  * Remote debugging over UDP
 +  * Watchpoints
 +  * Atomic read/write for device memory
 +  * Continue on detach/kill from GDB
 +
 +Making the merge happen is my immediate goal.  An interesting opportunity for another iteration of development is 16-bit real mode debugging. ​ If GDB can hold up to the pressures of real mode, then I will implement stub support.
  
 Next steps: Next steps:
-  * Fix 32-bit segment selector ''​mov''​ bug in ''​gdbidt.S''​.+  * Choose and document a simple way to manually call into the debugger.
   * Improve flow control so that GDB does not print warnings.   * Improve flow control so that GDB does not print warnings.
-  * Update [[:​dev:​gdbstub|GDB stub page]] and screencast when UDP code is merged into mainline.+  * Update [[:​dev:​gdbstub|GDB stub page]] and screencast when UDP code is merged into mainline.  See [[http://​grub.enbug.org/​DebuggingWithGDB|GRUB GDB wiki page]] for inspiration. 
 +  * See if GDB supports 16-bit code, and try out real-mode debugging.

QR Code
QR Code soc:2008:stefanha:journal:week3 (generated for current page)