Saturday, February 19, 2011

beginning xen and gdb.

Some quick notes for beginning to work with xen and using gdb for remote debugging.

XEN:

  1. Creating domain with xen :-
    1. xm create "domain_configuration_file"
  2. To list all domains running on xen:
    1. xm list 
  3. To kill a domain 
    1. xm destroy <domain_name>
        Here is more information on simple commands for working with xen 

GDB:
   Terminal 1: create the domain on a paused state. 
        xm create "domain_config" -p
  
  Terminal 2: run gdbsx and create network interface
       xm list   - get the domain id number 
       gdbsx -a <domainId> 32 9999 - 32 bit version at port number 9999 

  Terminal 3: run gdb 
      gdb path_to_the_os_executable
      gdb target remote localhost:9999 

   Some useful gdb commands:

      1. gdb break function_name     # set break point at function
      2. gdb continue                        # execute the program till the break point
      3. gdb print var_name              # print the content of the variable
      4. gdb next                               # execute one line at a time after the break point.
  

No comments:

Post a Comment