Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Slowdown of the response from the command line?
@ 2010-02-26 16:48 asm warrior
  2010-02-26 22:12 ` Tom Tromey
  0 siblings, 1 reply; 9+ messages in thread
From: asm warrior @ 2010-02-26 16:48 UTC (permalink / raw)
  To: gdb

Hi, all.
I have just find a noticeable time delay when I enter a command line.
I'm debugging a DLL file under Windows, using
http://sourceforge.net/projects/mingw/files/GNU%20Source-Level%20Debugger/GDB-7.0.50.20100202/gdb-7.0.50.20100202-mingw32-bin.tar.gz/download

When I try to view the wxString value in a DLL, I entered this command to GDB

output /c m_Str.m_pchData[0]@((wxStringData*)m_Str.m_pchData - 1)->nDataLength

But it takes several seconds to give the answer returned from GDB.

I built the latest snapshot of
branch/gdb-weekly-7.0.90.20100223.tar.bz2 and
current/gdb-7.1.50.20100223, but the delay still exists.

In fact, this delay does *not* exist before, at least in the
http://sourceforge.net/projects/mingw/files/GNU%20Source-Level%20Debugger/GDB-7.0.1/gdb-7.0.1-mingw32-bin.tar.gz/download,
which is release in 20100107, In this version, the response from GDB
is really fast.

I have check the commit log from 20100107 to 20100202, I personally
suspect there's regression in the CLI of handing command input
c_expression.
Also, I have create a bug report here :
http://sourceware.org/bugzilla/show_bug.cgi?id=11316

Does anyone experience this time delay? Thanks


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Slowdown of the response from the command line?
  2010-02-26 16:48 Slowdown of the response from the command line? asm warrior
@ 2010-02-26 22:12 ` Tom Tromey
  2010-03-04  7:24   ` Asm_gmail
  0 siblings, 1 reply; 9+ messages in thread
From: Tom Tromey @ 2010-02-26 22:12 UTC (permalink / raw)
  To: asm warrior; +Cc: gdb

>>>>> ">" == asm warrior <asmwarrior@gmail.com> writes:

>> When I try to view the wxString value in a DLL, I entered this command to GDB
>> output /c m_Str.m_pchData[0]@((wxStringData*)m_Str.m_pchData - 1)->nDataLength

>> Also, I have create a bug report here :
>> http://sourceware.org/bugzilla/show_bug.cgi?id=11316
>> Does anyone experience this time delay? Thanks

I haven't noticed it, but I think the best way to find it is to profile.

I think you can build a -pg gdb and use maint set profile to profile a
single command, though I have not tried this in a long time.

Tom


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Slowdown of the response from the command line?
  2010-02-26 22:12 ` Tom Tromey
@ 2010-03-04  7:24   ` Asm_gmail
  2010-03-04 11:21     ` Chris Sutcliffe
  2010-03-04 18:43     ` Tom Tromey
  0 siblings, 2 replies; 9+ messages in thread
From: Asm_gmail @ 2010-03-04  7:24 UTC (permalink / raw)
  To: tromey; +Cc: gdb

On 2010-2-27 1:30, Tom Tromey wrote:
> I haven't noticed it, but I think the best way to find it is to profile.
> I think you can build a -pg gdb and use maint set profile to profile a
> single command, though I have not tried this in a long time.
>
> Tom
>    

Hi, Tom, thanks for your reply.
For me, I only work under Windows till now, so I don't know how to debug 
or profile gdb under Windows.

Today, I have download the latest snapshot of gdb from:
ftp://sourceware.org/pub/gdb/snapshots/current/gdb-7.1.50.20100304.tar.bz2
And I build gdb.exe(I use TDM GCC 4.4.1 mingw32 on windowsXP) with expat 
enabled. Too bad, I even can't start debugging, when I start debugging, 
I always get the gdb.exe crashed.

If I can remember, the gdb.exe built from snapshot of 20100302, 20100301 
always get crashed on startup either.

just like Chris Sutcliffe's post in
http://sourceware.org/ml/gdb/2010-01/msg00189.html and
http://sourceware.org/ml/gdb/2010-01/msg00190.html, he has encountered 
the same problem as me in both mingw64 and mingw32.

I would prefer some gdb gurus can help. Thanks.

Asmwarrior




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Slowdown of the response from the command line?
  2010-03-04  7:24   ` Asm_gmail
