WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] RE: GDB and exec mode on xen

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: GDB and exec mode on xen
From: "Tan, Nicholas" <Nicholas.Tan@xxxxxxxxxx>
Date: Wed, 5 Jul 2006 13:46:06 -0700
Delivery-date: Thu, 06 Jul 2006 02:14:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcagWjbcHshLfFqrSfuPeSPcfVaUAwAGS8KQ
Thread-topic: GDB and exec mode on xen

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@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>