diff options
author | Pedro Alves <palves@redhat.com> | 2015-02-09 14:59:09 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-02-27 17:28:11 +0000 |
commit | 749bab0110ddc56835bfe70765675577e3dea05a (patch) | |
tree | b33ffdff1ecf9880effae6d13699de5b2243c957 /gdb/gdb_proc_service.h | |
parent | 3c14e5a39bb4fddd911ba49483c44a12294ae6ef (diff) | |
download | gdb-749bab0110ddc56835bfe70765675577e3dea05a.zip gdb-749bab0110ddc56835bfe70765675577e3dea05a.tar.gz gdb-749bab0110ddc56835bfe70765675577e3dea05a.tar.bz2 |
proc-service, extern "C"
libthread_db.so calls symbols in the client (GDB), through the
proc-service interface. These routines must have extern "C" linkage
so their symbol names are not mangled when GDB is built as a C++
program. On the GDBserver side, we were missing fallback declarations for
all these symbols.
gdb/ChangeLog:
2015-02-27 Pedro Alves <palves@redhat.com>
* gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
gdb/gdbserver/ChangeLog:
2015-02-27 Pedro Alves <palves@redhat.com>
* gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
[!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
[!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
(ps_lsetfpregs, ps_getpid)
(ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
(ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
(ps_lsetxregs, ps_plog): Declare.
Diffstat (limited to 'gdb/gdb_proc_service.h')
-rw-r--r-- | gdb/gdb_proc_service.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/gdb_proc_service.h b/gdb/gdb_proc_service.h index 2c633b3..e736991 100644 --- a/gdb/gdb_proc_service.h +++ b/gdb/gdb_proc_service.h @@ -22,8 +22,15 @@ #include <sys/types.h> #ifdef HAVE_PROC_SERVICE_H + +/* glibc's proc_service.h doesn't wrap itself with extern "C". Need + to do it ourselves. */ +EXTERN_C_PUSH + #include <proc_service.h> +EXTERN_C_POP + #else /* HAVE_PROC_SERVICE_H */ /* The following fallback definitions have been imported and adjusted @@ -55,6 +62,8 @@ #include "gregset.h" +EXTERN_C_PUSH + /* Functions in this interface return one of these status codes. */ typedef enum { @@ -150,6 +159,8 @@ extern ps_err_e ps_lsetxregs (struct ps_prochandle *ph, lwpid_t lwpid, /* Log a message (sends to gdb_stderr). */ extern void ps_plog (const char *fmt, ...); +EXTERN_C_POP + #endif /* HAVE_PROC_SERVICE_H */ /* Fix-up some broken systems. */ |