-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to set the break-point at bar function. (^_^)/ #42
Comments
bar
function. (^_^)/
Hello, Assuming your code is in a file called |
Hello! Thank your reply! (^_^)/ I do try it. But it does not work well (^_^;; Last login: Thu Nov 23 17:05:08 on ttys000
~$ cd tmp
tmp$ cd jikken_sdb/
jikken_sdb$ cat pro
Program.exe Program.fs
jikken_sdb$ cat Program.fs
let bar() =
stdout.WriteLine("abc")
let foo (str:string) =
stdout.WriteLine(str)
bar()
[<EntryPointAttribute>]
let main _ =
let s = "Foo!"
foo s
stdout.WriteLine("callmekohei")
0
jikken_sdb$ sdb
Welcome to the Mono soft debugger (sdb 1.5.6503.20649)
Type 'help' for a list of commands or 'quit' to exit
(sdb) bp add fun Program.bar
Breakpoint '0' added for method 'Program.bar'
(sdb) run Program.exe
Inferior process '3306' ('Program.exe') started
Event: 'TargetReady'
[Mono] Loaded assembly: /Users/callmekohei/tmp/jikken_sdb/Program.exe
[Mono] Loaded assembly: /usr/local/Cellar/mono/5.0.1.1/lib/mono/gac/FSharp.Core/4.4.1.0__b03f5f7f11d50a3a/FSharp.Core.dll
[Mono] Resolved pending breakpoint for 'Program.bar()' to [0x0](no debug symbols).
Foo!
abc
callmekohei
Inferior process '3306' ('Program.exe') exited with code '0'
Event: 'TargetExited'
(sdb) exit
Bye
jikken_sdb$ |
Hmmmm.... I try to create namespace and module. namespace ABC
module DEF =
let bar() =
stdout.WriteLine("abc")
let foo (str:string) =
stdout.WriteLine(str)
bar()
[<EntryPointAttribute>]
let main _ =
let s = "Foo!"
foo s
stdout.WriteLine("callmekohei")
0 then try Last login: Thu Nov 23 17:24:26 on ttys001
~$ cd tmp
tmp$ cd jikken_sdb/
jikken_sdb$ sdb
Welcome to the Mono soft debugger (sdb 1.5.6503.20649)
Type 'help' for a list of commands or 'quit' to exit
(sdb) bp add fun ABC.DEF.bar
Breakpoint '0' added for method 'ABC.DEF.bar'
(sdb) bp
#0 'ABC.DEF.bar'
(sdb) run Program.exe
Inferior process '3447' ('Program.exe') started
Event: 'TargetReady'
[Mono] Loaded assembly: /Users/callmekohei/tmp/jikken_sdb/Program.exe
[Mono] Loaded assembly: /usr/local/Cellar/mono/5.0.1.1/lib/mono/gac/FSharp.Core/4.4.1.0__b03f5f7f11d50a3a/FSharp.Core.dll
[Mono] Resolved pending breakpoint for 'ABC.DEF.bar()' to [0x0](no debug symbols).
Foo!
abc
callmekohei
Inferior process '3447' ('Program.exe') exited with code '0'
Event: 'TargetExited'
(sdb) exit
Bye
jikken_sdb$ |
Hmm, I think you need to compile your program with |
Thank you for your reply! So, I try it. jikken_sdb$ cat Program.fs
namespace ABC
module DEF =
let bar() =
stdout.WriteLine("abc")
let foo (str:string) =
stdout.WriteLine(str)
bar()
[<EntryPointAttribute>]
let main _ =
let s = "Foo!"
foo s
stdout.WriteLine("callmekohei")
0
jikken_sdb$ fsharpc --debug+ Program.fs
F# Compiler for F# 4.1
Freely distributed under the Apache 2.0 Open Source License
jikken_sdb$ ls
Program.exe Program.exe.mdb Program.fs then jikken_sdb$ sdb
Welcome to the Mono soft debugger (sdb 1.5.6503.20649)
Type 'help' for a list of commands or 'quit' to exit
(sdb) bp add func ABC.DEF.bar
Breakpoint '0' added for method 'ABC.DEF.bar'
(sdb) run program.exe
Inferior process '3813' ('program.exe') started
Event: 'TargetReady'
[Mono] Loaded assembly: /Users/callmekohei/tmp/jikken_sdb/program.exe
[Mono] Loaded assembly: /usr/local/Cellar/mono/5.0.1.1/lib/mono/gac/FSharp.Core/4.4.1.0__b03f5f7f11d50a3a/FSharp.Core.dll
[Mono] Resolved pending breakpoint for 'ABC.DEF.bar()' to /Users/callmekohei/tmp/jikken_sdb/Program.fs:4 [0x00000].
Foo!
abc
callmekohei
Inferior process '3813' ('program.exe') exited with code '0'
Event: 'TargetExited'
(sdb) quit
Bye Hmmm.... It seems to work not well... |
OK, that looks like a bug. I will take a look. |
Thank you! (^_^)/ |
I wrote article about it. see also: http://callmekohei00.hatenablog.com/entry/2017/12/07/202955 |
Hello! I'm callmekohei!.
Problems summary
system
code
debugging
The text was updated successfully, but these errors were encountered: