DMD 1.004 release

Kevin Bealer kevinbealer at gmail.com
Sun Jan 28 04:05:39 PST 2007


Walter Bright wrote:
> Bob W wrote:
>>>> Sounds like you work under Windows... :o)
>> ..........
>>> Yep, looks like he does (mostly) :).
>>
>> He is a smart guy who probably does not feel like
>> beta testing operating systems. Or maybe he just
>> ran out of coffee too often while waiting for penguin's
>> favorite compiler and linker to finish their jobs ....   ;-)
> 
> g++ is a slow compiler, and ld is a really slow linker, and I'm just 
> more used to windows quirks than linux quirks.
> 
> But the worst thing about linux development is gdb. gdb's user interface 
> seems stuck in 1983 era thinking. I can't even get the thing to display 
> the register contents. It won't pick up the program arguments from the 
> command line. Either I'm stupid, all this is missing from the 
> documentation, or gdb really is terrible.
> 
> I do all my debugging on windows. Even horrible old windbg is a decade 
> ahead of gdb.
> 
> I do like gcov, though.

(I agree its an ugly interface.)

One thing I like though is the command history -- like most programs in 
Linux, you have 'readline', which means if you use 'control-R' you can 
search all previous commands for some string, for example.

Other things were answered already, heres some assorted stuff...

You can do a "display" to print some value after every command:

display $eax
display s.c_str()

I recommend this, it makes structures readable:

set print pretty on

Also, "gdb -x filename", tells it to run some file as a startup script. 
  This is a good place to put long command lines and special stuff like 
this (these are just some examples; the stuff after -- is my comment, I 
don't know if gdb accepts a comment marker of any kind.

rbreak SomeClass::  -- break on all members of a class, takes a regex
rbreak __cxa        -- this stops at all the exception handling in C++
break main
set print pretty on -- readable classes - dont know why its not default
open (command)
run (arguments)

Kevin



More information about the Digitalmars-d-announce mailing list