home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / gdb / bug / 884 < prev    next >
Encoding:
Text File  |  1992-07-23  |  6.0 KB  |  199 lines

  1. Newsgroups: gnu.gdb.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!citron.sw.stratus.com!pfieland
  3. From: pfieland@citron.sw.stratus.com (Peggy Fieland)
  4. Subject: (none)
  5. Message-ID: <9207202017.AA11032@citron.sw.stratus.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Mon, 20 Jul 1992 20:17:54 GMT
  10. Approved: bug-gdb@prep.ai.mit.edu
  11. Lines: 186
  12.  
  13. While building gdb-4.6 for our stratus i860, our (ansi-compliant)
  14. c compiler raised the following errors:
  15.  
  16. cc -c -g      -I. -I. -I./../include -I./../readline  printcmd.c
  17. printcmd.c", line 1929: argument is incompatible with prototype: arg #2 
  18.   cc -c -g      -I. -I. -I./../include -I./../readline  command.c
  19. "command.c", line 715: warning: semantics of "<" change in ANSI C; use explicit cast
  20.      cc -c -g      -I. -I. -I./../include -I./../readline  -DDEMANGLING_STYLE="gnu" \
  21.        `echo ./cplus-dem.c | sed 's,^\./,,'`
  22.  "cplus-dem.c", line 839: warning: semantics of ">=" change in ANSI C; use explicit cast
  23.  "cplus-dem.c", line 1241: warning: semantics of "<" change in ANSI C; use explicit cast
  24.  "cplus-dem.c", line 1466: warning: semantics of "<" change in ANSI C; use explicit cast
  25.      cc -c -g      -I. -I. -I./../include -I./../readline  ieee-float.c
  26.  "ieee-float.c", line 99: warning: semantics of ">>" change in ANSI C; use explicit cast
  27.      cc -c -g      -I. -I. -I./../include -I./../readline  -I./../bfd ./mipsread.c
  28.  "./mipsread.c", line 2047: warning: semantics of ">=" change in ANSI C; use explicit cast
  29.  
  30.  
  31.  Here are fixes: (Note that I was forced to add a function to take care of varargs
  32.  differences).
  33.  
  34.  
  35. diff -c /home/tools/gnu/gdb-4.6/gdb/printcmd.c printcmd.c
  36. *** /home/tools/gnu/gdb-4.6/gdb/printcmd.c    Mon Jul  6 13:11:00 1992
  37. --- printcmd.c    Fri Jul 17 16:58:26 1992
  38. ***************
  39. *** 30,35 ****
  40. --- 30,36 ----
  41.   #include "target.h"
  42.   #include "breakpoint.h"
  43.   #include "demangle.h"
  44. + #include "stdarg.h"
  45.   
  46.   extern int asm_demangle;    /* Whether to demangle syms in asm printouts */
  47.   extern int addressprint;    /* Whether to print hex addresses in HLL " */
  48. ***************
  49. *** 1926,1934 ****
  50. --- 1927,1955 ----
  51.       vprintf (string, list);
  52.     }
  53.   #else /* No __INT_VARARGS_H.  */
  54. + #if defined(_VA_LIST)
  55. +   {
  56. +      void vjhprintf( char *format, ... );
  57. +      vjhprintf(string,arg_bytes);
  58. +   }
  59. + #else /* No __INT_VARARGS_H.  */
  60.     vprintf (string, arg_bytes);
  61. + #endif /* _VA_LIST */
  62.   #endif /* No __INT_VARARGS_H.  */
  63.   }
  64. + void
  65. + vjhprintf( char *format, ... )
  66. + {
  67. +     va_list    arglist;
  68. +     va_start( arglist, format );
  69. +     vprintf ( format, arglist );
  70. +     va_end  ( arglist       );
  71. + }
  72.   
  73.   /* Helper function for asdump_command.  Finds the bounds of a function
  74.      for a specified section of text.  PC is an address within the
  75.  
  76. diff -c /home/tools/gnu/gdb-4.6/gdb/command.c command.c
  77. *** /home/tools/gnu/gdb-4.6/gdb/command.c    Tue Jul 14 03:34:20 1992
  78. --- command.c    Thu Jul 16 15:22:02 1992
  79. ***************
  80. *** 712,718 ****
  81.         for (c = local_list; c; c = c->next)
  82.           if (!strncmp (*line, c->name, amb_len))
  83.             {
  84. !         if (strlen (ambbuf) + strlen (c->name) + 6 < (int)sizeof ambbuf)
  85.             {
  86.               if (strlen (ambbuf))
  87.                 strcat (ambbuf, ", ");
  88. --- 712,718 ----
  89.         for (c = local_list; c; c = c->next)
  90.           if (!strncmp (*line, c->name, amb_len))
  91.             {
  92. !         if (strlen (ambbuf) + strlen (c->name) + 6 < (unsigned int)sizeof ambbuf)
  93.             {
  94.               if (strlen (ambbuf))
  95.                 strcat (ambbuf, ", ");
  96.  
  97. diff -c /home/tools/gnu/gdb-4.6/gdb/cplus-dem.c cplus-dem.c
  98. *** /home/tools/gnu/gdb-4.6/gdb/cplus-dem.c    Tue Jul 14 03:34:20 1992
  99. --- cplus-dem.c    Fri Jul 17 09:38:00 1992
  100. ***************
  101. *** 836,842 ****
  102.     int success = 0;
  103.   
  104.     n = consume_count (mangled);
  105. !   if (strlen (*mangled) >= n)
  106.       {
  107.         if (work -> constructor || work -> destructor)
  108.       {
  109. --- 836,842 ----
  110.     int success = 0;
  111.   
  112.     n = consume_count (mangled);
  113. !   if ((int) strlen (*mangled) >= n)
  114.       {
  115.         if (work -> constructor || work -> destructor)
  116.       {
  117. ***************
  118. *** 1238,1244 ****
  119.           break;
  120.             }
  121.           n = consume_count (type);
  122. !         if (strlen (*type) < n)
  123.             {
  124.           success = 0;
  125.           break;
  126. --- 1238,1244 ----
  127.           break;
  128.             }
  129.           n = consume_count (type);
  130. !         if ((int) strlen (*type) < n)
  131.             {
  132.           success = 0;
  133.           break;
  134. ***************
  135. *** 1463,1469 ****
  136.         case '8':
  137.         case '9':
  138.       n = consume_count (type);
  139. !     if (strlen (*type) < n)
  140.         {
  141.           success = 0;
  142.           break;
  143. --- 1463,1469 ----
  144.         case '8':
  145.         case '9':
  146.       n = consume_count (type);
  147. !     if ((int) strlen (*type) < n)
  148.         {
  149.           success = 0;
  150.           break;
  151.  
  152. diff -c /home/tools/gnu/gdb-4.6/gdb/ieee-float.c ieee-float.c
  153. *** /home/tools/gnu/gdb-4.6/gdb/ieee-float.c    Mon Jul  6 13:10:52 1992
  154. --- ieee-float.c    Fri Jul 17 09:33:18 1992
  155. ***************
  156. *** 96,102 ****
  157.     memcpy (twolongs, from, 8);
  158.     memcpy (tobytes, from, 8);
  159.   #if HOST_BYTE_ORDER == BIG_ENDIAN
  160. !   exponent = ((tobytes[1] & 0xF0) >> 4) | (tobytes[0] & 0x7F) << 4;
  161.     mant0 = (twolongs[0] << 11) | twolongs[1] >> 21;
  162.     mant1 = (twolongs[1] << 11);
  163.   #else
  164. --- 96,102 ----
  165.     memcpy (twolongs, from, 8);
  166.     memcpy (tobytes, from, 8);
  167.   #if HOST_BYTE_ORDER == BIG_ENDIAN
  168. !   exponent = ((unsigned)(tobytes[1] & 0xF0) >> 4) | (tobytes[0] & 0x7F) << 4;
  169.     mant0 = (twolongs[0] << 11) | twolongs[1] >> 21;
  170.     mant1 = (twolongs[1] << 11);
  171.   #else
  172.  
  173. diff -c /home/tools/gnu/gdb-4.6/gdb/mipsread.c mipsread.c
  174. *** /home/tools/gnu/gdb-4.6/gdb/mipsread.c    Mon Jul  6 13:10:58 1992
  175. --- mipsread.c    Fri Jul 17 09:57:24 1992
  176. ***************
  177. *** 2044,2050 ****
  178.                       VAR_NAMESPACE, LOC_BLOCK,
  179.                       objfile->static_psymbols, sh->value);
  180.               /* Skip over procedure to next one. */
  181. !             if (sh->index >= hdr->iauxMax)
  182.                 {
  183.               /* Should not happen, but does when cross-compiling
  184.                  with the MIPS compiler.  FIXME -- pull later.  */
  185. --- 2044,2050 ----
  186.                       VAR_NAMESPACE, LOC_BLOCK,
  187.                       objfile->static_psymbols, sh->value);
  188.               /* Skip over procedure to next one. */
  189. !             if ((int) sh->index >= hdr->iauxMax)
  190.                 {
  191.               /* Should not happen, but does when cross-compiling
  192.                  with the MIPS compiler.  FIXME -- pull later.  */
  193.  
  194.