This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
breakpoints/1219: cannot access subprocess memory
- From: paulh at issi dot co dot za
- To: gdb-gnats at sources dot redhat dot com
- Date: 19 May 2003 14:25:26 -0000
- Subject: breakpoints/1219: cannot access subprocess memory
- Reply-to: paulh at issi dot co dot za
>Number: 1219
>Category: breakpoints
>Synopsis: cannot access subprocess memory
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 19 14:28:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Paul Hewlett
>Release: 5.3 (i686-pc-linux-gnu)
>Organization:
>Environment:
SuSE 8.2 Professional
>Description:
GDB is unable to access the memory of the traced process on SuSE 8.2. I have a program 'testbasic' at which I put a breakpoint at line 1345
gdb /usr/bin/iss/testbasic
gdb starts. I set a breakpoint -
break 1345
and run
run
gets the message
Can't get registers...
I downloaded the gdb 5.3 sources and recompiled. The same procedure now reports
file testbasic.c, line 1345.
(gdb) run
Starting program: /home/iss/9.1.0/lnx9_d/bin/testbasic
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x804bfd6: Input/output error.
Cannot insert breakpoint -2.
Error accessing memory address 0x4000bb50: Input/output error.
The same program may be running in another process.
If I start gdb with the --write option viz :
gdb --write /usr/bin/iss/testbasic
and repeat the breakpoint I get
(gdb) break 1345
Breakpoint 1 at 0x804bfd6: file testbasic.c, line 1345.
(gdb) run
Starting program: /home/iss/9.1.0/lnx9_d/bin/testbasic
/bin/bash: line 1: /home/iss/9.1.0/lnx9_d/bin/testbasic: Text file busy
/bin/bash: line 1: /home/iss/9.1.0/lnx9_d/bin/testbasic: Success
Program exited with code 01.
You can't do that without a process to debug.
I was compiling with -ggdb. I changed to -gdwarf-2 without success
>How-To-Repeat:
See above
>Fix:
I cannot fix this. I looked in the sources but it seems that the
ptrace() procedure fails with some error. Unfortunately I cannot run gdb to debug gdb :-)
>Release-Note:
>Audit-Trail:
>Unformatted: