Tôi đã viết một chương trình Qt rất đơn giản ở đây:Sau khi thiết lập một breakpoint trong Qt, gdb nói: "truy cập Lỗi địa chỉ bộ nhớ"
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QTableView table(&frame);
table.resize(100, 100);
table.show();
return app.exec();
}
Và khi tôi cố gắng thiết lập một breakpoint nơi bàn được nhấn vào, tôi nhận được lỗi này từ gdb:
(gdb) symbol-file /usr/lib/libQtGui.so.4.4.3.debug
Load new symbol table from "/usr/lib/libQtGui.so.4.4.3.debug"? (y or n) y
Reading symbols from /usr/lib/libQtGui.so.4.4.3.debug...done.
(gdb) br 'QAbstractItemView::clicked(QModelIndex const&)'
Breakpoint 1 at 0x5fc660: file .moc/release-shared/moc_qabstractitemview.cpp, line 313.
(gdb) run
Starting program: ./qt-test
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x5fc660: Input/output error.
có ai biết lý do tại sao các breakpoint không thể chèn?
Tôi đang sử dụng Ubuntu Intrepid và tôi đã cài đặt libqt4-dbg, nếu điều đó có ích. – Neil