Author Topic: Debugger Hanging  (Read 3818 times)

Offline sorinev

  • Multiple posting newcomer
  • *
  • Posts: 61
Debugger Hanging
« on: December 22, 2013, 12:04:17 am »
I have a small C project where when I get to my breakpoint, the entire program becomes non-responsive, debugger and all. At first I thought maybe it was the most recent build (9492, I build from source), but it's showing the exact same behavior in 12.11 also. Is there anything I can do to find out why it becomes permanently non-responsive? I mean if it was crashing that's one thing, but it's going "Not Responding." Windows 7 64-bit.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugger Hanging
« Reply #1 on: December 22, 2013, 12:49:17 am »
Does this happen for a hello world project?
Do you have the local variables and function arguments enabled. Does it work if you disable them?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sorinev

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Debugger Hanging
« Reply #2 on: December 22, 2013, 01:32:08 am »
I haven't tried with a hello world program, but it does still do it with locals and function args turned off after I add the array I need watched. Maybe it doesn't like the array being 32768 elements.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugger Hanging
« Reply #3 on: December 22, 2013, 02:48:19 am »
You've not mentioned that you have a watch for an array... This is known to be slow, don't do it, just inspect the part of the array you're interested in.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sorinev

  • Multiple posting newcomer
  • *
  • Posts: 61
Re: Debugger Hanging
« Reply #4 on: December 22, 2013, 03:28:20 am »
That's exactly what I was trying to do, only watch a small portion (about 6-8 elements). But as soon as I clicked on the watch window to add a new line (the small portion), it stopped responding. I think it may be because that array was a local, so it was already in the watch window under that section.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Debugger Hanging
« Reply #5 on: December 22, 2013, 08:47:55 am »
1, you can limit GDB to show the element size, the command I use is:
Code
set print elements 200

2, you can debug the same program in the Windows Command Line, and show us the log messages. Maybe your variable is un-initialized, we have discussed already about un-initialized local variables issues in our forum.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.