Crosswind Debugger Weirdness - VxWorks

This is a discussion on Crosswind Debugger Weirdness - VxWorks ; Hello, I am using VxWorks 5.5 (Tornado etc etc). My target is an MCP750 and I am updating some legacy applications ... My problem is that as I was using the debugger I noticed that the as I stepped through ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Crosswind Debugger Weirdness

  1. Crosswind Debugger Weirdness

    Hello,

    I am using VxWorks 5.5 (Tornado etc etc). My target is an MCP750 and I
    am updating some legacy applications ...

    My problem is that as I was using the debugger I noticed that the as I
    stepped through the code the pointer to the current code location
    seemed to be jumping around (I am not in a loop). The debugger is
    behaving in a strange manner.

    Let me explain this more clearly:

    As I step through the code with a debugger I expect the current
    instruction pointer to advance accordingly (step wise). Well after
    debugging and advancing a few steps, as I click NEXT the pointer goes
    into a function as I expect, but when it returns it a few instructions
    BEFORE the instruction it stepped into ... a few more clicks and I see
    this weirdness again ... the instruction pointer seems to be bouncing
    around randomly (it may be happening when it returns from a function
    call ... it is late and I can't remember).

    I build the object files with:

    CFLAGS = -mstrict-align -fvolatile -fno-builtin -Wall

    I am puzzled by this strange behavior ... any ideas?

    Thanks!
    Xav

  2. Re: Crosswind Debugger Weirdness

    xamalek@yahoo.com wrote:
    > Hello,
    >
    > I am using VxWorks 5.5 (Tornado etc etc). My target is an MCP750 and I
    > am updating some legacy applications ...
    >
    > My problem is that as I was using the debugger I noticed that the as I
    > stepped through the code the pointer to the current code location
    > seemed to be jumping around (I am not in a loop). The debugger is
    > behaving in a strange manner.
    >
    > Let me explain this more clearly:
    >
    > As I step through the code with a debugger I expect the current
    > instruction pointer to advance accordingly (step wise). Well after
    > debugging and advancing a few steps, as I click NEXT the pointer goes
    > into a function as I expect, but when it returns it a few instructions
    > BEFORE the instruction it stepped into ... a few more clicks and I see
    > this weirdness again ... the instruction pointer seems to be bouncing
    > around randomly (it may be happening when it returns from a function
    > call ... it is late and I can't remember).
    >
    > I build the object files with:
    >
    > CFLAGS = -mstrict-align -fvolatile -fno-builtin -Wall
    >
    > I am puzzled by this strange behavior ... any ideas?


    Sure! If the compiler's optimizer sees an advantage to shorten the code
    by moving it around, relative to the sequence of source code, it'll do
    that. I'm working with debugging info right now, and we see that
    sometimes. Am I saying this well? The generated code may now flow
    down the screen in the same sequence as the source code. The compiler
    may reorder its sequence.


    >
    > Thanks!
    > Xav


  3. Re: Crosswind Debugger Weirdness

    How can I prevent the debugger from behaving in an unexpected manner?
    After all I am trying to debug. One other thing, it would not let me
    print the values of variables. It was complaining about the context or
    something of the sort ...

    On Mar 22, 8:03 am, Bill Cox wrote:
    > xama...@yahoo.com wrote:
    > > Hello,

    >
    > > I am using VxWorks 5.5 (Tornado etc etc). My target is an MCP750 and I
    > > am updating some legacy applications ...

    >
    > > My problem is that as I was using the debugger I noticed that the as I
    > > stepped through the code the pointer to the current code location
    > > seemed to be jumping around (I am not in a loop). The debugger is
    > > behaving in a strange manner.

    >
    > > Let me explain this more clearly:

    >
    > > As I step through the code with a debugger I expect the current
    > > instruction pointer to advance accordingly (step wise). Well after
    > > debugging and advancing a few steps, as I click NEXT the pointer goes
    > > into a function as I expect, but when it returns it a few instructions
    > > BEFORE the instruction it stepped into ... a few more clicks and I see
    > > this weirdness again ... the instruction pointer seems to be bouncing
    > > around randomly (it may be happening when it returns from a function
    > > call ... it is late and I can't remember).

    >
    > > I build the object files with:

    >
    > > CFLAGS = -mstrict-align -fvolatile -fno-builtin -Wall

    >
    > > I am puzzled by this strange behavior ... any ideas?

    >
    > Sure! If the compiler's optimizer sees an advantage to shorten the code
    > by moving it around, relative to the sequence of source code, it'll do
    > that. I'm working with debugging info right now, and we see that
    > sometimes. Am I saying this well? The generated code may now flow
    > down the screen in the same sequence as the source code. The compiler
    > may reorder its sequence.
    >
    >
    >
    > > Thanks!
    > > Xav



  4. Re: Crosswind Debugger Weirdness

    I think I fixed it. I enabled the Symbol Table Synchronization (added
    a few #defines in configAll.h and clicked the sync symbols button when
    starting the target server) and also made sure that the board could
    see the WIND_REGISTRY server on the network (hostAdd abc, xyz AND
    routeAdd def, efg) ... and things seem to be fine ...

    On Mar 22, 2:09 am, xama...@yahoo.com wrote:
    > Hello,
    >
    > I am using VxWorks 5.5 (Tornado etc etc). My target is an MCP750 and I
    > am updating some legacy applications ...
    >
    > My problem is that as I was using the debugger I noticed that the as I
    > stepped through the code the pointer to the current code location
    > seemed to be jumping around (I am not in a loop). The debugger is
    > behaving in a strange manner.
    >
    > Let me explain this more clearly:
    >
    > As I step through the code with a debugger I expect the current
    > instruction pointer to advance accordingly (step wise). Well after
    > debugging and advancing a few steps, as I click NEXT the pointer goes
    > into a function as I expect, but when it returns it a few instructions
    > BEFORE the instruction it stepped into ... a few more clicks and I see
    > this weirdness again ... the instruction pointer seems to be bouncing
    > around randomly (it may be happening when it returns from a function
    > call ... it is late and I can't remember).
    >
    > I build the object files with:
    >
    > CFLAGS = -mstrict-align -fvolatile -fno-builtin -Wall
    >
    > I am puzzled by this strange behavior ... any ideas?
    >
    > Thanks!
    > Xav



+ Reply to Thread