Thread: Debuggers, how to use?

  1. #16
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Hmm thanks for the basic information, maybe i'll research it someday, right now i'm getting ready to really buckle down into opengl programming.

  2. #17
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    If your embedded target is running Windows CE, you can connect to the target using Platform Builder, and run the application in the target through the Embedded VC++ debugger, takes a bit of fiddling to get it working, but once it is, it is just like debugging a local application.
    I've seen Windows CE in action and it looks quite good, but we're using OS9000 and having to deal with a device consisting of a number of subdevices which each have their own processor. We're using an I2C tracer and terminal to do debugging in some way, but unfortenately we can't do things like single stepping and that sort of usefull things.

    One thread might be reading an array whilst another writes to it and that sort of thing.
    Such can usually be solved using semaphores, but also semaphores can lead to problems if they're not applied correctly. An even more harder to debug problem with multithreading is timing.

  3. #18
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343
    ok, we are totallyoff-topic here.

    i cant use MSVC++, as much as i want to, i cant, my comp is too slow and too small
    heres my comp stats:
    Speed: 200mgz
    Space: 2GB
    Space left: 400MB

    and thats it. i cant have MSVC++ on there becuase it takes like, 400MB.

    once i get winXP with my new comp, ill get it ASAP, but i still think BSDC++ is still an awsome beginners compiler.

    there are a few things that bug me with MSVC++, the fact that when i compile a project, it gives me the total errors, and doesn;t tell me what lines or problems it has come up with. (maybe it does but i cant find it) and BSDC++ does, immediatly.

    as for a debugger, i still have no clue how to use it, how many people here have BSDC++?
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  4. #19
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    798
    >>there are a few things that bug me with MSVC++, the fact that when i compile a project, it gives me the total errors, and doesn;t tell me what lines or problems it has come up with.<<

    You sure? Mine does

  5. #20
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    enlarge your error window or scroll up in it, the errors are listed you just don't see them cuz the window is too small and u see the end of the compile attempt.

    Double click an error and it takes u right to it.

  6. #21
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343
    same thing with bloodshed, except it actually shows you without attempting to hide it then.

    anyway, this still doesn;t help me with any debuggers!
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  7. #22
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    ok, if you want to use a debugger and get the most out of it you need to learn assembly. Otherwise it's pretty much pointless, even if you were able to use msvc. That's about all the advice I can give you, other than learning what some of the error codes mean (pBlock->inUse usually means you deleted something without using new ) Good luck.
    PHP and XML
    Let's talk about SAX

  8. #23
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343
    why would i need to learn another language...just to use a debugger! thats plain retarded!
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  9. #24
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    >>ok, if you want to use a debugger and get the most out of it you need to learn assembly. Otherwise it's pretty much pointless, even if you were able to use msvc

    No its not.


    You can still watch the contents of variables, how if / switch statements ect are executing or where values are changing. You can use conditional break points, the call stack and a whole range of other tools.
    I use it every time I have a bug.

    Sounds like you just don't know how to use one Waldo2k2.

    Else use MessageBox'es and GetLastError() to tell you when things go wrong.

    Code:
    if(!Win32_Function_Returns_Success())
    {
         iError=GetLastError();
         sprintf(sBuffer," Win32_Function_Returns_Success in One_Of_My_Functions failed with error#%d.",iError);
          MessageBox(hWnd,sBuffer, "App Error",MB_ICONERROR);
          return FALSE;
    }
    To learn, just put a break point at the begining of your app and then use the 'step' (F10 in MSVC) to move on one line at a time.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  10. #25
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    http://www.gnu.org/manual/gdb-4.17/gdb.html
    You can also get information when inside gdb by help.
    Useful commands are step, break, up, print, next, list.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GUI debuggers
    By nipun in forum Linux Programming
    Replies: 1
    Last Post: 03-26-2006, 01:11 PM
  2. Stupid question: What does Debugger do?
    By napkin111 in forum C++ Programming
    Replies: 6
    Last Post: 05-02-2002, 10:00 PM
  3. Debuggers
    By rip1968 in forum C++ Programming
    Replies: 5
    Last Post: 04-19-2002, 06:00 PM
  4. What are some good debuggers?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 04-01-2002, 08:36 AM
  5. Low level debuggers
    By Korn1699 in forum C++ Programming
    Replies: 8
    Last Post: 03-27-2002, 01:39 PM