This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Missing file in glibc-2.1.3pre3


>>>>> Andreas Jaeger writes:

 > The tar archive for 2.1.3pre3 seems to be missing a file.  I've
 > prepared a patch to fix this.

 > If you test glibc 2.1.3pre3 please save the appended file as
 > linuxthreads_db/thread_dbP.h - and please tell us if 2.1.3pre3 works.
 > I'd be glad to hear "it works for me with Linux 2.3.40 on Sparc32 with
 > gcc 2.95.2 (or whatever versions you use)" as well as reports about
 > problems.

There seem to be two more files missing.  This means that
linuxthreads_db/thread_dbP.h, linuxthreads_db/shlib-versions and
linuxthreads_db/proc_service.h are missing:-(.  I'm appending all of
them below as a patch file. Just save the patch file and run patch <
patchfile in your glibc source directory.

I'm looking forward to your feedback - my feedback so far is: I'm
continuing to build ;-) it on i686 Linux 2.2.14 with gcc 2.95.2

Andreas


============================================================
Index: linuxthreads_db/proc_service.h
--- linuxthreads_db/proc_service.h	created
+++ linuxthreads_db/proc_service.h	Thu Dec  2 09:16:03 1999	1.1
@@ -0,0 +1,70 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* The definitions in this file must correspond to those in the debugger.  */
+#include <sys/procfs.h>
+
+typedef enum
+{
+  PS_OK,          /* generic "call succeeded" */
+  PS_ERR,         /* generic. */
+  PS_BADPID,      /* bad process handle */
+  PS_BADLID,      /* bad lwp identifier */
+  PS_BADADDR,     /* bad address */
+  PS_NOSYM,       /* p_lookup() could not find given symbol */
+        PS_NOFREGS
+  /*
+   * FPU register set not available for given
+   * lwp
+   */
+}       ps_err_e;
+
+
+struct ps_prochandle;		/* user defined. */
+
+
+extern ps_err_e ps_pdread(struct ps_prochandle *,
+                        psaddr_t, void *, size_t);
+extern ps_err_e ps_pdwrite(struct ps_prochandle *,
+                        psaddr_t, const void *, size_t);
+extern ps_err_e ps_ptread(struct ps_prochandle *,
+                        psaddr_t, void *, size_t);
+extern ps_err_e ps_ptwrite(struct ps_prochandle *,
+                        psaddr_t, const void *, size_t);
+
+extern ps_err_e ps_pglobal_lookup(struct ps_prochandle *,
+        const char *object_name, const char *sym_name, psaddr_t *sym_addr);
+
+
+extern ps_err_e ps_lgetregs(struct ps_prochandle *,
+                        lwpid_t, prgregset_t);
+extern ps_err_e ps_lsetregs(struct ps_prochandle *,
+                        lwpid_t, const prgregset_t);
+extern ps_err_e ps_lgetfpregs(struct ps_prochandle *,
+                        lwpid_t, prfpregset_t *);
+extern ps_err_e ps_lsetfpregs(struct ps_prochandle *,
+                        lwpid_t, const prfpregset_t *);
+
+extern pid_t ps_getpid (struct ps_prochandle *);
+
+
+extern ps_err_e ps_pstop (const struct ps_prochandle *);
+extern ps_err_e ps_pcontinue (const struct ps_prochandle *);
+
+extern ps_err_e ps_lstop (const struct ps_prochandle *, lwpid_t);
+extern ps_err_e ps_lcontinue (const struct ps_prochandle *, lwpid_t);
============================================================
Index: linuxthreads_db/thread_dbP.h
--- linuxthreads_db/thread_dbP.h	created
+++ linuxthreads_db/thread_dbP.h	Tue Nov 23 06:54:11 1999	1.1
@@ -0,0 +1,83 @@
+/* Private header for thread debug library.  */
+#ifndef _THREAD_DBP_H
+#define _THREAD_DBP_H	1
+
+#include <string.h>
+#include "proc_service.h"
+#include "thread_db.h"
+#include "../linuxthreads/internals.h"
+
+
+/* Comment out the following for less verbose output.  */
+#ifndef NDEBUG
+# define LOG(c) if (__td_debug) __libc_write (2, c "\n", strlen (c "\n"))
+extern int __td_debug;
+#else
+# define LOG(c)
+#endif
+
+
+/* Handle for a process.  This type is opaque.  */
+struct td_thragent
+{
+  /* Delivered by the debugger and we have to pass it back in the
+     proc callbacks.  */
+  struct ps_prochandle *ph;
+
+  /* Some cached information.  */
+
+  /* Address of the `__pthread_handles' array.  */
+  struct pthread_handle_struct *handles;
+
+  /* Address of the `pthread_kyes' array.  */
+  struct pthread_key_struct *keys;
+
+  /* Maximum number of threads.  */
+  int pthread_threads_max;
+
+  /* Maximum number of thread-local data keys.  */
+  int pthread_keys_max;
+
+  /* Size of 2nd level array for thread-local data keys.  */
+  int pthread_key_2ndlevel_size;
+
+  /* Sizeof struct _pthread_descr_struct.  */
+  int sizeof_descr;
+
+  /* Pointer to the `__pthread_threads_events' variable in the target.  */
+  psaddr_t pthread_threads_eventsp;
+
+  /* Pointer to the `__pthread_last_event' variable in the target.  */
+  psaddr_t pthread_last_event;
+
+  /* Pointer to the `__pthread_handles_num' variable.  */
+  psaddr_t pthread_handles_num;
+};
+
+
+/* Type used internally to keep track of thread agent descriptors.  */
+struct agent_list
+{
+  td_thragent_t *ta;
+  struct agent_list *next;
+};
+
+/* List of all known descriptors.  */
+extern struct agent_list *__td_agent_list;
+
+/* Function used to test for correct thread agent pointer.  */
+static inline int
+ta_ok (const td_thragent_t *ta)
+{
+  struct agent_list *runp = __td_agent_list;
+
+  if (ta == NULL)
+    return 0;
+
+  while (runp != NULL && runp->ta != ta)
+    runp = runp->next;
+
+  return runp != NULL;
+}
+
+#endif /* thread_dbP.h */
============================================================
Index: linuxthreads_db/shlib-versions
--- linuxthreads_db/shlib-versions	created
+++ linuxthreads_db/shlib-versions	Wed Nov 10 06:05:07 1999	1.1
@@ -0,0 +1,2 @@
+# The thread debug library
+.*-.*-linux.*		libthread_db=1


-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]