We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Run->Debug Configurations->Linux Application Debug->Connect to already running gdbserver
(1) how to run gdbserver in this case
I use a separate USB to connect to phone usb port, together with a JTAG connection to DSTREAM box
I did an adb shell, and do
gdbserver :5039 --attach pid, by default the ip is localhost which is 127.0.0.1
(2) how to set gdbserver address (TCP)
I put in 127.0.0.1
(3) port is set to 5039
but after I use apply and debug
DSTREAM gives out Unable to connect to DSTREAM
Reason:
Failed to connect to the device
Unable to connect to device gdbserver
Unable to connect to gdbserver at 127.0.0.1 on port 5039
Hi there,
You cannot use DSTREAM for this, however, I don't think you need to. You can use the 'adb forward' command to use the adb bridge, and connect the debugger with gdbserver over that route.
See Developer Resources / Tutorials / Android Native App Debug Tutorial | ARM Development Studio 5 for more info
Hi Ronan,
The purpose for this configuration was trying to use DStream to set H/W memory breakpoint, as it runs so slowly in case of using software memory breakpoint in gdb/gdbserver scenario.
Could you please give us some suggestions on how to set H/W memory breakpoint?
Thanks ahead.
Hongbing
If you have access to the kernel symbols, you can use the kernel awareness functionality to see the process of interest and debug via that. However application level debug isn't really the use case for this feature.
Hi again Tony,
Reading your comment again (from my laptop, not my phone!), I see you refer to a "memory breakpoint", by which I believe you mean that you are checking if a write occurs to a particular address at any point (we call these "watchpoints"). You are correct that a software implementation of these are terrible for performance, as the debugger has to check after every instruction whether or not that address was written to. You should be able to use DSTREAM in that manner to catch a write to a given address, by using the debugger command:
awatch <address>
(or in the memory window -> toggle watchpoint)
Thanks a lot for your comments.
I am working with engineers from ARM Shanghai office and try to figure out how to configure DStream for linux application. Hopefully we can do that soon.
BR