-
as seen on Super User
- Search for 'Super User'
Hi,
I have the following problem. When I connect gdb to qemu for debugging it won't break on breakpoints. I can set breakpoints, break with ctrl-c etc.
Any clues how this can be fixed?
I have:
$ qemu --version
QEMU PC emulator version 0.11.0 (qemu-kvm-0.11.0), Copyright (c) 2003-2008 Fabrice Bellard
$…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I attached to a program with gdb in OSX and I want to use CFShow in the gdb console etc. However, nothing shows up. printf shows nothing as well:
(gdb) call (int) printf("Hello\n")
$10 = 6
(gdb) call (int) printf("Hello World!\n")
$11 = 13
Apple suggests the following tip for when attaching with…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello all,
Last week I was a debugging a code and a weird situation came up: gdb passes through two different return clauses. I made a simple example that illustrates the situation:
#include <iostream>
using namespace std;
int test() {
string a = "asd";
string b = "asd";
while…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I compiled GDB 7 on a Mac OS X Leopard system. When stepping through a C program, GDB fails to step through 'printf()' statements, which probably don't have associated debug information, and starts printing "Cannot find bounds of current function."
Here's some output:
$ /usr/local/bin/gdb try1
GNU…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
This is my first time creating an iPhone App and I am having difficulty with the memory management because I have never had to deal with it before.
I have a UITableViewController and it all works fine until I try to scroll down in the simulator. It crashes saying that it cannot allocate that much…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
On a large C application, I have set a hardware watchpoint on a memory address as follows:
(gdb) watch *((int*)0x12F5D58)
Hardware watchpoint 3: *((int*)0x12F5D58)
As you can see, it's a hardware watchpoint, not software, which would explain the slowness.
Now the application running time under…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
If I set a watchpoint for a variable local to the current scope, it will be auto deleted when going out of the scope. Is there any way to set it once and keep it auto alive whenever entering the same scope?
Is there anyway to set conditional watchpoint, like "watch var1 if var1==0"? In my case…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
When working sometimes ago on an embedded system with a simple MMU, I used to program dynamically this MMU to detect memory corruptions.
For instance, at some moment at runtime, the foo variable was overwritten with some unexpected data (probably by a dangling pointer or whatever). So I added the…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Has anyone gotten watchpoints to work when debugging PHP with xDebug and Eclipse? The way I understand it, I'm supposed to be able to select a watched variable in the expressions view or select a variable in the Variables view during debugging, and then select Run-Toggle Watchpoint. But Toggle Watchpoint…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Can I set the breakpoint/watchpoint/smth else in gdb for register value?
I want to break when $eax will have value 0x0000ffaa.
Is it possible with gdb or dbx or any other unix debugger?
>>> More