В GDB я получаю ошибку сегментации, если я пытаюсь сделать следующее:
print bg->top
Код выглядит примерно так:
@interface Sprite : Object
{
@public
int top;
/* Other fields */
}
@end
bg = [Sprite load: "test.png"];
/* GDB is at a breakpoint after the above line */
Полученное сообщение:
(gdb) print bg->top
Program received signal SIGSEGV, Segmentation fault.
0x6a7e3048 in libobjc-2!__objc_class_links_resolved () from C:\MinGW\bin\libobjc-2.dll
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(objc_lookup_class) will be abandoned.
When the function is done executing, GDB will silently stop.
Почему это так?
Я использую среду выполнения GNU Objective-C и не использую GNUStep.