This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/13463] bad multi-inferior behavior with breakpoint resetting
- From: "simon.marchi at polymtl dot ca" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 05 Aug 2013 19:10:58 +0000
- Subject: [Bug breakpoints/13463] bad multi-inferior behavior with breakpoint resetting
- Auto-submitted: auto-generated
- References: <bug-13463-4717 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13463
Simon Marchi <simon.marchi at polymtl dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simon.marchi at polymtl dot ca
--- Comment #3 from Simon Marchi <simon.marchi at polymtl dot ca> ---
I think I have an even simpler test case that triggers this bug.
---8<---
#include <stdio.h>
#include <unistd.h>
#include <string.h>
void function_in_a() {
printf("Hi, I'm a\n");
}
int main(int argc, char **argv) {
for (;;) {
function_in_a();
sleep(1);
}
return 0;
}
--->8---
What I do:
$ gdb
(gdb) set non-stop on
(gdb) set target-async on
(gdb) file a <!-- the code above, compiled with no special flags) -->
(gdb) r &
(gdb) b function_in_a
I get the same kind of error: Cannot access memory at address 0x400504
>From what I understand, adding this breakpoint requires to read the running
inferior's memory to analyze the function prologue. GDB tries to read the
memory while the ptrace state of the inferior is "running", which isn't
allowed.
--
You are receiving this mail because:
You are on the CC list for the bug.