aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/proc-service.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-03-15 16:13:29 +0000
committerDaniel Jacobowitz <drow@false.org>2006-03-15 16:13:29 +0000
commit0050a760a7646cdfb63a4c693fca974459776909 (patch)
tree4439ca24fa84359aaec84a4c4c65b2239a4805e7 /gdb/gdbserver/proc-service.c
parentdc60ece87d8448b8d6f37411daefabbd830c20d5 (diff)
downloadgdb-0050a760a7646cdfb63a4c693fca974459776909.zip
gdb-0050a760a7646cdfb63a4c693fca974459776909.tar.gz
gdb-0050a760a7646cdfb63a4c693fca974459776909.tar.bz2
* configure.ac: Remove checks for prfpregset_t.
* gdb_proc_service.h: New file. * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the new "gdb_proc_service.h". * proc-service.c: Likewise. (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t. (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument. * Makefile.in (gdb_proc_service_h): Updated. * configure, config.in: Regenerated.
Diffstat (limited to 'gdb/gdbserver/proc-service.c')
-rw-r--r--gdb/gdbserver/proc-service.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/gdb/gdbserver/proc-service.c b/gdb/gdbserver/proc-service.c
index a64919e..99083f1 100644
--- a/gdb/gdbserver/proc-service.c
+++ b/gdb/gdbserver/proc-service.c
@@ -1,5 +1,5 @@
/* libthread_db helper functions for the remote server for GDB.
- Copyright (C) 2002, 2004, 2005
+ Copyright (C) 2002, 2004, 2005, 2006
Free Software Foundation, Inc.
Contributed by MontaVista Software.
@@ -29,19 +29,7 @@
#include "linux-low.h"
-/* Correct for all GNU/Linux targets (for quite some time). */
-#define GDB_GREGSET_T elf_gregset_t
-#define GDB_FPREGSET_T elf_fpregset_t
-
-#ifndef HAVE_ELF_FPREGSET_T
-/* Make sure we have said types. Not all platforms bring in <linux/elf.h>
- via <sys/procfs.h>. */
-#ifdef HAVE_LINUX_ELF_H
-#include <linux/elf.h>
-#endif
-#endif
-
-#include "../gdb_proc_service.h"
+#include "gdb_proc_service.h"
typedef struct ps_prochandle *gdb_ps_prochandle_t;
typedef void *gdb_ps_read_buf_t;
@@ -75,14 +63,14 @@ gregset_info(void)
ps_err_e
ps_pglobal_lookup (gdb_ps_prochandle_t ph, const char *obj,
- const char *name, paddr_t *sym_addr)
+ const char *name, psaddr_t *sym_addr)
{
CORE_ADDR addr;
if (look_up_one_symbol (name, &addr) == 0)
return PS_NOSYM;
- *sym_addr = (paddr_t) (unsigned long) addr;
+ *sym_addr = (psaddr_t) (unsigned long) addr;
return PS_OK;
}
@@ -90,20 +78,20 @@ ps_pglobal_lookup (gdb_ps_prochandle_t ph, const char *obj,
them into BUF. */
ps_err_e
-ps_pdread (gdb_ps_prochandle_t ph, paddr_t addr,
+ps_pdread (gdb_ps_prochandle_t ph, psaddr_t addr,
gdb_ps_read_buf_t buf, gdb_ps_size_t size)
{
- read_inferior_memory (addr, buf, size);
+ read_inferior_memory ((unsigned long) addr, buf, size);
return PS_OK;
}
/* Write SIZE bytes from BUF into the target process PH at address ADDR. */
ps_err_e
-ps_pdwrite (gdb_ps_prochandle_t ph, paddr_t addr,
+ps_pdwrite (gdb_ps_prochandle_t ph, psaddr_t addr,
gdb_ps_write_buf_t buf, gdb_ps_size_t size)
{
- return write_inferior_memory (addr, buf, size);
+ return write_inferior_memory ((unsigned long) addr, buf, size);
}
/* Get the general registers of LWP LWPID within the target process PH
@@ -149,8 +137,7 @@ ps_lsetregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, const prgregset_t gregset)
process PH and store them in FPREGSET. */
ps_err_e
-ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
- gdb_prfpregset_t *fpregset)
+ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, void *fpregset)
{
/* Unneeded. */
return PS_ERR;
@@ -160,8 +147,7 @@ ps_lgetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
process PH from FPREGSET. */
ps_err_e
-ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid,
- const gdb_prfpregset_t *fpregset)
+ps_lsetfpregs (gdb_ps_prochandle_t ph, lwpid_t lwpid, void *fpregset)
{
/* Unneeded. */
return PS_ERR;