digitalmars.D.debugger - Has anyone had success debugging on OSX?
- pineapple (4/4) May 19 2016 I've at least got my code running in windbg on Windows, but I'd
- pineapple (3/3) May 19 2016 Along the same lines, what about compiling and debugging in a
- Jacob Carlborg (5/9) May 19 2016 It depends on what features you need. I know you can get a stacktrace at...
- Jacob Carlborg (5/9) May 19 2016 I also recommend asking in the learn forum/group, to make your post more...
- Guillaume Piolat (4/9) May 19 2016 I'm using lldb with both LDC and DMD. It works really well, you
- pineapple (10/13) May 19 2016 Anything that helps me narrow down where this error "malloc: ***
- Jacob Carlborg (23/32) May 19 2016 You can debug your application in Xcode. You would need to create a
- pineapple (2/4) May 20 2016 Thanks for your answer!
- Vadim Lopatin (5/10) May 23 2016 Did someone try to use LLDBMI2 debugger?
- chmike (6/16) May 29 2016 I have seen that there seam to be a problem with the debug source
- Vadim Lopatin (10/30) Jun 07 2016 Trying to get DlangIDE + lldbmi2 working.
- Vadim Lopatin (4/13) Jun 07 2016 Managed to hack lldbmi2 to get line numbers working.
I've at least got my code running in windbg on Windows, but I'd also like to get a debugging environment set up in OSX. It looks as though gdb is probably my best option but I haven't been able work out how to get it to work with my compiled D programs.
May 19 2016
Along the same lines, what about compiling and debugging in a ubuntu VM? I gave that a shot, too, but didn't get much of anywhere.
May 19 2016
On 2016-05-19 13:02, pineapple wrote:I've at least got my code running in windbg on Windows, but I'd also like to get a debugging environment set up in OSX. It looks as though gdb is probably my best option but I haven't been able work out how to get it to work with my compiled D programs.It depends on what features you need. I know you can get a stacktrace at least, with mangled names :) -- /Jacob Carlborg
May 19 2016
On 2016-05-19 13:02, pineapple wrote:I've at least got my code running in windbg on Windows, but I'd also like to get a debugging environment set up in OSX. It looks as though gdb is probably my best option but I haven't been able work out how to get it to work with my compiled D programs.I also recommend asking in the learn forum/group, to make your post more visual. -- /Jacob Carlborg
May 19 2016
On Thursday, 19 May 2016 at 11:02:00 UTC, pineapple wrote:I've at least got my code running in windbg on Windows, but I'd also like to get a debugging environment set up in OSX. It looks as though gdb is probably my best option but I haven't been able work out how to get it to work with my compiled D programs.I'm using lldb with both LDC and DMD. It works really well, you get stack-traces, source information, etc. But names are mangled.
May 19 2016
On Thursday, 19 May 2016 at 11:36:58 UTC, Guillaume Piolat wrote:I'm using lldb with both LDC and DMD. It works really well, you get stack-traces, source information, etc. But names are mangled.Anything that helps me narrow down where this error "malloc: *** error for object 0x7ff34387e600: pointer being freed was not allocated" is actually occurring is a win in my book. Ideally I'd like to be able to step through code in a visual environment and evaluate expressions like I do in tools like PyCharm's Python debugger, but for now I'm just trying to solve this specific problem and a stack trace would be very helpful. Perhaps you could post a short guide on how to set up the tools you use for debugging?
May 19 2016
On 2016-05-19 15:14, pineapple wrote:Anything that helps me narrow down where this error "malloc: *** error for object 0x7ff34387e600: pointer being freed was not allocated" is actually occurring is a win in my book. Ideally I'd like to be able to step through code in a visual environment and evaluate expressions like I do in tools like PyCharm's Python debugger,You can debug your application in Xcode. You would need to create a dummy project: 1. File -> New -> Project 2. Other -> Empty -> Next 3. Type a name then choose where to create it 4. In the top left corner in the toolbar, click "No Scheme" 5. Click New Scheme 6. Type a name 7. In the right side, choose Run 8. In the middle, choose Info -> Executable -> Other and pick your application, then close the dialog 9. Now click the run button (the one looking like a play button) in the top left corner in the toolbar When your application crashes it should open the debugger view. You might need to add your source files to the project to get a source mapping. Do that by dragging them to the left side in the Xcode window. but for now I'm just trying to solve this specific problem anda stack trace would be very helpful.Just to get a stack trace it's enough to run your program through lldb: "lldb my_program". When it crashes, execute the "bt" (backtrace) command to print the stack trace.Perhaps you could post a short guide on how to set up the tools you use for debugging?-- /Jacob Carlborg
May 19 2016
On Friday, 20 May 2016 at 06:59:08 UTC, Jacob Carlborg wrote:You can debug your application in Xcode. You would need to create a dummy project:Thanks for your answer!
May 20 2016
On Thursday, 19 May 2016 at 11:02:00 UTC, pineapple wrote:I've at least got my code running in windbg on Windows, but I'd also like to get a debugging environment set up in OSX. It looks as though gdb is probably my best option but I haven't been able work out how to get it to work with my compiled D programs.Did someone try to use LLDBMI2 debugger? https://github.com/freedib/lldbmi2 It seems to be GDB/MI compatible frontend for LLDB debugger. Should work with Eclipse/DDT
May 23 2016
On Tuesday, 24 May 2016 at 06:14:49 UTC, Vadim Lopatin wrote:On Thursday, 19 May 2016 at 11:02:00 UTC, pineapple wrote:I have seen that there seam to be a problem with the debug source line info that confuses gdb when compiled with dmd. I have filed a bug about this in bugzilla. Until this problem is solved, you might have a better chance with gdb when using ldc.I've at least got my code running in windbg on Windows, but I'd also like to get a debugging environment set up in OSX. It looks as though gdb is probably my best option but I haven't been able work out how to get it to work with my compiled D programs.Did someone try to use LLDBMI2 debugger? https://github.com/freedib/lldbmi2 It seems to be GDB/MI compatible frontend for LLDB debugger. Should work with Eclipse/DDT
May 29 2016
On Monday, 30 May 2016 at 06:39:38 UTC, chmike wrote:On Tuesday, 24 May 2016 at 06:14:49 UTC, Vadim Lopatin wrote:Trying to get DlangIDE + lldbmi2 working. Partially done (implemented some fixes to support it). Experimenting with DMD generated program. Breakpoint setting is working. I can run program, it stops ok on breakpoint (at requested position). Stack frames are shown w/o source file and line number. Variables are not shown. Probably, something in DMD debug info is incompatible with LLDB (or lldbmi2 frontend has some bug)On Thursday, 19 May 2016 at 11:02:00 UTC, pineapple wrote:I have seen that there seam to be a problem with the debug source line info that confuses gdb when compiled with dmd. I have filed a bug about this in bugzilla. Until this problem is solved, you might have a better chance with gdb when using ldc.I've at least got my code running in windbg on Windows, but I'd also like to get a debugging environment set up in OSX. It looks as though gdb is probably my best option but I haven't been able work out how to get it to work with my compiled D programs.Did someone try to use LLDBMI2 debugger? https://github.com/freedib/lldbmi2 It seems to be GDB/MI compatible frontend for LLDB debugger. Should work with Eclipse/DDT
Jun 07 2016
On Tuesday, 7 June 2016 at 18:35:15 UTC, Vadim Lopatin wrote:Trying to get DlangIDE + lldbmi2 working. Partially done (implemented some fixes to support it). Experimenting with DMD generated program. Breakpoint setting is working. I can run program, it stops ok on breakpoint (at requested position). Stack frames are shown w/o source file and line number. Variables are not shown. Probably, something in DMD debug info is incompatible with LLDB (or lldbmi2 frontend has some bug)Managed to hack lldbmi2 to get line numbers working. But it looks like there are some problems with Function debug information.
Jun 07 2016