Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. pointer break points

pointer break points

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiodata-structurestutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    minkowski
    wrote on last edited by
    #1

    Hello, If I have the following code, #include <iostream> int main() { int y = 6; int *ptr; ptr = &y; int x = 7; ptr = &x; x = 8; std::cout << "hi"; std::cout << "hello"; return 0; } is there a way to somehow change the break point properties so that it will stop where ptr changes from &y to &x ? The reason I wish to know this is lets say I have a massive call stack and somewhere in there my pointer is modified, I wish to locate this position in the stack then by setting a break point where the properties of my pointer change. The platform I am using is visual studio .NET. I believe it is possible to do this in visual studion 6 C++ but I am unsure how to do this in visual studio .NET. Thanks for any input.

    T 1 Reply Last reply
    0
    • M minkowski

      Hello, If I have the following code, #include <iostream> int main() { int y = 6; int *ptr; ptr = &y; int x = 7; ptr = &x; x = 8; std::cout << "hi"; std::cout << "hello"; return 0; } is there a way to somehow change the break point properties so that it will stop where ptr changes from &y to &x ? The reason I wish to know this is lets say I have a massive call stack and somewhere in there my pointer is modified, I wish to locate this position in the stack then by setting a break point where the properties of my pointer change. The platform I am using is visual studio .NET. I believe it is possible to do this in visual studion 6 C++ but I am unsure how to do this in visual studio .NET. Thanks for any input.

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      yes, place a "conditional breakpoint" instead. on that breapoint, check it's breaking condition, and add the values to test...

      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups