Error Accessing Memory Address Inputoutput Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the gdb cannot access memory at address breakpoint company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions
Ls Cannot Access Input Output Error
Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million
Gdb Cannot Insert Breakpoint Cannot Access Memory At Address
programmers, just like you, helping each other. Join them; it only takes a minute: Sign up After setting a breakpoint in Qt, gdb says: “Error accessing memory address” up vote 5 down vote favorite 1 I
Gdb Break Cannot Access Memory At Address
wrote a very simple Qt program here: int main(int argc, char* argv[]) { QApplication app(argc, argv); QTableView table(&frame); table.resize(100, 100); table.show(); return app.exec(); } And when I try to set a breakpoint where the table gets clicked, I get this error from 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 error in re-setting breakpoint 1: cannot access memory at address Starting program: ./qt-test Warning: Cannot insert breakpoint 1. Error accessing memory address 0x5fc660: Input/output error. Does anyone know why the breakpoint can't be inserted? debugging qt qt4 gdb breakpoints share|improve this question edited Jul 14 '09 at 6:19 Quinn Taylor 36.7k1395118 asked May 26 '09 at 21:18 Neil 10k73448 I'm using Ubuntu Intrepid, and I have installed libqt4-dbg, if that helps at all. –Neil May 26 '09 at 21:22 add a comment| 4 Answers 4 active oldest votes up vote 2 down vote accepted If you want to automatically break in main without setting a breakpoint you can also use the start command. If you need to provide any arguments to the program you can use: start argument1 argument2 share|improve this answer edited May 29 '09 at 9:27 answered May 28 '09 at 20:57 Andy 2,4841525 add a comment| up vote 10 down vote Don't use the gdb command symbol-file to load external symbols. The breakpoint addresses will be wrong since they're not relocated. Instead, put a breakpoint in main, run the program, and then set your breakpoint: gdb ./program GNU gdb 6.8-debian blah blah blah (gdb) br main Breakpoint 1 at 0x80489c1 (gdb) run Starting program: ./program Breakpoint 1, 0x080489c1 in main () (gdb) br 'QAbstractItemView::clicked(QModelIndex const&)' Breakpoint 2 at 0xb7d24664 (gdb) continue Continuing. The
Bug8953 - breakpoint (Error accessing memory address) Summary: breakpoint (Error accessing memory address) Status: ASSIGNED Alias: None Product: gdb Classification: Unclassified Component: breakpoints (show other bugs) Version: 6.3 gdb cannot insert breakpoint 0 Importance: P2 critical Target Milestone: --- Assignee: Not yet assigned to anyone URL: gdb cannot access memory at address Keywords: Depends on: Blocks: Reported: 2005-01-20 02:28 IST by desimoi Modified: 2008-12-18 19:42 IST (History) CC List: 4 users (show) gdb-prs jacopo.desimoi kettenis mark.kettenis See Also: Host: Target: Build: Last reconfirmed: Attachments Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes http://stackoverflow.com/questions/912808/after-setting-a-breakpoint-in-qt-gdb-says-error-accessing-memory-address to this bug. Description desimoi 2005-01-20 02:28:00 IST [Converted from Gnats 1848] I can't insert a breakpoint in any program, I always get an error such as: Error accessing memory address 0xblabla: Input/Output Error Release: GNU gdb 6.3 and previous Environment: Gentoo 2004.3 Linux on amd64 Kernel 2.6.9-gentoo-r9 Comment 1 mark.kettenis 2005-01-22 15:57:16 IST From: Mark Kettenis [x] Bug12568 - GDB inserts breakpoint on constructor at location 0 Summary: GDB inserts breakpoint on constructor at location 0 Status: RESOLVED DUPLICATE of bug 12528 Alias: https://sourceware.org/bugzilla/show_bug.cgi?id=12568 None Product: gdb Classification: Unclassified Component: breakpoints (show other bugs) Version: unknown Importance: P2 normal Target Milestone: --- Assignee: Not yet assigned to anyone URL: Keywords: Depends on: Blocks: Reported: 2011-03-11 06:19 UTC by Paul Pluzhnikov Modified: 2011-03-11 08:11 UTC (History) CC List: 1 user (show) dje See Also: Host: Target: Build: Last reconfirmed: Attachments Add an attachment (proposed patch, testcase, etc.) Note You need to log cannot access in before you can comment on or make changes to this bug. Description Paul Pluzhnikov 2011-03-11 06:19:06 UTC When using virtual inheritance, GCC emits in-charge (C1) and not-in-charge (C2) constructors, at the same source file:line One of these ctors could be garbage-collected by the linker, causing its line table to start at location 0. GDB does not ignore that line table, sets a breakpoint on 0, then gets: Cannot cannot access memory insert breakpoint 1. Error accessing memory address 0x0: Input/output error. The problem reproduces with GDB 7.2.50.20110311-cvs and GCC g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3 The problem does *not* reproduce with g++ (GCC) 4.6.0 20110219 (experimental), because in that version C1 ctor calls C2, preventing C2 from being GCd by the linker. Repro steps: /// --- foo.c struct Foo { Foo(int z) { x = z; } int x; }; struct Bar: virtual public Foo { Bar(int x) : Foo(x) { } }; int main(int argc, char *argv[]) { Foo f(42); return f.x + argc; } // Calls C2 ctor, but is GCd by linker void deadfn() { Bar b(12); } /// --- foo.c g++ -g foo.c -fno-inline -ffunction-sections -Wl,--gc-sections nm a.out | grep Foo 0000000000400622 W _ZN3FooC1Ei ### Note: only C1 constructor present! gdb ./a.out GNU gdb (GDB) 7.2.50.20110311-cvs Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later