@ 2010-03-04 11:21     ` Chris Sutcliffe
  2010-03-04 12:01       ` asm warrior
                         ` (2 more replies)
  2010-03-04 18:43     ` Tom Tromey
  1 sibling, 3 replies; 9+ messages in thread
From: Chris Sutcliffe @ 2010-03-04 11:21 UTC (permalink / raw)
  To: gdb

Hi Asmwarrior,

> Today, I have download the latest snapshot of gdb from:
> ftp://sourceware.org/pub/gdb/snapshots/current/gdb-7.1.50.20100304.tar.bz2
> And I build gdb.exe(I use TDM GCC 4.4.1 mingw32 on windowsXP) with expat
> enabled. Too bad, I even can't start debugging, when I start debugging, I
> always get the gdb.exe crashed.

I'd recommend one of the 7.0.90.xxxx sources:

ftp://sourceware.org/pub/gdb/snapshots/branch/

I've been using them to try and get Python working for MinGW.

> If I can remember, the gdb.exe built from snapshot of 20100302, 20100301
> always get crashed on startup either.

What do you see when gdb crashes?

> I would prefer some gdb gurus can help. Thanks.

I'm no guru by any means, but in order to create a profiling gdb one
way is to specify CFLAGS at configuration time:

$ CFLAGS="-pg" ../configure ....

Once you have a gdb binary with profiling enabled, it should produce a
profile file (a.out if memory serves), which you can then view using
'gprof a.out'.

Cheers!

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Slowdown of the response from the command line?
  2010-03-04 11:21     ` Chris Sutcliffe
@ 2010-03-04 12:01       ` asm warrior
  2010-03-04 14:12       ` asm warrior
  2010-03-05  2:45       ` Asm_gmail
  2 siblings, 0 replies; 9+ messages in thread
From: asm warrior @ 2010-03-04 12:01 UTC (permalink / raw)
  To: Chris Sutcliffe; +Cc: gdb

On Thu, Mar 4, 2010 at 7:21 PM, Chris Sutcliffe <ir0nh34d@gmail.com> wrote:
> Hi Asmwarrior,
>
>> Today, I have download the latest snapshot of gdb from:
>> ftp://sourceware.org/pub/gdb/snapshots/current/gdb-7.1.50.20100304.tar.bz2
>> And I build gdb.exe(I use TDM GCC 4.4.1 mingw32 on windowsXP) with expat
>> enabled. Too bad, I even can't start debugging, when I start debugging, I
>> always get the gdb.exe crashed.
>
> I'd recommend one of the 7.0.90.xxxx sources:

Thanks, ironhead, I will try it right now.
>
> ftp://sourceware.org/pub/gdb/snapshots/branch/
>
> I've been using them to try and get Python working for MinGW.

so, the latest branch you built works? that's a great news.
>
>> If I can remember, the gdb.exe built from snapshot of 20100302, 20100301
>> always get crashed on startup either.
>
> What do you see when gdb crashes?
>

When the gdb crashed, these is a Messagebox, and saying some error.
sorry I can't remember all because I've done that in my lab (I will
report it tomorrow when I return to my office), but now I'm at home.
So, now, I will download a 7.0.90 branch and build it again and test
it.

>> I would prefer some gdb gurus can help. Thanks.
>
> I'm no guru by any means, but in order to create a profiling gdb one
> way is to specify CFLAGS at configuration time:
>
> $ CFLAGS="-pg" ../configure ....
>
> Once you have a gdb binary with profiling enabled, it should produce a
> profile file (a.out if memory serves), which you can then view using
> 'gprof a.out'.
>
> Cheers!
>
> Chris
>
> --
> Chris Sutcliffe
> http://emergedesktop.org
> http://www.google.com/profiles/ir0nh34d
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Slowdown of the response from the command line?
  2010-03-04 11:21     ` Chris Sutcliffe
  2010-03-04 12:01       ` asm warrior
@ 2010-03-04 14:12       ` asm warrior
  2010-03-05  2:13         ` Chris Sutcliffe
  2010-03-05  2:45       ` Asm_gmail
  2 siblings, 1 reply; 9+ messages in thread
From: asm warrior @ 2010-03-04 14:12 UTC (permalink / raw)
  To: Chris Sutcliffe; +Cc: gdb

On Thu, Mar 4, 2010 at 7:21 PM, Chris Sutcliffe <ir0nh34d@gmail.com> wrote:
>
> I'd recommend one of the 7.0.90.xxxx sources:
>
> ftp://sourceware.org/pub/gdb/snapshots/branch/
>
> I've been using them to try and get Python working for MinGW.

Hi, ironhead. Now, I have successfully build the gdb branch
gdb-7.0.90.20100304.tar (it takes nearlly one and half an hour), and
gdb.exe works fine, and there's no crash. thanks very much!!.
I use these build environment( MSYS, tdm-gcc4.4.1-dw2 core and g++
package, others packages like binutilites and wapi were all downloaded
from the Official Mingw sourceforge sites.)
The new build branch 0304 gdb.exe still response slowly when showing a
wxString value in watch window, but if I have not watches, it runs
fast when doing "steps or step in ...".

I use these command to build the gdb, I unzip the gdb source code in
"/c/gdb/gdbbranch20100304/" and run the scrips command in
"/c/gdb/obj/" and the generated file was installed to "/c/gdb/install"

../gdbbranch20100304/configure --prefix=/c/gdb/install --with-expat
--without-included-gettext CFLAGS="-I/c/expat/install/include -static
-L/c/expat/install/lib -O2 -w"
make
make install

>
> I'm no guru by any means, but in order to create a profiling gdb one
> way is to specify CFLAGS at configuration time:
>
> $ CFLAGS="-pg" ../configure ....
>
> Once you have a gdb binary with profiling enabled, it should produce a
> profile file (a.out if memory serves), which you can then view using
> 'gprof a.out'.

As you suggested, but I have failed using the -pg option. if I use
these command:
../gdbbranch20100304/configure --prefix=/c/gdb/install --with-expat
--without-included-gettext CFLAGS="-I/c/expat/install/include -static
-L/c/expat/install/lib -O2 -w -g -pg"
make
make install

I failed in the configure step, MSYS shells just hangs when checking
the gcc system. I don't know why...
any comments?

Thanks!!!


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Slowdown of the response from the command line?
  2010-03-04  7:24   ` Asm_gmail
  2010-03-04 11:21     ` Chris Sutcliffe
@ 2010-03-04 18:43     ` Tom Tromey
  1 sibling, 0 replies; 9+ messages in thread
From: Tom Tromey @ 2010-03-04 18:43 UTC (permalink / raw)
  To: Asm_gmail; +Cc: gdb

>>>>> ">" == Asm gmail <asmwarrior@gmail.com> writes:

>> If I can remember, the gdb.exe built from snapshot of 20100302,
>> 20100301 always get crashed on startup either.
>> just like Chris Sutcliffe's post in
>> http://sourceware.org/ml/gdb/2010-01/msg00189.html and
>> http://sourceware.org/ml/gdb/2010-01/msg00190.html, he has encountered
>> the same problem as me in both mingw64 and mingw32.

>> I would prefer some gdb gurus can help. Thanks.

I wish I knew what was the matter, but I am not a mingw user or
developer.  Maybe someone here who is can look.

Tom


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Slowdown of the response from the command line?
  2010-03-04 14:12       ` asm warrior
@ 2010-03-05  2:13         ` Chris Sutcliffe
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Sutcliffe @ 2010-03-05  2:13 UTC (permalink / raw)
  To: gdb

Hi Asmwarrior,

>> I'm no guru by any means, but in order to create a profiling gdb one
>> way is to specify CFLAGS at configuration time:
>>
>> $ CFLAGS="-pg" ../configure ....
>>
>> Once you have a gdb binary with profiling enabled, it should produce a
>> profile file (a.out if memory serves), which you can then view using
>> 'gprof a.out'.
>
> As you suggested, but I have failed using the -pg option. if I use
> these command:
> ../gdbbranch20100304/configure --prefix=/c/gdb/install --with-expat
> --without-included-gettext CFLAGS="-I/c/expat/install/include -static
> -L/c/expat/install/lib -O2 -w -g -pg"
> make
> make install
>
> I failed in the configure step, MSYS shells just hangs when checking
> the gcc system. I don't know why...
> any comments?

I'll take a look at producing a profiling gdb this weekend and I'll
let you know how I make out.

Cheers!

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Slowdown of the response from the command line?
  2010-03-04 11:21     ` Chris Sutcliffe
  2010-03-04 12:01       ` asm warrior
  2010-03-04 14:12       ` asm warrior
@ 2010-03-05  2:45       ` Asm_gmail
  2 siblings, 0 replies; 9+ messages in thread
From: Asm_gmail @ 2010-03-05  2:45 UTC (permalink / raw)
  To: Chris Sutcliffe; +Cc: gdb

On 2010-3-4 19:21, Chris Sutcliffe wrote:
>> If I can remember, the gdb.exe built from snapshot of 20100302, 20100301
>> always get crashed on startup either.
>>      
> What do you see when gdb crashes?
>
>    
When gdb.exe(build from the /current snapshot 20100304) crashes, a 
standard windows message dialog jumps says:
gdb.exe has encountered a problem and needs to close. we are  sorry for 
the inconvenience.....

And here is my debuglog from codeblocks:
-------------------------------------------------------------------------------------------------
Command-line: D:\MinGW\bin\gdb.exe -nx -fullname  -quiet -args bin/ptest.exe
Working dir : F:\cb_svn\src\plugins\codecompletion\parser\ptest\
 > set prompt >>>>>>cb_gdb:
Reading symbols from 
F:\cb_svn\src\plugins\codecompletion\parser\ptest/bin/ptest.exe...
done.
(gdb) >>>>>>cb_gdb:
 > show version
GNU gdb (GDB) 7.1.50.20100304
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
 >>>>>>cb_gdb:
 > set confirm off
 >>>>>>cb_gdb:
 > set width 0
 >>>>>>cb_gdb:
 > set height 0
 >>>>>>cb_gdb:
 > set breakpoint pending on
 >>>>>>cb_gdb:
 > set print asm-demangle on
 >>>>>>cb_gdb:
 > set unwindonsignal on
 >>>>>>cb_gdb:
 > set debugevents on
 >>>>>>cb_gdb:
 > set disassembly-flavor intel
 >>>>>>cb_gdb:
 > catch throw
Catchpoint 1 (throw)
 >>>>>>cb_gdb:
 > source D:\Program 
Files\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
 >>>>>>cb_gdb:
 > directory F:/cb_svn/src/plugins/codecompletion/parser/ptest/
 >>>>>>cb_gdb:
 > directory F:/cb_svn/src/plugins/codecompletion/parser/
 >>>>>>cb_gdb:
 > break "F:/cb_svn/src/plugins/codecompletion/parser/parserthread.cpp:450"
Breakpoint 2 at 0x402d8e: file 
F:\cb_svn\src\plugins\codecompletion\parser\parserthread.cpp, line 450.
 >>>>>>cb_gdb:
 > run
-------------------------------------------------------------------------------------------------
after showing "run", gdb.exe crashes.

> I'll take a look at producing a profiling gdb this weekend and I'll
> let you know how I make out.
>
> Cheers!
>
> Chris
>    
Thank you very much!!


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-03-05  2:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-26 16:48 Slowdown of the response from the command line? asm warrior
2010-02-26 22:12 ` Tom Tromey
2010-03-04  7:24   ` Asm_gmail
2010-03-04 11:21     ` Chris Sutcliffe
2010-03-04 12:01       ` asm warrior
2010-03-04 14:12       ` asm warrior
2010-03-05  2:13         ` Chris Sutcliffe
2010-03-05  2:45       ` Asm_gmail
2010-03-04 18:43     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox