[SOLVED] How to list currently set hardware breakpoints

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] How to list currently set hardware breakpoints

    I am using an Renesas RZ/A1H (ARM Cortex A9) running XIP Linux, so I have to use hardware breakpoints to set breakpoints in the Linux kernel core and drivers (because with XIP Linux, the kernel code runs directly from ROM).

    In GDB, it seems I can use the 'hbreak' command to set hardware breakpoints, but sometimes I have to set them manually using 'monitor setbp'.

    Since GDB does not know about the 'monitor setbp' breakpoints, is there a Jlink command that will list my current hardware breakpoints?

    (or do I have to manually read the BCR/BVR registers in the break controller to find that out)

    Thanks,
    Chris
  • Hi Chris,

    In GDB, it seems I can use the 'hbreak' command to set hardware breakpoints, but sometimes I have to set them manually using 'monitor setbp'.

    In which cases is it not possible?
    However, you can use the normal "break" command. I do not see why flash breakpoints should not work in your case.

    is there a Jlink command that will list my current hardware breakpoints?

    [Windows host system only] All Breakpoint which were set using J-Link are listed in the J-Link Control Panel tab "Breakpoints".


    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • > In which cases is it not possible?

    Let's say you want to set a breakpoint in a kernel driver init function, and you want to set it before the kernel boots. But, before the kernel boots, the MMU is not set up so GDB/JLINK complains that it cannot read/access those 'virtual' address. So, you have to set the HW breakpoint manually using monitor setbp.

    > I do not see why flash breakpoints should not work in your case.
    The RZ/A1 devices does not have internal Flash. It fetches instructions from an external SPI flash. Further, the SPI flash interface is set up in a special XIP (Execute in place) mode in order to allow the CPU to do direct fetches from it. Therefore, you have to use 'hbreak' to tell GDB to explicitly only use the HW breakpoints in Coresight because re-writting flash is not an option.

    > [Windows host system only] All Breakpoint which were set using J-Link are listed in the J-Link Control Panel tab "Breakpoints".
    OK, so I'm out of luck for Linxu host debugging.

    Thank you.
  • Hi Chris,

    OK, so I'm out of luck for Linxu host debugging.

    Unfortunately, there is no Linux / OSX version of the J-Link Control Panel for now.
    We are currently working at shifting all our software products to multi platform, but there is still a lot of work to be done.

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.