One of the major problems I''m facing with connecting to a test kernel through xen is the fact that xen doesn''t seem to pass back an exec mode that gdb can use for different types of architectures (16/32/64bit). I''m wondering, what is the xen community doing in order to work around this issue? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Clarification: I''m currently running a 64-bit linux kernel and am trying to connect to a 32-bit guest domain through xen, but I keep getting an issue where gdbserver seems to be sign extending a 32bit address into a 64bit one. (gdb) bt #0 0x00002b7ee48a6b03 in map_domain_va (xc_handle=6, cpu=0, guest_va=0xffffffff80107000, perm=1) at xc_ptrace.c:384 #1 0x00002b7ee48a6f79 in xc_ptrace (xc_handle=6, request=PTRACE_PEEKTEXT, domid_tid=0, eaddr=-2146406400, edata=0) at xc_ptrace.c:484 #2 0x0000000000405567 in linux_read_memory (memaddr=-2146406400, myaddr=0x7fffffbc22e0 "", len=Variable "len" is not available. ) at ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:406 #3 0x000000000040437a in read_inferior_memory (memaddr=-2146406400, myaddr=0x7fffffbc22e0 "", len=1) at ../../../gdb-6.2.1/gdb/gdbserver/target.c:64 #4 0x0000000000403a4f in main (argc=4, argv=0x7fffffbc2bb8) at ../../../gdb-6.2.1/gdb/gdbserver/server.c:520 (gdb) f 0 #0 0x00002b7ee48a6b03 in map_domain_va (xc_handle=6, cpu=0, guest_va=0xffffffff80107000, perm=1) at xc_ptrace.c:384 384 page = page_array[va >> PAGE_SHIFT] << PAGE_SHIFT; (gdb) list 379 unsigned long page; 380 381 if ( v != NULL ) 382 munmap(v, PAGE_SIZE); 383 384 page = page_array[va >> PAGE_SHIFT] << PAGE_SHIFT; 385 386 v = xc_map_foreign_range( xc_handle, current_domid, PAGE_SIZE, 387 perm, page >> PAGE_SHIFT); 388 (gdb) p va $1 = 18446744071563145216 (gdb) p/x va $2 = 0xffffffff80107000 How are people debugging 32-bit domains from 64bit dom0? ________________________________ From: Tan, Nicholas Sent: Wednesday, July 05, 2006 10:41 AM To: xen-devel@lists.xensource.com Subject: GDB and exec mode on xen One of the major problems I''m facing with connecting to a test kernel through xen is the fact that xen doesn''t seem to pass back an exec mode that gdb can use for different types of architectures (16/32/64bit). I''m wondering, what is the xen community doing in order to work around this issue? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I''m currently running a 64-bit linux kernel and am trying to connect to a 32-bit guest domain through xen, but I keep getting an issue where gdbserver seems to be sign extending a 32bit address into a 64bit one. (gdb) bt #0 0x00002b7ee48a6b03 in map_domain_va (xc_handle=6, cpu=0, guest_va=0xffffffff80107000, perm=1) at xc_ptrace.c:384 #1 0x00002b7ee48a6f79 in xc_ptrace (xc_handle=6, request=PTRACE_PEEKTEXT, domid_tid=0, eaddr=-2146406400, edata=0) at xc_ptrace.c:484 #2 0x0000000000405567 in linux_read_memory (memaddr=-2146406400, myaddr=0x7fffffbc22e0 "", len=Variable "len" is not available. ) at ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:406 #3 0x000000000040437a in read_inferior_memory (memaddr=-2146406400, myaddr=0x7fffffbc22e0 "", len=1) at ../../../gdb-6.2.1/gdb/gdbserver/target.c:64 #4 0x0000000000403a4f in main (argc=4, argv=0x7fffffbc2bb8) at ../../../gdb-6.2.1/gdb/gdbserver/server.c:520 (gdb) f 0 #0 0x00002b7ee48a6b03 in map_domain_va (xc_handle=6, cpu=0, guest_va=0xffffffff80107000, perm=1) at xc_ptrace.c:384 384 page = page_array[va >> PAGE_SHIFT] << PAGE_SHIFT; (gdb) list 379 unsigned long page; 380 381 if ( v != NULL ) 382 munmap(v, PAGE_SIZE); 383 384 page = page_array[va >> PAGE_SHIFT] << PAGE_SHIFT; 385 386 v = xc_map_foreign_range( xc_handle, current_domid, PAGE_SIZE, 387 perm, page >> PAGE_SHIFT); 388 (gdb) p va $1 = 18446744071563145216 (gdb) p/x va $2 = 0xffffffff80107000 How are people debugging 32-bit domains from 64bit dom0? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 5 Jul 2006 13:46:06 -0700, Tan, Nicholas wrote:> [-- multipart/alternative, encoding 7bit, 2 lines --] > > [-- text/plain, encoding quoted-printable, charset: us-ascii, 97 lines --] > > Clarification: > > > > I''m currently running a 64-bit linux kernel and am trying to connect to > a 32-bit guest domain through xen, but I keep getting an issue where > gdbserver seems to be sign extending a 32bit address into a 64bit one.I''d be pretty interested to hear how this can be resolved too, though I suspect that this kind of 32/64bit interface issue is spectacularly painful. For referenece, does debuging 64bit from 64bit work for you? I''ve tested the 32bit from 32bit case myself and that seems ok. -- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel