Cannot insert breakpoint / Cannot access memory using eclipse
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp, linux
- Domain
- devtools, operating-systems
Research direction
Reproduce the recorded block program under Eclipse using the documented rrgdb setup and compare it with direct rr replay. Start at src/GdbServer.cc:1159 and inspect the breakpoint insertion and resume-request handling. Done means Eclipse can insert the breakpoint at main, continue execution, and avoid the reported assertion.
Written by the indexing model from the issue text.
Description
I am having a lot of trouble trying to use Mozilla rr together with eclipse.
I'm using eclipse 2019-12 (4.14.0) on Ubuntu 18.04 (fully updated).
I downloaded Mozilla rr using git pull. I built commit ac321e492e3c517ee5a26d990271728c55a732c67
last change by Kyle Huey on 2020-02-27.
I followed the build instructions from
https://github.com/mozilla/rr/wiki/Building-And-Installing
git clone https://github.com/mozilla/rr.git
mkdir obj && cd obj
cmake ../rr
make -j8
sudo make install
Then I manually built the 'block' test program:
gcc -g3 -I../rr/include -I../rr/src/test -I. ../rr/src/test/block.d -lpthread -o block
And then recorded its execution
rr record ./block
I can successfully replay this recording with rr directly, including inserting breakpoints. It all seems to work as intended there.
However, I have trouble trying to run this program under eclipse. I have set up an rrgdb script as per https://github.com/mozilla/rr/wiki/Using-rr-in-an-IDE . Note that eclipse has a breakpoint at main displayed in the Break tab. When I launch the debugging session under Eclipse, the Debugger Console says
0x00007fae688a3090 in _start () from /lib64/ld-linux-x86-64.so.2
(rr) cont
Continuing.
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x2e7c
If I then disable the breakpoint from the eclipse Break tab, then the following is displayed:
(rr) rr: /export/home/stanb/rr/rr/src/GdbServer.cc:1159: rr::GdbServer::ContinueOrStop rr:GdbServer:debug_one_step(rr:GdbRequest&): Assertion `req.is_resume_request()' failed.
(rr)
If I terminate the debugging session in eclipse and start a new one, and ensure that the breakpoint is disabled, then I can successfuly run the program. However, I cannot insert a breakpoint running under eclipse, which is a serious problem for a debugger.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rr-debugger/rr
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rr-debugger/rr#4096 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rr-debugger/rr#4093 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rr-debugger/rr#4090 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rr-debugger/rr#4060 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
rr-debugger/rr#4059 · 1 comment ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·