From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27661 invoked by alias); 21 Feb 2004 23:46:01 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27652 invoked from network); 21 Feb 2004 23:45:59 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 21 Feb 2004 23:45:59 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i1LNjwJc000651 for ; Sun, 22 Feb 2004 00:45:58 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i1LNjwtR018832 for ; Sun, 22 Feb 2004 00:45:58 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i1LNjwBf018829; Sun, 22 Feb 2004 00:45:58 +0100 (CET) Date: Sat, 21 Feb 2004 23:46:00 -0000 Message-Id: <200402212345.i1LNjwBf018829@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH] Fix Linux x86-64-to-i386 register mapping X-SW-Source: 2004-02/txt/msg00589.txt.bz2 For some reason, the mapping wasn't quite right. Now almost all tests except the thread tests pass on my version of SuSE Linux when running the testsuite with -m32. Committed, Mark Index: ChangeLog from Mark Kettenis * x86-64-linux-nat.c (x86_64_linux_gregset32_reg_offset): Use symbolic constants from instead of hard-coded numbers. Index: x86-64-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-linux-nat.c,v retrieving revision 1.31 diff -u -p -r1.31 x86-64-linux-nat.c --- x86-64-linux-nat.c 10 Jan 2004 12:52:41 -0000 1.31 +++ x86-64-linux-nat.c 21 Feb 2004 23:41:23 -0000 @@ -83,18 +83,18 @@ static int x86_64_linux_gregset64_reg_of /* From on GNU/Linux i386. */ static int x86_64_linux_gregset32_reg_offset[] = { - 10 * 8, 11 * 8, /* %eax, %ecx */ - 12 * 8, 13 * 8, /* %edx, %ebx */ - 19 * 8, 4 * 8, /* %esp, %ebp */ - 13 * 8, 14 * 8, /* %esi, %edi */ - 16 * 8, 18 * 8, /* %eip, %eflags */ - 17 * 8, 20 * 8, /* %cs, %ss */ - 23 * 8, 24 * 8, /* %ds, %es */ - 25 * 4, 26 * 4, /* %fs, %gs */ + RAX * 8, RCX * 8, /* %eax, %ecx */ + RDX * 8, RBX * 8, /* %edx, %ebx */ + RSP * 8, RBP * 8, /* %esp, %ebp */ + RSI * 8, RDI * 8, /* %esi, %edi */ + RIP * 8, EFLAGS * 8, /* %eip, %eflags */ + CS * 8, SS * 8, /* %cs, %ss */ + DS * 8, ES * 8, /* %ds, %es */ + FS * 8, GS * 8, /* %fs, %gs */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 15 * 8 /* "orig_eax" */ + ORIG_RAX * 8 /* "orig_eax" */ }; /* Which ptrace request retrieves which registers?