Skip to content
Snippets Groups Projects
Commit 4252dc94 authored by Mark Kettenis's avatar Mark Kettenis
Browse files

* i386-linux-tdep.c (linux_sigtramp_code, linux_rt_sigtramp_code):

Change type to `static const gdb_byte'.
(i386_linux_sigtramp_start, i386_linux_rt_sigtramp_start)
(i386_linux_sigcontext_addr): Use gdb_byte for buf.
* amd64-linux-tdep.c (linux_sigtramp_code): Change type to `static
const gdb_byte'.
(amd64_linux_sigtramp_start, amd64_linux_sigcontext_addr): Use
gdb_byte for buf.
* amd64fbsd-tdep.c (amd64fbsd_supply_uthread)
(amd64fbsd_collect_uthread): Use gdb_byte for buf.
parent d46bfb5c
No related branches found
No related tags found
No related merge requests found
2005-05-08 Mark Kettenis <kettenis@gnu.org> 2005-05-08 Mark Kettenis <kettenis@gnu.org>
* i386-linux-tdep.c (linux_sigtramp_code, linux_rt_sigtramp_code):
Change type to `static const gdb_byte'.
(i386_linux_sigtramp_start, i386_linux_rt_sigtramp_start)
(i386_linux_sigcontext_addr): Use gdb_byte for buf.
* amd64-linux-tdep.c (linux_sigtramp_code): Change type to `static
const gdb_byte'.
(amd64_linux_sigtramp_start, amd64_linux_sigcontext_addr): Use
gdb_byte for buf.
* amd64fbsd-tdep.c (amd64fbsd_supply_uthread)
(amd64fbsd_collect_uthread): Use gdb_byte for buf.
* config/ia64/nm-aix.h: Remove file. * config/ia64/nm-aix.h: Remove file.
* amd64-tdep.c (amd64_return_value): Use `gdb_byte *' in casts. * amd64-tdep.c (amd64_return_value): Use `gdb_byte *' in casts.
......
...@@ -72,7 +72,7 @@ static int amd64_linux_gregset_reg_offset[] = ...@@ -72,7 +72,7 @@ static int amd64_linux_gregset_reg_offset[] =
#define LINUX_SIGTRAMP_INSN1 0x0f /* syscall */ #define LINUX_SIGTRAMP_INSN1 0x0f /* syscall */
#define LINUX_SIGTRAMP_OFFSET1 7 #define LINUX_SIGTRAMP_OFFSET1 7
static const unsigned char linux_sigtramp_code[] = static const gdb_byte linux_sigtramp_code[] =
{ {
/* mov $__NR_rt_sigreturn, %rax */ /* mov $__NR_rt_sigreturn, %rax */
LINUX_SIGTRAMP_INSN0, 0xc7, 0xc0, 0x0f, 0x00, 0x00, 0x00, LINUX_SIGTRAMP_INSN0, 0xc7, 0xc0, 0x0f, 0x00, 0x00, 0x00,
...@@ -89,7 +89,7 @@ static CORE_ADDR ...@@ -89,7 +89,7 @@ static CORE_ADDR
amd64_linux_sigtramp_start (struct frame_info *next_frame) amd64_linux_sigtramp_start (struct frame_info *next_frame)
{ {
CORE_ADDR pc = frame_pc_unwind (next_frame); CORE_ADDR pc = frame_pc_unwind (next_frame);
unsigned char buf[LINUX_SIGTRAMP_LEN]; gdb_byte buf[LINUX_SIGTRAMP_LEN];
/* We only recognize a signal trampoline if PC is at the start of /* We only recognize a signal trampoline if PC is at the start of
one of the two instructions. We optimize for finding the PC at one of the two instructions. We optimize for finding the PC at
...@@ -150,7 +150,7 @@ static CORE_ADDR ...@@ -150,7 +150,7 @@ static CORE_ADDR
amd64_linux_sigcontext_addr (struct frame_info *next_frame) amd64_linux_sigcontext_addr (struct frame_info *next_frame)
{ {
CORE_ADDR sp; CORE_ADDR sp;
char buf[8]; gdb_byte buf[8];
frame_unwind_register (next_frame, SP_REGNUM, buf); frame_unwind_register (next_frame, SP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 8); sp = extract_unsigned_integer (buf, 8);
......
...@@ -146,7 +146,7 @@ static void ...@@ -146,7 +146,7 @@ static void
amd64fbsd_supply_uthread (struct regcache *regcache, amd64fbsd_supply_uthread (struct regcache *regcache,
int regnum, CORE_ADDR addr) int regnum, CORE_ADDR addr)
{ {
char buf[8]; gdb_byte buf[8];
int i; int i;
gdb_assert (regnum >= -1); gdb_assert (regnum >= -1);
...@@ -166,7 +166,7 @@ static void ...@@ -166,7 +166,7 @@ static void
amd64fbsd_collect_uthread (const struct regcache *regcache, amd64fbsd_collect_uthread (const struct regcache *regcache,
int regnum, CORE_ADDR addr) int regnum, CORE_ADDR addr)
{ {
char buf[8]; gdb_byte buf[8];
int i; int i;
gdb_assert (regnum >= -1); gdb_assert (regnum >= -1);
......
/* Target-dependent code for GNU/Linux i386. /* Target-dependent code for GNU/Linux i386.
Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Copyright 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GDB. This file is part of GDB.
...@@ -106,7 +107,7 @@ i386_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum, ...@@ -106,7 +107,7 @@ i386_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
#define LINUX_SIGTRAMP_INSN2 0xcd /* int */ #define LINUX_SIGTRAMP_INSN2 0xcd /* int */
#define LINUX_SIGTRAMP_OFFSET2 6 #define LINUX_SIGTRAMP_OFFSET2 6
static const unsigned char linux_sigtramp_code[] = static const gdb_byte linux_sigtramp_code[] =
{ {
LINUX_SIGTRAMP_INSN0, /* pop %eax */ LINUX_SIGTRAMP_INSN0, /* pop %eax */
LINUX_SIGTRAMP_INSN1, 0x77, 0x00, 0x00, 0x00, /* mov $0x77, %eax */ LINUX_SIGTRAMP_INSN1, 0x77, 0x00, 0x00, 0x00, /* mov $0x77, %eax */
...@@ -122,7 +123,7 @@ static CORE_ADDR ...@@ -122,7 +123,7 @@ static CORE_ADDR
i386_linux_sigtramp_start (struct frame_info *next_frame) i386_linux_sigtramp_start (struct frame_info *next_frame)
{ {
CORE_ADDR pc = frame_pc_unwind (next_frame); CORE_ADDR pc = frame_pc_unwind (next_frame);
unsigned char buf[LINUX_SIGTRAMP_LEN]; gdb_byte buf[LINUX_SIGTRAMP_LEN];
/* We only recognize a signal trampoline if PC is at the start of /* We only recognize a signal trampoline if PC is at the start of
one of the three instructions. We optimize for finding the PC at one of the three instructions. We optimize for finding the PC at
...@@ -175,7 +176,7 @@ i386_linux_sigtramp_start (struct frame_info *next_frame) ...@@ -175,7 +176,7 @@ i386_linux_sigtramp_start (struct frame_info *next_frame)
#define LINUX_RT_SIGTRAMP_INSN1 0xcd /* int */ #define LINUX_RT_SIGTRAMP_INSN1 0xcd /* int */
#define LINUX_RT_SIGTRAMP_OFFSET1 5 #define LINUX_RT_SIGTRAMP_OFFSET1 5
static const unsigned char linux_rt_sigtramp_code[] = static const gdb_byte linux_rt_sigtramp_code[] =
{ {
LINUX_RT_SIGTRAMP_INSN0, 0xad, 0x00, 0x00, 0x00, /* mov $0xad, %eax */ LINUX_RT_SIGTRAMP_INSN0, 0xad, 0x00, 0x00, 0x00, /* mov $0xad, %eax */
LINUX_RT_SIGTRAMP_INSN1, 0x80 /* int $0x80 */ LINUX_RT_SIGTRAMP_INSN1, 0x80 /* int $0x80 */
...@@ -190,7 +191,7 @@ static CORE_ADDR ...@@ -190,7 +191,7 @@ static CORE_ADDR
i386_linux_rt_sigtramp_start (struct frame_info *next_frame) i386_linux_rt_sigtramp_start (struct frame_info *next_frame)
{ {
CORE_ADDR pc = frame_pc_unwind (next_frame); CORE_ADDR pc = frame_pc_unwind (next_frame);
unsigned char buf[LINUX_RT_SIGTRAMP_LEN]; gdb_byte buf[LINUX_RT_SIGTRAMP_LEN];
/* We only recognize a signal trampoline if PC is at the start of /* We only recognize a signal trampoline if PC is at the start of
one of the two instructions. We optimize for finding the PC at one of the two instructions. We optimize for finding the PC at
...@@ -276,7 +277,7 @@ i386_linux_sigcontext_addr (struct frame_info *next_frame) ...@@ -276,7 +277,7 @@ i386_linux_sigcontext_addr (struct frame_info *next_frame)
{ {
CORE_ADDR pc; CORE_ADDR pc;
CORE_ADDR sp; CORE_ADDR sp;
char buf[4]; gdb_byte buf[4];
frame_unwind_register (next_frame, I386_ESP_REGNUM, buf); frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
sp = extract_unsigned_integer (buf, 4); sp = extract_unsigned_integer (buf, 4);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment