[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#165366: gdb/readline: SEGV (ia64)



Package: gdb
Version: 5.2.cvs20020818-3

GDB uses filename_completion_function, the prototype for which is #if 0'd
in readline.h with the comment "backwards compatibility" - it should be
using rl_filename_completion_function.  The lack of prototype causes the
usual IA64 return-type-assumed-int problems.

I also noticed while building that gdbreplay.c is missing <stdlib.h>
for alloca (plus atoi and exit).

Matt


--- gdb/completer.c.orig	2002-03-27 16:07:57.000000000 +1100
+++ gdb/completer.c	2002-10-19 00:18:05.000000000 +1000
@@ -31,7 +31,7 @@
 #include "gdbcmd.h"
 
 /* Needed for rl_completer_word_break_characters() and for
-   filename_completion_function.  */
+   rl_filename_completion_function.  */
 #include <readline/readline.h>
 
 /* readline defines this.  */
@@ -135,7 +135,7 @@
   while (1)
     {
       char *p;
-      p = filename_completion_function (text, subsequent_name);
+      p = rl_filename_completion_function (text, subsequent_name);
       if (return_val_used >= return_val_alloced)
 	{
 	  return_val_alloced *= 2;
--- gdb/gdbserver/gdbreplay.c.orig	2002-07-11 03:01:39.000000000 +1000
+++ gdb/gdbserver/gdbreplay.c	2002-10-19 00:38:37.000000000 +1000
@@ -21,6 +21,7 @@
 
 #include "config.h"
 #include <stdio.h>
+#include <stdlib.h>
 #include <sys/file.h>
 #include <netinet/in.h>
 #include <sys/socket.h>


On Fri, Oct 18, 2002 at 03:53:14PM +0200, Bill Allombert wrote:
> Hello ia64 porters,
> 
> On merulo, try
> merulo% gdb
> (gdb) run<TAB>
> -->SEGV
> 
> merulo% gdb
> GNU gdb 2002-08-18-cvs
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "ia64-linux".
> (gdb) runzsh: segmentation fault  gdb
> 
> Friendly,
> -- 
> Bill. <ballombe@debian.org>
> 
> Q: Does Debian has LSB support ?
> A: Yes! But we also have MSB support.
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-ia64-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: