From: Michal Ludvig <mludvig@suse.cz>
To: gdb-patches@sources.redhat.com
Subject: x86-64-tdep.h cleanup
Date: Tue, 05 Mar 2002 07:56:00 -0000 [thread overview]
Message-ID: <3C84EAA8.2000900@suse.cz> (raw)
[-- Attachment #1: Type: text/plain, Size: 3238 bytes --]
As it was recommended by lots of people here I moved <sys/reg.h> along
with regmap from x86-64-tdep.h to x86-64-linux-nat.c.
Also to let x86-64-tdep.h contain only #defines, I moved declarations of
x86_64_linux_frame_saved_pc and x86_64_linux_saved_pc_after_call to
x86-64-tdep.c. Are these changes OK to commit?
Michal Ludvig
Index: ChangeLog
from Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.h (sys/reg.h, x86_64_regmap): Moved to x86-64-linux-nat.c
(x86_64_linux_frame_saved_pc,
x86_64_linux_saved_pc_after_call): Moved to x86-64-tdep.c
* x86-64-linux-nat.c (sys/reg.h, x86_64_regmap): Moved here
from x86-64-tdep.h
* x86-64-tdep.c (x86_64_linux_frame_saved_pc,
x86_64_linux_saved_pc_after_call): Moved here from x86-64-tdep.h
Index: x86-64-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 x86-64-tdep.h
*** x86-64-tdep.h 2001/09/21 12:19:15 1.1
--- x86-64-tdep.h 2002/03/05 15:03:37
***************
*** 24,49 ****
#define X86_64_TDEP_H
#include "i386-tdep.h"
- #include <sys/reg.h>
- /* Mapping between the general-purpose registers in `struct user'
- format and GDB's register array layout. */
-
- static int x86_64_regmap[] = {
- RAX, RDX, RCX, RBX,
- RSI, RDI, RBP, RSP,
- R8, R9, R10, R11,
- R12, R13, R14, R15,
- RIP, EFLAGS
- };
-
/* Number of all registers */
#define X86_64_NUM_REGS (51)
/* Number of general registers. */
#define X86_64_NUM_GREGS (18)
-
- gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
- gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
#endif
--- 24,34 ----
Index: x86-64-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-linux-nat.c,v
retrieving revision 1.5
diff -c -3 -p -r1.5 x86-64-linux-nat.c
*** x86-64-linux-nat.c 2002/02/24 22:14:33 1.5
--- x86-64-linux-nat.c 2002/03/05 15:03:37
***************
*** 33,39 ****
--- 33,51 ----
#include <sys/debugreg.h>
#include <sys/syscall.h>
#include <sys/procfs.h>
+ #include <sys/reg.h>
+ /* Mapping between the general-purpose registers in `struct user'
+ format and GDB's register array layout. */
+
+ static int x86_64_regmap[] = {
+ RAX, RDX, RCX, RBX,
+ RSI, RDI, RBP, RSP,
+ R8, R9, R10, R11,
+ R12, R13, R14, R15,
+ RIP, EFLAGS
+ };
+
static unsigned long
x86_64_linux_dr_get (int regnum)
{
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.10
diff -c -3 -p -r1.10 x86-64-tdep.c
*** x86-64-tdep.c 2002/03/04 11:08:28 1.10
--- x86-64-tdep.c 2002/03/05 15:03:37
*************** int x86_64_register_raw_size_table[X86_6
*** 59,64 ****
--- 59,69 ----
4
};
+ /* Prototypes of some functions from x86-64-linux-tdep.c */
+
+ gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
+ gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
+
/* Number of bytes of storage in the actual machine representation for
register REGNO. */
int
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz
[-- Attachment #2: x8664-01.diff --]
[-- Type: text/plain, Size: 2405 bytes --]
Index: x86-64-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 x86-64-tdep.h
*** x86-64-tdep.h 2001/09/21 12:19:15 1.1
--- x86-64-tdep.h 2002/03/05 15:03:37
***************
*** 24,49 ****
#define X86_64_TDEP_H
#include "i386-tdep.h"
- #include <sys/reg.h>
- /* Mapping between the general-purpose registers in `struct user'
- format and GDB's register array layout. */
-
- static int x86_64_regmap[] = {
- RAX, RDX, RCX, RBX,
- RSI, RDI, RBP, RSP,
- R8, R9, R10, R11,
- R12, R13, R14, R15,
- RIP, EFLAGS
- };
-
/* Number of all registers */
#define X86_64_NUM_REGS (51)
/* Number of general registers. */
#define X86_64_NUM_GREGS (18)
-
- gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
- gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
#endif
--- 24,34 ----
Index: x86-64-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-linux-nat.c,v
retrieving revision 1.5
diff -c -3 -p -r1.5 x86-64-linux-nat.c
*** x86-64-linux-nat.c 2002/02/24 22:14:33 1.5
--- x86-64-linux-nat.c 2002/03/05 15:03:37
***************
*** 33,39 ****
--- 33,51 ----
#include <sys/debugreg.h>
#include <sys/syscall.h>
#include <sys/procfs.h>
+ #include <sys/reg.h>
+ /* Mapping between the general-purpose registers in `struct user'
+ format and GDB's register array layout. */
+
+ static int x86_64_regmap[] = {
+ RAX, RDX, RCX, RBX,
+ RSI, RDI, RBP, RSP,
+ R8, R9, R10, R11,
+ R12, R13, R14, R15,
+ RIP, EFLAGS
+ };
+
static unsigned long
x86_64_linux_dr_get (int regnum)
{
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.10
diff -c -3 -p -r1.10 x86-64-tdep.c
*** x86-64-tdep.c 2002/03/04 11:08:28 1.10
--- x86-64-tdep.c 2002/03/05 15:03:37
*************** int x86_64_register_raw_size_table[X86_6
*** 59,64 ****
--- 59,69 ----
4
};
+ /* Prototypes of some functions from x86-64-linux-tdep.c */
+
+ gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
+ gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
+
/* Number of bytes of storage in the actual machine representation for
register REGNO. */
int
next reply other threads:[~2002-03-05 15:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-05 7:56 Michal Ludvig [this message]
2002-03-05 8:30 ` Kevin Buettner
2002-03-05 23:53 ` Andreas Jaeger
2002-03-06 2:00 ` Michal Ludvig
2002-03-06 9:30 ` Kevin Buettner
2002-03-07 5:30 ` [patch] " Michal Ludvig
2002-03-06 3:09 ` Andreas Schwab
2002-03-06 8:46 ` [RFA] " Michal Ludvig
2002-03-06 9:24 ` Andreas Schwab
2002-03-06 9:35 ` Kevin Buettner
2002-03-06 10:26 ` Andrew Cagney
2002-03-06 11:02 ` Kevin Buettner
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=3C84EAA8.2000900@suse.cz \
--to=mludvig@suse.cz \
--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