rr
rr copied to clipboard
Cannot insert breakpoint / Cannot access memory using eclipse
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.
Make sure the executable file selected in the eclipse config matches the one you want to replay (the one with the main). If the rrgdb file can run independently of eclipse this can be missed when cloning debug config.
Yes I did find that eclipse worked better when I selected the executable file. However, I still get the problem described above after selecting the executable file.
Can you break at main now? Look at the filter settings or enable gdb traces to check if the breakpoints are deleted by CDT. In this case you have to set the breakpoints after the first break.
Was this solved and can be closed?
I don't know if it was solved or not. I gave up trying to use rr under eclipse, and I now use it directly on the command line.
I would like to see eclipse support improved.
On 26 July 2021 8:33:03 pm Simon Sobisch @.***> wrote:
Was this solved and can be closed? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
The latest CDT still disables the breakpoints on new debug runs for me.