From: Michal Ludvig <mludvig@suse.cz>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] x86-64 segment registers handling
Date: Tue, 26 Mar 2002 10:27:00 -0000 [thread overview]
Message-ID: <3CA0BD78.4070608@suse.cz> (raw)
In-Reply-To: <20020326131355.A25917@nevyn.them.org>
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
Daniel Jacobowitz wrote:
> Can you update gdbserver/linux-x86-64-low.c with these changes, please?
>
> Also, it appears that you changed the layout of GDB's register cache
> for x86-64. At this time that means you also changed the remote
> protocol. regformats/reg-x86-64.dat also needs to be updated.
Patch appended. Are these changes enough? Can I commit?
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz
[-- Attachment #2: x8664-06.diff --]
[-- Type: text/plain, Size: 1932 bytes --]
Index: gdbserver/linux-x86-64-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-x86-64-low.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 linux-x86-64-low.c
*** linux-x86-64-low.c 2002/03/04 16:28:35 1.2
--- linux-x86-64-low.c 2002/03/26 18:25:09
***************
*** 28,39 ****
#include <sys/procfs.h>
#include <sys/ptrace.h>
! static int regmap[] = {
RAX, RDX, RCX, RBX,
RSI, RDI, RBP, RSP,
R8, R9, R10, R11,
R12, R13, R14, R15,
! RIP, EFLAGS
};
static void
--- 28,42 ----
#include <sys/procfs.h>
#include <sys/ptrace.h>
! #define X86_64_NUM_GREGS 22
!
! static int regmap[X86_64_NUM_GREGS] = {
RAX, RDX, RCX, RBX,
RSI, RDI, RBP, RSP,
R8, R9, R10, R11,
R12, R13, R14, R15,
! RIP, EFLAGS,
! DS, ES, FS, GS
};
static void
*************** x86_64_fill_gregset (void *buf)
*** 41,47 ****
{
int i;
! for (i = 0; i < 18; i++)
collect_register (i, ((char *) buf) + regmap[i]);
}
--- 44,50 ----
{
int i;
! for (i = 0; i < X86_64_NUM_GREGS; i++)
collect_register (i, ((char *) buf) + regmap[i]);
}
*************** x86_64_store_gregset (void *buf)
*** 50,56 ****
{
int i;
! for (i = 0; i < 18; i++)
supply_register (i, ((char *) buf) + regmap[i]);
}
--- 53,59 ----
{
int i;
! for (i = 0; i < X86_64_NUM_GREGS; i++)
supply_register (i, ((char *) buf) + regmap[i]);
}
Index: regformats/reg-x86-64.dat
===================================================================
RCS file: /cvs/src/src/gdb/regformats/reg-x86-64.dat,v
retrieving revision 1.1
diff -c -3 -p -r1.1 reg-x86-64.dat
*** reg-x86-64.dat 2002/02/27 07:07:49 1.1
--- reg-x86-64.dat 2002/03/26 18:25:09
*************** expedite:rbp,rsp,rip
*** 18,23 ****
--- 18,27 ----
64:r15
64:rip
32:eflags
+ 32:ds
+ 32:es
+ 32:fs
+ 32:gs
80:st0
80:st1
80:st2
next prev parent reply other threads:[~2002-03-26 18:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-26 9:26 Michal Ludvig
2002-03-26 10:00 ` Andrew Cagney
2002-03-26 10:09 ` Michal Ludvig
2002-03-27 4:18 ` Michal Ludvig
2002-03-27 6:23 ` Andrew Cagney
2002-03-26 10:14 ` Daniel Jacobowitz
2002-03-26 10:27 ` Michal Ludvig [this message]
2002-03-26 10:35 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CA0BD78.4070608@suse.cz \
--to=mludvig@suse.cz \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox