initial commit gdb-6.3. - Adds new ~/.gdbinit file for x86 users. - Adds a forward...
authorNed Ludd <solar@gentoo.org>
Sun, 28 Nov 2004 02:47:45 +0000 (02:47 +0000)
committerNed Ludd <solar@gentoo.org>
Sun, 28 Nov 2004 02:47:45 +0000 (02:47 +0000)
sys-devel/gdb/Manifest
sys-devel/gdb/files/digest-gdb-6.3 [new file with mode: 0644]
sys-devel/gdb/files/gdb-6.3-relative-paths.patch [new file with mode: 0644]
sys-devel/gdb/files/gdb-6.3-scanmem.patch [new file with mode: 0644]
sys-devel/gdb/files/gdb-6.3-uclibc.patch [new file with mode: 0644]
sys-devel/gdb/gdb-6.3.ebuild [new file with mode: 0644]

index b40a320dcde74775b2ac6eda7edc90a67dddb744..eda7e16026593b9a32bc7c2055923a928be156a0 100644 (file)
@@ -1,11 +1,11 @@
-MD5 ffc6ae32accb7c8d8cebd454c02431d8 gdb-6.3.ebuild 2225
+MD5 49978f0016e350d3ebcf3457887389ad gdb-6.3.ebuild 2219
 MD5 bf66af8920a2d77c619eb08b4420dc6d gdb-6.0-r1.ebuild 2052
 MD5 5eaed703b34587f944badab53d12f0ae gdb-6.0.ebuild 1915
 MD5 4027e0d69eb5f4c99ac5051db169895b gdb-6.2.1-r1.ebuild 1937
 MD5 b32cba8ff5c1e04885d765e402656019 gdb-6.2.ebuild 1791
 MD5 f6777eb146402a0c759300ac38be21c4 gdb-6.1.1.ebuild 1859
 MD5 72273143c147c0351ce0e9ad517b3321 gdb-6.2.1.ebuild 1793
-MD5 ef9c938a3d79b18d306810fb66deca11 ChangeLog 8346
+MD5 64d444b729792211124a9642359e9248 ChangeLog 8708
 MD5 d90b42475961a4f937752c0ae1615990 gdb-6.1.ebuild 1816
 MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
 MD5 c6dfff1373e52fef5872c1bdca4cb706 files/gdb-6.0-info.patch 1108
diff --git a/sys-devel/gdb/files/digest-gdb-6.3 b/sys-devel/gdb/files/digest-gdb-6.3
new file mode 100644 (file)
index 0000000..3d22e69
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 05b928f41fa5b482e49ca2c24762a0ae gdb-6.3.tar.bz2 13446729
+MD5 35e70c29e393433b3847527d808f59c2 gdb_init.txt.bz2 6247
diff --git a/sys-devel/gdb/files/gdb-6.3-relative-paths.patch b/sys-devel/gdb/files/gdb-6.3-relative-paths.patch
new file mode 100644 (file)
index 0000000..92c8820
--- /dev/null
@@ -0,0 +1,90 @@
+diff -Nrup gdb-6.3.orig/gdb/dwarf2read.c gdb-6.3/gdb/dwarf2read.c
+--- gdb-6.3.orig/gdb/dwarf2read.c      2004-10-15 20:41:00.000000000 -0400
++++ gdb-6.3/gdb/dwarf2read.c   2004-11-27 20:35:38.000000000 -0500
+@@ -840,7 +840,7 @@ static struct line_header *(dwarf_decode
+ static void dwarf_decode_lines (struct line_header *, char *, bfd *,
+                               struct dwarf2_cu *, struct partial_symtab *);
+ 
+-static void dwarf2_start_subfile (char *, char *);
++static void dwarf2_start_subfile (char *, char *, char *);
+ 
+ static struct symbol *new_symbol (struct die_info *, struct type *,
+                                 struct dwarf2_cu *);
+@@ -6456,12 +6456,10 @@ dwarf_decode_lines (struct line_header *
+            directory and file name numbers in the statement program
+            are 1-based.  */
+           struct file_entry *fe = &lh->file_names[file - 1];
+-          char *dir;
++          char *dir = NULL;
+           if (fe->dir_index)
+             dir = lh->include_dirs[fe->dir_index - 1];
+-          else
+-            dir = comp_dir;
+-        dwarf2_start_subfile (fe->name, dir);
++          dwarf2_start_subfile (fe->name, dir, comp_dir);
+       }
+ 
+       /* Decode the table. */
+@@ -6561,7 +6559,7 @@ dwarf_decode_lines (struct line_header *
+                 else
+                   dir = comp_dir;
+                 if (!decode_for_pst_p)
+-                  dwarf2_start_subfile (fe->name, dir);
++                  dwarf2_start_subfile (fe->name, dir, comp_dir);
+               }
+             break;
+           case DW_LNS_set_column:
+@@ -6619,7 +6617,8 @@ dwarf_decode_lines (struct line_header *
+ 
+ /* Start a subfile for DWARF.  FILENAME is the name of the file and
+    DIRNAME the name of the source directory which contains FILENAME
+-   or NULL if not known.
++   or NULL if not known.  COMP_DIR is the value of DW_AT_comp_dir.  If
++   DIRNAME specifies a relative path, it is appended to COMP_DIR.
+    This routine tries to keep line numbers from identical absolute and
+    relative file names in a common subfile.
+ 
+@@ -6638,8 +6637,19 @@ dwarf_decode_lines (struct line_header *
+    subfile, so that `break /srcdir/list0.c:1' works as expected.  */
+ 
+ static void
+-dwarf2_start_subfile (char *filename, char *dirname)
++dwarf2_start_subfile (char *filename, char *dirname, char *comp_dir)
+ {
++  struct cleanup *back_to = make_cleanup (null_cleanup, 0);
++
++  /* If we have a relative dirname, append it to comp_dir.  */
++  if (dirname != NULL && !IS_ABSOLUTE_PATH (dirname) && comp_dir != NULL)
++    {
++      dirname = concat (comp_dir, "/", dirname, NULL);
++      make_cleanup (xfree, dirname);
++    }
++  else if (dirname == NULL)
++    dirname = comp_dir;
++
+   /* If the filename isn't absolute, try to match an existing subfile
+      with the full pathname.  */
+ 
+@@ -6647,19 +6657,20 @@ dwarf2_start_subfile (char *filename, ch
+     {
+       struct subfile *subfile;
+       char *fullname = concat (dirname, "/", filename, NULL);
++      make_cleanup (xfree, fullname);
+ 
+       for (subfile = subfiles; subfile; subfile = subfile->next)
+       {
+         if (FILENAME_CMP (subfile->name, fullname) == 0)
+           {
+             current_subfile = subfile;
+-            xfree (fullname);
++            do_cleanups (back_to);
+             return;
+           }
+       }
+-      xfree (fullname);
+     }
+   start_subfile (filename, dirname);
++  do_cleanups (back_to);
+ }
+ 
+ static void
diff --git a/sys-devel/gdb/files/gdb-6.3-scanmem.patch b/sys-devel/gdb/files/gdb-6.3-scanmem.patch
new file mode 100644 (file)
index 0000000..7770a21
--- /dev/null
@@ -0,0 +1,238 @@
+diff -Nrup gdb-6.3.orig/gdb/printcmd.c gdb-6.3/gdb/printcmd.c
+--- gdb-6.3.orig/gdb/printcmd.c        2004-09-11 06:24:50.000000000 -0400
++++ gdb-6.3/gdb/printcmd.c     2004-11-27 19:48:18.000000000 -0500
+@@ -940,6 +940,195 @@ print_command (char *exp, int from_tty)
+   print_command_1 (exp, 0, 1);
+ }
+ 
++static void 
++scanmem_command(char *exp, int from_tty)
++{
++   struct expression *expr;
++   struct value *val;
++   struct format_data fmt;
++   CORE_ADDR addr;
++   unsigned char *data;
++   unsigned char *size;
++   unsigned char *pattern;
++   unsigned char typ;
++   unsigned char typc;
++   unsigned char my_buf[4];
++   unsigned int nfetch;
++   unsigned int len = 10;
++   unsigned int memsize;
++   unsigned int i;
++   int typi;
++   int errcode;
++
++   if (exp && *exp) {
++      struct type *type;
++      char *str_num = NULL;
++      char *string_to_seek = NULL;
++      char *tmp = strdup(exp);
++      char *c;
++
++      c = tmp;
++      if (*c == ' ')
++       while (*c && *c == ' ')
++          c++;
++
++      while (*c && *c != ' ')
++       c++;
++
++      *c = '\0';
++      c++;
++
++      while (*c && *c == ' ')
++       c++;
++
++      size = c;
++
++      while (*c && *c != ' ')
++       c++;
++
++      *c = '\0';
++      c++;
++
++      while (*c && *c == ' ')
++       c++;
++
++      typ = *c;
++      c++;
++
++      *c = '\0';
++      c++;
++
++      while (*c && *c == ' ')
++       c++;
++      pattern = c;
++
++      printf_filtered(">>addr %s: size %s: type:%c pattern:%s<< \n",
++                    tmp, size, typ, pattern);
++
++      expr = parse_expression(tmp);
++      val = evaluate_expression(expr);
++
++      if (TYPE_CODE(VALUE_TYPE(val)) == TYPE_CODE_REF)
++       val = value_ind(val);
++
++      if (TYPE_CODE(VALUE_TYPE(val)) == TYPE_CODE_FUNC
++        && VALUE_LVAL(val) == lval_memory)
++       addr = VALUE_ADDRESS(val);
++      else
++       addr = value_as_address(val);
++
++      len = atoi(size);
++      data = xmalloc(len);
++      nfetch = partial_memory_read(addr, data, len, &errcode);
++
++      if (nfetch != len)
++       printf_filtered("we can read only %i bytes\n", nfetch);
++
++      switch (typ) {
++       case 's':
++          memsize = strlen(pattern);
++          if (nfetch < memsize) {
++             printf_filtered
++                 ("we read only %i bytes and we seek for a pattern of %i bytes\n",
++                  nfetch, memsize);
++             free(data);
++             free(tmp);
++             return;
++          }
++          for (i = 0; i <= (nfetch - memsize); i++, addr++) {
++             if (memcmp(data + i, pattern, memsize) == 0) {
++                printf_filtered("pattern match at ");
++                print_address_numeric((addr), 1, gdb_stdout);
++                printf_filtered("\n");
++             }
++          }
++          break;
++       case 'i':
++          memsize = sizeof(int);
++          typi = atoi(pattern);
++
++          if (nfetch < memsize) {
++             printf_filtered
++                 ("we read only %i bytes and we seek for a pattern of %i bytes\n",
++                  nfetch, memsize);
++             free(data);
++             free(tmp);
++             return;
++          }
++          for (i = 0; i <= (nfetch - memsize); i++, addr++) {
++             int *pint;
++             (unsigned char *) pint = (unsigned char *) (data + i);
++             if (*pint == typi) {
++                printf_filtered("pattern match at ");
++                print_address_numeric((addr), 1, gdb_stdout);
++                printf_filtered("\n");
++             }
++          }
++          break;
++       case 'a':
++          memsize = sizeof(unsigned long);
++          if (sscanf(pattern, "0x%x", &i) == 0) {
++             printf_filtered("cant convert to hexa %s\n", pattern);
++             break;
++          }
++          my_buf[0] = (unsigned char) ((i & 0x000000FF));
++          my_buf[1] = (unsigned char) ((i & 0x0000FF00) >> 8);
++          my_buf[2] = (unsigned char) ((i & 0x00FF0000) >> 16);
++          my_buf[3] = (unsigned char) ((i & 0xFF000000) >> 24);
++          if (nfetch < memsize) {
++             printf_filtered
++                 ("we read only %i bytes and we seek for a pattern of %i bytes\n",
++                  nfetch, memsize);
++             free(data);
++             free(tmp);
++             return;
++          }
++          for (i = 0; i <= (nfetch - memsize); i++, addr++) {
++             if (memcmp((data + i), my_buf, memsize) == 0) {
++                printf_filtered("pattern match at ");
++                print_address_numeric((addr), 1, gdb_stdout);
++                printf_filtered("\n");
++             }
++          }
++          break;
++       case 'b':
++       case 'c':
++          memsize = sizeof(char);
++          if (typ == 'c')
++             typc = *pattern;
++          else {
++             if (strncmp("0x", pattern, 2) == 0) {
++                sscanf(pattern, "0x%02x", &typc);
++             } else
++                (int) typc = atoi(pattern);
++          }
++          printf_filtered(">>>%0x2\n", (int) typc);
++          if (nfetch < memsize) {
++             printf_filtered
++                 ("we read only %i bytes and we seek for a pattern of %i bytes\n",
++                  nfetch, memsize);
++             free(data);
++             free(tmp);
++             return;
++          }
++          for (i = 0; i <= (nfetch - memsize); i++, addr++) {
++             if (*(data + i) == typc) {
++                printf_filtered("pattern match at ");
++                print_address_numeric((addr), 1, gdb_stdout);
++                printf_filtered("\n");
++             }
++          }
++          break;
++       default:
++          printf_filtered("'%c' is not a valid type\n", typ);
++          break;
++      }
++      free(data);
++      free(tmp);
++      return;
++   }
++}
++
+ /* Same as print, except in epoch, it gets its own window */
+ static void
+ inspect_command (char *exp, int from_tty)
+@@ -2138,6 +2327,17 @@ EXP may be preceded with /FMT, where FMT
+ but no count or size letter (see \"x\" command).", NULL));
+   set_cmd_completer (c, location_completer);
+   add_com_alias ("p", "print", class_vars, 1);
++  c =
++  add_com ("scanmem", class_vars, scanmem_command,
++      "scanmem  <addr> <num> <type> <string>\n"
++      "example: scanmem  $esp 100 a 0x8048434\n"
++      " scan for this addr into the stack\n\n"
++      " scanmem  0x08048434 100 s fsck\n"
++      " seek for a string\n"
++      " scanmem  0x8048434 100 b 0x75\n"
++      " scan for the char 0x75\n"
++      " a = address c = char b = byte i = int  s = string\n"
++      "\n"); /* antilove@zolo.freelsd.net */
+ 
+   c = add_com ("inspect", class_vars, inspect_command,
+          "Same as \"print\" command, except that if you are running in the epoch\n\
+diff -Nrup gdb-6.3.orig/gdb/valprint.c gdb-6.3/gdb/valprint.c
+--- gdb-6.3.orig/gdb/valprint.c        2004-09-12 12:13:04.000000000 -0400
++++ gdb-6.3/gdb/valprint.c     2004-11-27 19:23:54.000000000 -0500
+@@ -39,7 +39,7 @@
+ 
+ /* Prototypes for local functions */
+ 
+-static int partial_memory_read (CORE_ADDR memaddr, char *myaddr,
++int partial_memory_read (CORE_ADDR memaddr, char *myaddr,
+                               int len, int *errnoptr);
+ 
+ static void show_print (char *, int);
+@@ -837,7 +837,7 @@ val_print_array_elements (struct type *t
+ /* FIXME: cagney/1999-10-14: Only used by val_print_string.  Can this
+    function be eliminated.  */
+ 
+-static int
++int
+ partial_memory_read (CORE_ADDR memaddr, char *myaddr, int len, int *errnoptr)
+ {
+   int nread;                  /* Number of bytes actually read. */
diff --git a/sys-devel/gdb/files/gdb-6.3-uclibc.patch b/sys-devel/gdb/files/gdb-6.3-uclibc.patch
new file mode 100644 (file)
index 0000000..d292f6e
--- /dev/null
@@ -0,0 +1,175 @@
+diff -Nrup gdb-6.3.orig/bfd/config.bfd gdb-6.3/bfd/config.bfd
+--- gdb-6.3.orig/bfd/config.bfd        2004-10-15 01:47:11.000000000 -0400
++++ gdb-6.3/bfd/config.bfd     2004-11-27 20:15:57.000000000 -0500
+@@ -129,7 +129,7 @@ case "${targ}" in
+     targ_defvec=ecoffalpha_little_vec
+     targ_selvecs=bfd_elf64_alpha_vec
+     ;;
+-  alpha*-*-linux-gnu* | alpha*-*-elf*)
++  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
+     targ_defvec=bfd_elf64_alpha_vec
+     targ_selvecs=ecoffalpha_little_vec
+     ;;
+@@ -139,7 +139,7 @@ case "${targ}" in
+   alpha*-*-*)
+     targ_defvec=ecoffalpha_little_vec
+     ;;
+-  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
++  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu | ia64*-*-linux-uclibc*)
+     targ_defvec=bfd_elf64_ia64_little_vec
+     targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
+     ;;
+@@ -216,7 +216,7 @@ case "${targ}" in
+     targ_defvec=bfd_elf32_littlearm_vec
+     targ_selvecs=bfd_elf32_bigarm_vec
+     ;;
+-  armeb-*-elf | arm*b-*-linux-gnu*)
++  armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
+     targ_defvec=bfd_elf32_bigarm_vec
+     targ_selvecs=bfd_elf32_littlearm_vec
+     ;;
+@@ -225,7 +225,7 @@ case "${targ}" in
+     targ_selvecs=bfd_elf32_bigarm_vec
+     ;;
+   arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
+-  arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \
++  arm*-*-uclinux* | arm*-*-linux-uclibc* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \
+   arm*-*-eabi* )
+     targ_defvec=bfd_elf32_littlearm_vec
+     targ_selvecs=bfd_elf32_bigarm_vec
+@@ -378,7 +378,7 @@ case "${targ}" in
+     ;;
+ 
+ #ifdef BFD64
+-  hppa*64*-*-linux-gnu*)
++  hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
+     targ_defvec=bfd_elf64_hppa_linux_vec
+     targ_selvecs=bfd_elf64_hppa_vec
+     ;;
+@@ -389,7 +389,7 @@ case "${targ}" in
+     ;;
+ #endif
+ 
+-  hppa*-*-linux-gnu*)
++  hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*)
+     targ_defvec=bfd_elf32_hppa_linux_vec
+     targ_selvecs=bfd_elf32_hppa_vec
+     ;;
+@@ -522,7 +522,7 @@ case "${targ}" in
+     targ_selvecs=bfd_elf32_i386_vec
+     targ_underscore=yes
+     ;;
+-  i[3-7]86-*-linux-gnu*)
++  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
+     targ_defvec=bfd_elf32_i386_vec
+     targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
+     targ64_selvecs=bfd_elf64_x86_64_vec
+@@ -536,7 +536,7 @@ case "${targ}" in
+     targ_defvec=bfd_elf64_x86_64_vec
+     targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
+     ;;
+-  x86_64-*-linux-gnu*)
++  x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
+     targ_defvec=bfd_elf64_x86_64_vec
+     targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
+     ;;
+@@ -706,7 +706,7 @@ case "${targ}" in
+     targ_defvec=hp300hpux_vec
+     targ_underscore=yes
+     ;;
+-  m68*-*-linux*aout*)
++  m68*-*-linux*aout* | m68*-*-linux-uclibc*)
+     targ_defvec=m68klinux_vec
+     targ_selvecs=bfd_elf32_m68k_vec
+     targ_underscore=yes
+@@ -987,8 +987,8 @@ case "${targ}" in
+     ;;
+ #endif
+   powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
+-  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
+-  powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
++  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | powerpc-*-rtems* | \
++  powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss* )
+     targ_defvec=bfd_elf32_powerpc_vec
+     targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
+     targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
+@@ -1024,8 +1024,8 @@ case "${targ}" in
+     targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
+     ;;
+   powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
+-  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
+-  powerpcle-*-rtems*)
++  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* | \
++  powerpcle-*-vxworks* | powerpcle-*-rtems*)
+     targ_defvec=bfd_elf32_powerpcle_vec
+     targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
+     targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
+@@ -1192,7 +1192,7 @@ case "${targ}" in
+     targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
+     targ_underscore=yes
+     ;;
+-  sparc-*-linux-gnu*)
++  sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
+     targ_defvec=bfd_elf32_sparc_vec
+     targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
+     ;;
+@@ -1239,7 +1239,7 @@ case "${targ}" in
+     targ_defvec=sunos_big_vec
+     targ_underscore=yes
+     ;;
+-  sparc64-*-linux-gnu*)
++  sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
+     targ_defvec=bfd_elf64_sparc_vec
+     targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
+     ;;
+diff -Nrup gdb-6.3.orig/libtool.m4 gdb-6.3/libtool.m4
+--- gdb-6.3.orig/libtool.m4    2004-07-21 15:21:41.000000000 -0400
++++ gdb-6.3/libtool.m4 2004-11-27 20:12:48.000000000 -0500
+@@ -645,6 +645,10 @@ linux-gnu*)
+   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+   ;;
+ 
++linux-uclibc*)
++  lt_cv_deplibs_check_method=pass_all
++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++
+ netbsd* | knetbsd*-gnu)
+   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
+diff -Nrup gdb-6.3.orig/ltconfig gdb-6.3/ltconfig
+--- gdb-6.3.orig/ltconfig      2004-10-05 09:34:42.000000000 -0400
++++ gdb-6.3/ltconfig   2004-11-27 20:01:13.000000000 -0500
+@@ -602,7 +602,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
+ 
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+ 
+@@ -1270,6 +1270,24 @@ linux-gnu*)
+   dynamic_linker='GNU/Linux ld.so'
+   ;;
+ 
++linux-uclibc*)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
++  soname_spec='${libname}${release}.so$major'
++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++  # This implies no fast_install, which is unacceptable.
++  # Some rework will be needed to allow for fast_install
++  # before this can be enabled.
++  # Note: copied from linux-gnu, and may not be appropriate.
++  hardcode_into_libs=yes
++  # Assume using the uClibc dynamic linker.
++  dynamic_linker="uClibc ld.so"
++  ;;
++
+ netbsd*)
+   need_lib_prefix=no
+   need_version=no
diff --git a/sys-devel/gdb/gdb-6.3.ebuild b/sys-devel/gdb/gdb-6.3.ebuild
new file mode 100644 (file)
index 0000000..6e1a3e3
--- /dev/null
@@ -0,0 +1,86 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-6.3.ebuild,v 1.1 2004/11/28 02:43:26 solar Exp $
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sources.redhat.com/gdb/"
+SRC_URI="http://mirrors.rcn.net/pub/sourceware/gdb/releases/${P}.tar.bz2
+       mirror://gentoo/gdb_init.txt.bz2"
+#SRC_URI="${SRC_URI} mirror://gentoo/gdb-6.1-hppa-01.patch.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 -sparc ~x86"
+KEYWORDS="-*"
+IUSE="nls makecheck"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2"
+DEPEND="${RDEPEND}
+       maketest? ( dev-util/dejagnu )
+       nls? ( sys-devel/gettext )"
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+       epatch ${FILESDIR}/gdb-6.3-uclibc.patch
+       epatch ${FILESDIR}/gdb-6.3-relative-paths.patch
+       #epatch ${FILESDIR}/gdb-6.x-crash.patch
+       epatch ${FILESDIR}/gdb-6.2.1-pass-libdir.patch
+       epatch ${FILESDIR}/gdb-6.3-scanmem.patch
+
+       cp ${WORKDIR}/gdb_init.txt ${S}/ || die
+
+       strip-linguas -u bfd/po opcodes/po
+}
+
+src_compile() {
+       replace-flags -O? -O2
+       econf $(use_enable nls) || die
+       make || die
+}
+
+src_install() {
+       make \
+               prefix=${D}/usr \
+               mandir=${D}/usr/share/man \
+               libdir=${D}/usr/$(get_libdir) \
+               infodir=${D}/usr/share/info \
+               install || die "install"
+
+       dodoc README
+       docinto gdb
+       dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+               gdb/NEWS gdb/ChangeLog* gdb/TODO
+       docinto sim
+       dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+       docinto mmalloc
+       dodoc mmalloc/MAINTAINERS mmalloc/ChangeLog mmalloc/TODO
+
+       if use x86; then
+               dodir /etc/skel/
+               cp ${S}/gdb_init.txt ${D}/etc/skel/.gdbinit \
+                       || die "install ${D}/etc/skel/.gdbinit"
+       fi
+
+       if ! has noinfo ${FEATURES} ; then
+               cd gdb/doc
+               make \
+                       infodir=${D}/usr/share/info \
+                       install-info || die "install doc info"
+
+               cd ${S}/bfd/doc
+               make \
+                       infodir=${D}/usr/share/info \
+                       install-info || die "install bfd info"
+       fi
+
+       # These includes and libs are in binutils already
+       rm -f ${D}/usr/lib/libbfd.*
+       rm -f ${D}/usr/lib/libiberty.*
+       rm -f ${D}/usr/lib/libopcodes.*
+       rm -f ${D}/usr/share/info/{bfd,configure,standards}.info*
+       rm -r ${D}/usr/share/locale
+       rm -r ${D}/usr/include
+}