Author Topic: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.  (Read 76318 times)

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #30 on: October 09, 2011, 09:54:36 am »
@obf, I found a tiny bug.

When I try to run a gdb command in the command edit control which is in the bottom of the debugger/debugger log panel. I found that some times, I will lose the focus, but some times I still get the focus in the edit control.

Here is a test program:
Code
int main()
{
    int a = 0;
    a++;
    a=3;
    ;
}
The, I set a breakpoint in the line 3.

CASE one (good case) :
I just run the command "p a", then gdb will show its value, this way, I still get the focus, so I can still press the keyboard, and enter other command again.

CASE two (bad case):
Enter the command "p b". Note, b is not defined in the context, so gdb will complain:
Code
> p a
$6 = 1
> p b
No symbol "b" in current context.
But after that, I loss my edit focus.

I just test under WinXP. Can someone reproduce this bug?
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #31 on: October 09, 2011, 12:52:50 pm »
ollydbg: Can reproduce on linux.
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #32 on: October 23, 2011, 08:12:19 pm »
C::B debugger's branch, latest revision, Windows 7 / 64 bit, TDM GCC 64 bit compiler suite.

When I compile a simple wxWidgets based "Hello World" app (wxWidgets 2.9.2, compiled for 64 bit) whenever I start the debugger, C::B stalls. The stop / pause button does not work, the debugger it becomes in-responsible until I kill the gdb process.

The reason seems the following:
In the debugger's debug log I see:

Command-line: C:\Devel\GCC46TDM\bin\gdb.exe -nx -fullname  -quiet -args C:/Code/CodeBlocks_Projects/HelloWorld/HelloWorld_64.exe
Working dir : C:\Code\CodeBlocks_Projects\HelloWorld
> set prompt >>>>>>cb_gdb:
"c:\code\codeblocks_projects\helloworld\HelloWorld_64.exe": not in executable format: File format not recognized
(gdb) >>>>>>cb_gdb:

...later on:

> run
No executable specified, use `target exec'.


It seems GDB is waiting for an input here. :-(

I know (meanwhile) that TDM's 64 bit compiler suite ships with a debugger not valid for 64 bit, however, the freeze shouldn't happen. Did somebody else experience the same?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #33 on: October 23, 2011, 11:01:55 pm »
I get a similar issue on linux, if the executable does not exist and "autobuold to ensure project is up to date" (or how it is called exactly) is unchecked.
gdb hangs and can not be stopped with pause- or stop-button:
Code
> run
No executable file specified.
Use the "file" or "exec-file" command.
>>>>>>cb_gdb:
Code::Blocks is trying to interrupt process with pid: 23917; child pid: 0 gdb pid: 23917
Quit
>>>>>>cb_gdb:
Code::Blocks is trying to interrupt process with pid: 23917; child pid: 0 gdb pid: 23917
Quit
>>>>>>cb_gdb:
First try was pause, second was stop.

In trunk stopping gdb works.

23917 is the pid of gdb and killing it from commandline with default signal (TERM [15]) works.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #34 on: October 23, 2011, 11:32:15 pm »
As I've said to Morten on PM, I'll look in to the problem (not sure when, because I have some other things to do at the moment).
Stopping doesn't work, because C::B is sending SIGINT to the child of gdb, not to gdb directly.
I'll look in to this, too, it is on the TODO, thanks for the test case.
(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!]

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #35 on: October 30, 2011, 02:58:00 am »
@obf, Is it possible to use a macro in the below edit dialog?

see the image:


Thanks.

BTW:
For those who use a more recent gcc (like gcc 4.5, 4.6, or 4.7), you may experience a very annoying debug experience when you debugger leave the scope, you will jump to some line of your local variable declaration.

See:
Why running the next command will jump back to the previous line positio and the following posts. It looks like its a bug in GCC Bug 49951 – [4.5/4.6/4.7 Regression] Debug stepping behavior regarding g++ Class destructor has changed for the worse starting at gcc 4.5.0.

As a result, I'm returning to use a mingw gcc 4.4.5 version again. :D
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.

Offline Oleg_Sam

  • Multiple posting newcomer
  • *
  • Posts: 30

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #37 on: October 31, 2011, 10:34:10 am »
As a result, I'm returning to use a mingw gcc 4.4.5 version again. :D
It is not that bad, sometimes it could be useful :)

I know about the patch, but I've not tested it yet.
(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!]

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #38 on: October 31, 2011, 11:39:30 am »
I know about the patch, but I've not tested it yet.
what does this sentence means???

As a result, I'm returning to use a mingw gcc 4.4.5 version again. :D
It is not that bad, sometimes it could be useful :)
If we use gdb command line, then it is not bad, but if the caret jump wildly in your c::b editor, it is too bad. :D
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #39 on: October 31, 2011, 12:30:19 pm »
what does this sentence means???
It is an answer to Oleg_Sam's post.
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #40 on: November 12, 2011, 02:14:06 am »
Morten, Jens: The "No executable file specified." should be fixed in r7585. Please test.
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #41 on: November 12, 2011, 11:35:15 am »
@obf, Is it possible to use a macro in the below edit dialog?
In r7586, you can now :)
Thank you Oleg_Sam.
(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!]

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #42 on: November 13, 2011, 02:58:34 am »
@obf, Is it possible to use a macro in the below edit dialog?
In r7586, you can now :)
Thank you Oleg_Sam.
Thank you obf and oleg_sam!!!
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #43 on: November 15, 2011, 07:51:47 am »
Morten, Jens: The "No executable file specified." should be fixed in r7585. Please test.
Sorry for the late reply.
Stoping gdb works now (only tested on linux).

Offline playxiaobaicai

  • Single posting newcomer
  • *
  • Posts: 5
Re: The 17 September 2011 build (7452) DEBUGGER BRANCH version is out.
« Reply #44 on: January 08, 2012, 05:05:44 pm »
Thank you killerbot!