This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to configure DSTREAM to debug linux application?

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

Parents Reply Children
  • 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)

  • Hi Ronan,

    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

    Hongbing