breakpoints in global variables - VxWorks

This is a discussion on breakpoints in global variables - VxWorks ; Hi, I am encountering some problem with change in the global variables during code execution. Its very difficult to trace the location thru code review. Is there a way in Vxworks where I can set breakpoint for the global variable, ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: breakpoints in global variables

  1. breakpoints in global variables

    Hi,
    I am encountering some problem with change in the global variables
    during code execution.
    Its very difficult to trace the location thru code review.

    Is there a way in Vxworks where I can set breakpoint for the global
    variable, so that every time it changes, the exceution would stop and
    then I can continue from that point onwards .
    PS : The global variable is a structure.

    Thanks !!


  2. Re: breakpoints in global variables

    Hello fsm1612,

    fsm1612@gmail.com schrieb:
    > Hi,
    > I am encountering some problem with change in the global variables
    > during code execution.
    > Its very difficult to trace the location thru code review.
    >
    > Is there a way in Vxworks where I can set breakpoint for the global
    > variable, so that every time it changes, the exceution would stop and
    > then I can continue from that point onwards .
    > PS : The global variable is a structure.


    Yes, there is, but this is independant from the RTOS. The solution is to
    set an "access beakpoint" via a hardware debugger. So if you have a link
    to the target via a hadware debugger, like JTAG, ONCE, BDM or such, then
    you have the chance that this debugger supports an "access breakpoint",
    where you can set a breakpoint on a read access of the CPU to a specific
    address(-range).
    But not every target family or target board supports that, unfortunately.

    Hope it helped.

    --
    BaSystem Martin Raabe
    E: Martin.RaabeB-a-S-y-s-t-e-mde

  3. Re: breakpoints in global variables

    Martin Raabe wrote:

    >Hello fsm1612,
    >
    >fsm1612@gmail.com schrieb:
    >> Hi,
    >> I am encountering some problem with change in the global variables
    >> during code execution.
    >> Its very difficult to trace the location thru code review.
    >>
    >> Is there a way in Vxworks where I can set breakpoint for the global
    >> variable, so that every time it changes, the exceution would stop and
    >> then I can continue from that point onwards .
    >> PS : The global variable is a structure.

    >
    >Yes, there is, but this is independant from the RTOS. The solution is to
    >set an "access beakpoint" via a hardware debugger. So if you have a link
    >to the target via a hadware debugger, like JTAG, ONCE, BDM or such, then
    >you have the chance that this debugger supports an "access breakpoint",
    >where you can set a breakpoint on a read access of the CPU to a specific
    >address(-range).
    >But not every target family or target board supports that, unfortunately.
    >
    >Hope it helped.


    I got the impression that by "in Vxworks" the OP meant using Tornado/GDB
    which, unless I've missed it so far, does not support data access
    breakpointing.

    --
    ================================================== ======================
    Michael Kesti | "And like, one and one don't make
    | two, one and one make one."
    mrkesti at hotmail dot com | - The Who, Bargain

  4. Re: breakpoints in global variables

    Hello Michael,

    Michael R. Kesti schrieb:
    >
    > I got the impression that by "in Vxworks" the OP meant using Tornado/GDB
    > which, unless I've missed it so far, does not support data access
    > breakpointing.


    Might be, but it also could be the original poster (OP) could have the
    SDS singleStep or Vision Click or ... Debugger, which are capable or at
    least extendable to work with "hardware assisted debugging technologies".
    So I just wanted to make the view wide.
    And:
    Yes, you are right the GDB coming with Tornaod does not support that
    scenario.


    --
    BaSystem Martin Raabe
    E: Martin.RaabeB-a-S-y-s-t-e-mde

  5. Re: breakpoints in global variables

    On May 18, 9:47 am, fsm1...@gmail.com wrote:
    > Hi,
    > I am encountering some problem with change in the global variables
    > during code execution.
    > Its very difficult to trace the location thru code review.
    >
    > Is there a way in Vxworks where I can set breakpoint for the global
    > variable, so that every time it changes, the exceution would stop and
    > then I can continue from that point onwards .
    > PS : The global variable is a structure.
    >
    > Thanks !!


    you can do it by setting hardware breakpoints in the code using
    supported hardware like ICE/probe.
    It will stop the execution that points and you have to single step/
    give run command again.
    but if you have more than no of supported hardware breakpoint( about 4
    hardware breakpoints) then its problem,then you have to use software
    brekpoint which may not give you perfect result.


    And for debugging JTAG& OCD is the best,when u are using hardware
    breakpoint.


  6. Re: breakpoints in global variables

    On May 17, 11:47 pm, fsm1...@gmail.com wrote:
    > Hi,
    > I am encountering some problem with change in the global variables
    > during code execution.
    > Its very difficult to trace the location thru code review.
    >
    > Is there a way in Vxworks where I can set breakpoint for the global
    > variable, so that every time it changes, the exceution would stop and
    > then I can continue from that point onwards .
    > PS : The global variable is a structure.
    >
    > Thanks !!


    The method someones have mention above always need hardware support.
    Some CPUs support hardware breakpoint like PPC 860 but not all. So
    here I give a method by using the software debug.You can use the task
    switch hook. In the hook you can check whether the global variable
    changed or not. if it change you can record the PC and LR register of
    the previous task. And then you will konw which task and which
    function change the variable.Holp it helped.


  7. Re: breakpoints in global variables


    rtentry@hotmail.com wrote:
    > On May 17, 11:47 pm, fsm1...@gmail.com wrote:
    > > Hi,
    > > I am encountering some problem with change in the global variables
    > > during code execution.
    > > Its very difficult to trace the location thru code review.
    > >
    > > Is there a way in Vxworks where I can set breakpoint for the global
    > > variable, so that every time it changes, the exceution would stop and
    > > then I can continue from that point onwards .
    > > PS : The global variable is a structure.
    > >
    > > Thanks !!

    >
    > The method someones have mention above always need hardware support.
    > Some CPUs support hardware breakpoint like PPC 860 but not all. So
    > here I give a method by using the software debug.You can use the task
    > switch hook. In the hook you can check whether the global variable
    > changed or not. if it change you can record the PC and LR register of
    > the previous task. And then you will konw which task and which
    > function change the variable.Holp it helped.



    yes,thats another effective way when hardware breakpoint is not
    supported.
    But the disadvantage is that we can't get particular function call
    within a task changing the variable.


  8. Re: breakpoints in global variables


    rtentry@hotmail.com wrote:
    > On May 17, 11:47 pm, fsm1...@gmail.com wrote:
    > > Hi,
    > > I am encountering some problem with change in the global variables
    > > during code execution.
    > > Its very difficult to trace the location thru code review.
    > >
    > > Is there a way in Vxworks where I can set breakpoint for the global
    > > variable, so that every time it changes, the exceution would stop and
    > > then I can continue from that point onwards .
    > > PS : The global variable is a structure.
    > >
    > > Thanks !!

    >
    > The method someones have mention above always need hardware support.
    > Some CPUs support hardware breakpoint like PPC 860 but not all. So
    > here I give a method by using the software debug.You can use the task
    > switch hook. In the hook you can check whether the global variable
    > changed or not. if it change you can record the PC and LR register of
    > the previous task. And then you will konw which task and which
    > function change the variable.Holp it helped.



    yes,thats another effective way when hardware breakpoint is not
    supported.
    But the disadvantage is that we can't get particular function call
    within a task changing the variable.


  9. Re: breakpoints in global variables


    rtentry@hotmail.com wrote:
    > On May 17, 11:47 pm, fsm1...@gmail.com wrote:
    > > Hi,
    > > I am encountering some problem with change in the global variables
    > > during code execution.
    > > Its very difficult to trace the location thru code review.
    > >
    > > Is there a way in Vxworks where I can set breakpoint for the global
    > > variable, so that every time it changes, the exceution would stop and
    > > then I can continue from that point onwards .
    > > PS : The global variable is a structure.
    > >
    > > Thanks !!

    >
    > The method someones have mention above always need hardware support.
    > Some CPUs support hardware breakpoint like PPC 860 but not all. So
    > here I give a method by using the software debug.You can use the task
    > switch hook. In the hook you can check whether the global variable
    > changed or not. if it change you can record the PC and LR register of
    > the previous task. And then you will konw which task and which
    > function change the variable.Holp it helped.



    yes,thats another effective way when hardware breakpoint is not
    supported.
    But the disadvantage is that we can't get particular function call
    within a task changing the variable.


  10. Re: breakpoints in global variables


    rtentry@hotmail.com wrote:
    > On May 17, 11:47 pm, fsm1...@gmail.com wrote:
    > > Hi,
    > > I am encountering some problem with change in the global variables
    > > during code execution.
    > > Its very difficult to trace the location thru code review.
    > >
    > > Is there a way in Vxworks where I can set breakpoint for the global
    > > variable, so that every time it changes, the exceution would stop and
    > > then I can continue from that point onwards .
    > > PS : The global variable is a structure.
    > >
    > > Thanks !!

    >
    > The method someones have mention above always need hardware support.
    > Some CPUs support hardware breakpoint like PPC 860 but not all. So
    > here I give a method by using the software debug.You can use the task
    > switch hook. In the hook you can check whether the global variable
    > changed or not. if it change you can record the PC and LR register of
    > the previous task. And then you will konw which task and which
    > function change the variable.Holp it helped.



    yes,thats another effective way when hardware breakpoint is not
    supported.
    But the disadvantage is that we can't get particular function call
    within a task changing the variable.


  11. Re: breakpoints in global variables


    rtentry@hotmail.com wrote:
    > On May 17, 11:47 pm, fsm1...@gmail.com wrote:
    > > Hi,
    > > I am encountering some problem with change in the global variables
    > > during code execution.
    > > Its very difficult to trace the location thru code review.
    > >
    > > Is there a way in Vxworks where I can set breakpoint for the global
    > > variable, so that every time it changes, the exceution would stop and
    > > then I can continue from that point onwards .
    > > PS : The global variable is a structure.
    > >
    > > Thanks !!

    >
    > The method someones have mention above always need hardware support.
    > Some CPUs support hardware breakpoint like PPC 860 but not all. So
    > here I give a method by using the software debug.You can use the task
    > switch hook. In the hook you can check whether the global variable
    > changed or not. if it change you can record the PC and LR register of
    > the previous task. And then you will konw which task and which
    > function change the variable.Holp it helped.



    yes,thats another effective way when hardware breakpoint is not
    supported.
    But the disadvantage is that we can't get particular function call
    within a task changing the variable.


+ Reply to Thread