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] GDB and exec mode on xen

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] GDB and exec mode on xen
From: "Tan, Nicholas" <Nicholas.Tan@xxxxxxxxxx>
Date: Wed, 5 Jul 2006 14:30:24 -0700
Delivery-date: Thu, 06 Jul 2006 02:15:34 -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: Acagejnks7skYUfiQjOjEs0Skt2HAQ==
Thread-topic: [Xen-devel] GDB and exec mode on xen

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