Hi Isaac:
Find below the output:
$ cat h.rs
fn main() {
let ric = "Ricardo";
println!("Hello {}!", ric);
}
$ rustc -g h.rs
$ gdb h
GNU gdb (GDB) 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-apple-darwin12.5.0".
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 h...
warning: `/Users/rbrandao/Google Drive/PrgRust/Tutorial/h.o': can't open to
read symbols: No such file or directory.
warning: can't find symbol 'get_num_cpus' in minsymtab
warning: can't find symbol 'je_chunk_alloc_dss' in minsymtab
warning: can't find symbol 'je_chunk_dss_boot' in minsymtab
warning: can't find symbol 'je_chunk_dss_postfork_child' in minsymtab
warning: can't find symbol 'je_chunk_dss_postfork_parent' in minsymtab
warning: can't find symbol 'je_extent_tree_ad_first' in minsymtab
warning: can't find symbol 'je_rtree_delete' in minsymtab
done.
(gdb) break main
Breakpoint 1 at 0x1000015a0
(gdb) run
Starting program: /Users/rbrandao/PrgRust/Tutorial/h
Unable to find Mach task port for process-id 34102: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
(gdb)
Regards,
Ricardo
On Mon, May 19, 2014 at 6:54 PM, Isaac Hollander McCreery <
[email protected]> wrote:
> Hi Ricardo,
>
> Can you provide more information about how it fails?
>
> OS X 10.9 no longer ships with gdb, instead preferring lldb, (the whole
> system has shifted over to LLVM's ecosystem, e.g. clang instead of gcc).
> Have you tried lldb?
>
> Regards,
> Ike
>
>
> On Mon, May 19, 2014 at 5:43 PM, Ricardo Brandão <[email protected]>wrote:
>
>> Hi All,
>>
>> Today I've tried to use gdb to debug rust programs.
>>
>> I compiled with -g: rustc -g hello.rs
>>
>> and ran gdb hello
>>
>> On Ubuntu it worked fine, but in Mac (OS 10.8) doesn't. Anyone already
>> faced this issue on Mac?
>>
>> Thanks in advance
>>
>> --
>> Ricardo Brandão
>> http://www.programonauta.com.br
>>
>> ........__@
>> ....._ \ >_
>> ....(_) / (_)
>>
>> _______________________________________________
>> Rust-dev mailing list
>> [email protected]
>> https://mail.mozilla.org/listinfo/rust-dev
>>
>>
>
--
Ricardo Brandão
http://www.programonauta.com.br
........__@
....._ \ >_
....(_) / (_)
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev