DMD 1.004 release
Brad Roberts
braddr at puremagic.com
Sun Jan 28 01:42:18 PST 2007
>>> I can't even get the thing to display the register contents.
>>
>> print $ebp
>> print $eax
>
> There are a bunch of registers, I have to list them one at a time. It's
> pretty miserable if you're single stepping trying to keep an eye on the
> register contents. Every other debugger I've ever used, going back to
> the 70's, could either dump all regs with a shorter command, or had a
> window where the reg values were continuously updated.
(gdb) break main
Breakpoint 1 at 0x804b389
(gdb) run
Starting program: /home/braddr/sandbox/d/bugs/abstract_15
Failed to read a valid object file image from memory.
Breakpoint 1, 0x0804b389 in main ()
(gdb) info registers
eax 0xbff57484 -1074432892
ecx 0xb7dd1e6d -1210245523
edx 0x1 1
ebx 0xb7ee9ff4 -1209098252
esp 0xbff573e8 0xbff573e8
ebp 0xbff57408 0xbff57408
esi 0x0 0
edi 0xb7f4fcc0 -1208681280
eip 0x804b389 0x804b389 <main+9>
eflags 0x282 [ SF IF ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) help info
<snip a long list of helpful program status info options>
(gdb) help set args
Set argument list to give program being debugged when it is started.
Follow this command with any number of args, to be passed to the program.
>>> It won't pick up the program arguments from the command line.
>>
>> run what ever argument
>
> Where this falls down is when you've a long list of arguments to the
> program. I'll write a simple .bat file like:
> windbg program arg arg arg ...
> to run the debugger with the args. Doesn't work with gdb, because gdb
> doesn't pick up debuggee args from the command line, making gdb very
> tedious to use.
Also:
$ gdb --args programtodebug arg1 arg2 arg3
>>> Either I'm stupid, all this is missing from the documentation, or gdb
>>> really is terrible.
>>
>> "info gdb" should provide you with lots of documentation.
>
> I didn't know that. You'd think:
> gdb --help
> would have provided this information. Thanks for the pointers.
The built-in help to gdb isn't bad either.. though sometimes hard to
find stuff in.
Later,
Brad
More information about the Digitalmars-d-announce
mailing list