- Fix crash while executing python code.

This commit is contained in:
Jan Kratochvil 2010-01-13 23:37:33 +00:00
parent df99b64f73
commit de6a7ee761
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,14 @@
--- gdb-7.0.1/gdb/python/py-type.c-orig 2010-01-14 00:00:29.000000000 +0100
+++ gdb-7.0.1/gdb/python/py-type.c 2010-01-14 00:14:26.000000000 +0100
@@ -177,7 +177,10 @@ convert_field (struct type *type, int fi
if (PyObject_SetAttrString (result, "artificial", arg) < 0)
goto failarg;
- arg = field < TYPE_N_BASECLASSES (type) ? Py_True : Py_False;
+ if (TYPE_CODE (type) == TYPE_CODE_CLASS)
+ arg = field < TYPE_N_BASECLASSES (type) ? Py_True : Py_False;
+ else
+ arg = Py_False;
Py_INCREF (arg);
if (PyObject_SetAttrString (result, "is_base_class", arg) < 0)
goto failarg;

View File

@ -36,7 +36,7 @@ Version: 7.0.1
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 25%{?_with_upstream:.upstream}%{dist}
Release: 26%{?_with_upstream:.upstream}%{dist}
License: GPLv3+
Group: Development/Debuggers
@ -439,6 +439,9 @@ Patch400: gdb-stale-related_breakpoint.patch
# Fix crash reading broken stabs (it377671).
Patch401: gdb-stabs-read_args.patch
# Fix crash while executing python code.
Patch402: gdb-python-cplus-crash.patch
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
Requires: readline%{?_isa}
BuildRequires: readline-devel%{?_isa}
@ -696,6 +699,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch399 -p1
%patch400 -p1
%patch401 -p1
%patch402 -p1
find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen.
@ -1014,6 +1018,9 @@ fi
%endif
%changelog
* Thu Jan 14 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0.1-26.fc12
- Fix crash while executing python code.
* Tue Jan 12 2010 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.0.1-25.fc12
- non-librpm missing debuginfo yumcommand now prints also --disablerepo='*'
to save some bandwidth by yum (Robin Green, BZ 554152).