45 lines
1.2 KiB
Diff
Executable File
45 lines
1.2 KiB
Diff
Executable File
http://sourceware.org/ml/gdb-patches/2009-04/msg00356.html
|
|
http://sourceware.org/ml/gdb-cvs/2009-04/msg00081.html
|
|
|
|
gdb/
|
|
2009-04-15 Tom Tromey <tromey@redhat.com>
|
|
|
|
* c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
|
|
|
|
gdb/testsuite/
|
|
2009-04-15 Tom Tromey <tromey@redhat.com>
|
|
|
|
* gdb.base/charset.exp: Add regression test.
|
|
|
|
--- src/gdb/c-lang.c 2009/04/14 21:54:33 1.64
|
|
+++ src/gdb/c-lang.c 2009/04/15 21:55:04 1.65
|
|
@@ -941,7 +941,15 @@
|
|
*pos += 2;
|
|
|
|
if (noside == EVAL_SKIP)
|
|
- return NULL;
|
|
+ {
|
|
+ /* Return a dummy value of the appropriate type. */
|
|
+ if ((dest_type & C_CHAR) != 0)
|
|
+ result = allocate_value (type);
|
|
+ else
|
|
+ result = value_typed_string ("", 0, type);
|
|
+ do_cleanups (cleanup);
|
|
+ return result;
|
|
+ }
|
|
|
|
if ((dest_type & C_CHAR) != 0)
|
|
{
|
|
--- src/gdb/testsuite/gdb.base/charset.exp 2009/03/25 19:25:49 1.13
|
|
+++ src/gdb/testsuite/gdb.base/charset.exp 2009/04/15 21:55:04 1.14
|
|
@@ -604,4 +604,9 @@
|
|
test_combination u UCS-2 U UCS-4
|
|
}
|
|
|
|
+# Regression test for a cleanup bug in the charset code.
|
|
+gdb_test "print 'a' == 'a' || 'b' == 'b'" \
|
|
+ ".* = 1" \
|
|
+ "EVAL_SKIP cleanup handling regression test"
|
|
+
|
|
gdb_exit
|