Here's a patch that fixes libgdb building during buildworld in HEAD.

Joe
Index: target.c.patch
===================================================================
RCS file: /home/dcvs/src/gnu/usr.bin/gdb/libgdb/patches/target.c.patch,v
retrieving revision 1.1
diff -u -r1.1 target.c.patch
--- target.c.patch      7 Mar 2006 15:48:11 -0000       1.1
+++ target.c.patch      7 Aug 2006 15:20:22 -0000
@@ -1,13 +1,19 @@
-$DragonFly: src/gnu/usr.bin/gdb/libgdb/patches/target.c.patch,v 1.1 2006/03/07 
15:48:11 corecode Exp $
-
---- target.c   Mon Aug 26 12:18:33 2002
-+++ target.c   Sun Oct 13 10:51:32 2002
-@@ -1429,7 +1429,7 @@
+Index: target.c
+===================================================================
+RCS file: /home/dcvs/src/contrib/gdb-6.2.1/gdb/target.c,v
+retrieving revision 1.1
+diff -u -r1.1 target.c
+--- target.c   24 Oct 2004 19:56:25 -0000      1.1
++++ target.c   7 Aug 2006 15:15:51 -0000
+@@ -1493,7 +1493,11 @@
    for (t = target_structs; t < target_structs + target_struct_size;
         ++t)
      {
--      if ((*t)->to_stratum == core_stratum)
++#ifdef KGDB
 +      if ((*t)->to_stratum == (kernel_debugging ? kgdb_stratum : 
core_stratum))
++#else
+       if ((*t)->to_stratum == core_stratum)
++#endif
        {
          runable = *t;
          ++count;
Index: target.h.patch
===================================================================
RCS file: /home/dcvs/src/gnu/usr.bin/gdb/libgdb/patches/target.h.patch,v
retrieving revision 1.1
diff -u -r1.1 target.h.patch
--- target.h.patch      7 Mar 2006 15:48:11 -0000       1.1
+++ target.h.patch      7 Aug 2006 15:21:19 -0000
@@ -1,12 +1,17 @@
-$DragonFly: src/gnu/usr.bin/gdb/libgdb/patches/target.h.patch,v 1.1 2006/03/07 
15:48:11 corecode Exp $
-
---- target.h   Sat Feb  9 20:08:42 2002
-+++ target.h   Fri May 24 08:38:31 2002
-@@ -52,6 +52,7 @@
+Index: target.h
+===================================================================
+RCS file: /home/dcvs/src/contrib/gdb-6.2.1/gdb/target.h,v
+retrieving revision 1.1
+diff -u -r1.1 target.h
+--- target.h   24 Oct 2004 19:56:25 -0000      1.1
++++ target.h   7 Aug 2006 15:20:55 -0000
+@@ -59,6 +59,9 @@
      dummy_stratum,            /* The lowest of the low */
      file_stratum,             /* Executable files, etc */
      core_stratum,             /* Core dump files */
++#ifdef KGDB
 +    kgdb_stratum,             /* Kernel core files */
++#endif
      download_stratum,         /* Downloading of remote targets */
      process_stratum,          /* Executing processes */
      thread_stratum            /* Executing threads */

Reply via email to