Can't debug dmd binary

Lionello Lunesu via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 20 04:45:35 PDT 2014


On 20/06/14 11:00, Jerry wrote:
> Hi folks,
>
> I'm unable to debug binaries built with dmd 2.065.  The platform is
> x86-64 Ubuntu 14.04.  This is gdb 7.7.
>
> If I have a simple program:
>
> nodebug.d:
>
> void main() {
>    int i;
>    i = 3;
> }
>
> dmd -g nodebug.d
>
> jlquinn at wyvern:~/d$ gdb nodebug
> GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
> Copyright (C) 2014 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 "x86_64-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from nodebug...done.
> (gdb) b main
> Breakpoint 1 at 0x416ecc
> (gdb) run
> Starting program: /home/jlquinn/d/nodebug
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>
> Breakpoint 1, 0x0000000000416ecc in main ()
> (gdb) l
> 1	dl-debug.c: No such file or directory.
> (gdb)
>
>
> Using dmd -gc doesn't help at all.  Any suggestions?
>
> Thanks
> Jerry
>

$gdb nodebug
(gdb) b _Dmain
(gdb) r





More information about the Digitalmars-d mailing list