Results 1 to 4 of 4

Thread: "Bad Address" shown for passed in arguments

  1. #1
    Junior Member
    Join Date
    Dec 2007
    Posts
    13

    "Bad Address" shown for passed in arguments

    I was stepping through some code and into a routine that was being passed 3 "float *" arguments. Upon entry into the function the stack frame display(?) showed the 3 arguments as having a "Bad address". I had examined the 3 arguments from the caller and everything was fine.

    Just to double check things I went ahead and put in a printf with the 3 arguments and printed out their addresses. All were fine. Why did TotalView show "bad address" for them?

    Thanks.

    Les

  2. #2

    Re: [lhartzman] "Bad Address" shown for passed in arguments

    Lee,

    I see you've put in a few questions, so I don't know what order you may be seeing these in. I just replied to one about missing local variables with a guess you are debugging code that was compiled with optimization. That may well explain the 'bad addresses' that you see while debugging. Although the printing of the addresses and them showing as okay sounds a bit odd with that explanation. If it's not optimization, we are likely receiving bad debug information from the compiler, or mis-interpreting the debug info we see. Which compiler are you using?
    Pete Thompson
    TotalView Customer Services

  3. #3
    Junior Member
    Join Date
    Dec 2007
    Posts
    13

    Re: [Peter-TotalView-Tech] "Bad Address" shown for passed in arguments

    Pete,

    I'm using the Intel C/C++ compiler, version 9.0. The 2 flags I'm using are -g and -xW (for P4 -specific code). The -xW flag seems to pull in some additional libraries that aren't linked in otherwise.

    Les

  4. #4
    Junior Member
    Join Date
    Dec 2007
    Posts
    13

    Re: [lhartzman] "Bad Address" shown for passed in arguments

    I've rebuilt without the -xW optiion (had to add in an extra library to the link stage). The "bad address" is now gone. I think I've also now got more local variables visible in the stack frame pane.

    Les

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •