This is the mail archive of the 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]
Other format: [Raw text]

Re: A fix for bug 13259 - gdb sometimes crashes with SIGSEGV when printing variables

I will test with HEAD tomorrow. I am behind a firewall right now and
cannot reach cvs head.

2011/10/5 Joel Brobecker <>:
>> here is a possible fix for a gdb crash I just filed as bug 13259:
> Have you seen the request to test again with the HEAD? It appears
> a recent change may have fixed your problem.
> Also, could you check if you could attach the patches instead of
> putting them in the email body? The patch shows up with a lot \240
> in lieu of the spaces, and that makes it very hard to read...
> --
> Joel
diff -r 3667782d0071 gdb/varobj.c
--- a/gdb/varobj.c	Wed Sep 28 12:36:27 2011 +0200
+++ b/gdb/varobj.c	Wed Oct 05 15:53:47 2011 +0200
@@ -2640,7 +2640,7 @@
   opts.raw = 1;
   if (thevalue)
     LA_PRINT_STRING (stb, type, thevalue, len, encoding, 0, &opts);
-  else if (string_print)
+  else if (string_print && type != NULL)
     val_print_string (type, encoding, str_addr, len, stb, &opts);
     common_val_print (value, stb, 0, &opts, current_language);

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