title: Debugging user-code on xv6 with gdb
body: <p>I'm doing an OS class that's based on xv6 and I wrote a program that needs to run on it.</p>
  
  <p>I know that I can debug kernel code with <code>make qemu-gdb</code> but I'm not sure how to debug my own user program.</p>
  
  <p>Lets say I want to debug <code>cat</code>, how would I go about doing that?</p>
  
  <p>Thanks</p>
  
  <p>P.S. isn't there an xv6 tag? should this question even go here?</p>