This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

[PATCH RFA] uw-thread.c to_xfer_memory() patches


The patches below are needed to make GDB build again on a Unixware 7
box.

Unfortunately, GDB still doesn't work even with these patches in
place, but that is another problem...  it's in solib-svr4.c; I posted
a patch for the solib problem a while back, but it met with some
resistance.  I'll take another look at the problem and try to come up
with a better solution.

Anyway, I think I need one of the Unixware maintainers (either Nick or
Robert) to approve this patch.  (Though I suppose I could check it in
under the "obvious fix" rule.)

Okay to commit?

	* uw-thread.c (read_thr_debug, read_map, read_lwp, thread_iter)
	(libthread_stub, libthread_init): Pass NULL for the mem_attrib
	argument in the to_xfer_memory calls.

Index: uw-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/uw-thread.c,v
retrieving revision 1.5
diff -u -p -r1.5 uw-thread.c
--- uw-thread.c	2001/03/01 01:39:22	1.5
+++ uw-thread.c	2001/03/15 07:40:20
@@ -324,7 +324,7 @@ static int
 read_thr_debug (struct thread_debug *debugp)
 {
   return base_ops.to_xfer_memory (thr_debug_addr, (char *)debugp,
-				  sizeof (*debugp), 0, &base_ops);
+				  sizeof (*debugp), 0, NULL, &base_ops);
 }
 
 /* Read into MAP the contents of the thread map at inferior process address
@@ -334,7 +334,7 @@ static int
 read_map (CORE_ADDR mapp, struct thread_map *map)
 {
   return base_ops.to_xfer_memory ((CORE_ADDR)THR_MAP (mapp), (char *)map,
-				  sizeof (*map), 0, &base_ops);
+				  sizeof (*map), 0, NULL, &base_ops);
 }
 
 /* Read into LWP the contents of the lwp decriptor at inferior process address
@@ -344,7 +344,7 @@ static int
 read_lwp (CORE_ADDR lwpp, __lwp_desc_t *lwp)
 {
   return base_ops.to_xfer_memory (lwpp, (char *)lwp,
-				  sizeof (*lwp), 0, &base_ops);
+				  sizeof (*lwp), 0, NULL, &base_ops);
 }
 
 /* Iterate through all user threads, applying FUNC(<map>, <lwp>, DATA) until
@@ -367,7 +367,7 @@ thread_iter (int (*func)(iter_t *, void 
   if (!read_thr_debug (&debug))
     return 0;
   if (!base_ops.to_xfer_memory ((CORE_ADDR)debug.thr_map, (char *)&mapp,
-				sizeof (mapp), 0, &base_ops))
+				sizeof (mapp), 0, NULL, &base_ops))
     return 0;
   if (!mapp)
     return 0;
@@ -619,10 +619,10 @@ libthread_stub (int pid)
   /* Retrieve stub args. */
   sp = read_register_pid (SP_REGNUM, pid);
   if (!base_ops.to_xfer_memory (sp + SP_ARG0, (char *)&mapp,
-				sizeof (mapp), 0, &base_ops))
+				sizeof (mapp), 0, NULL, &base_ops))
     goto err;
   if (!base_ops.to_xfer_memory (sp + SP_ARG0 + sizeof (mapp), (char *)&change,
-				sizeof (change), 0, &base_ops))
+				sizeof (change), 0, NULL, &base_ops))
     goto err;
 
   /* create_inferior() may not have finished yet, so notice the main
@@ -966,7 +966,7 @@ libthread_init (void)
       /* Activate the stub function. */
       onp = (CORE_ADDR)&((struct thread_debug *)thr_debug_addr)->thr_debug_on;
       if (!base_ops.to_xfer_memory ((CORE_ADDR)onp, (char *)&one,
-				    sizeof (one), 1, &base_ops))
+				    sizeof (one), 1, NULL, &base_ops))
 	{
 	  delete_breakpoint (b);
 	  goto err;


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