February 12, 2014 Re: DDT 0.9.0 released - GDB debugging integration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Krivopalov | On 11/02/2014 14:53, Vladimir Krivopalov wrote: > Hi Bruno, > > First off, I wanted to share my appreciation for working on D support in > Eclipse and especially for introducing the debugging capabilities with > DDT - really awesome! > > I started playing around with the CDT debugger for D programs and so far > got a question about D dynamic arrays. > Actually they're already supported by GDB "out of box", and indeed > debugging with GDB 7.6.2 allows for the following array's output: > > <code line> int[] a = [7, 5]; > > (gdb) print a > $1 = {7, 5} > > but still, if debugging the same code in Eclipse (CDT), I see: > a struct _Array_int {...} > length unsigned long 2 > ptr int * 0x7ffff7ecdfd0 > > While it is definitely possible to implement some custom pretty printers > for this (and it shouldn't be that hard), I wanted to first ask whether > you have some clue about how can the D-style array output be forced in > CDT. Thanks! > Please follow this bug: https://github.com/bruno-medeiros/DDT/issues/43 BTW, was that sample run in Linux? Using DMD? |
February 12, 2014 Re: DDT 0.9.0 released - GDB debugging integration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruno Medeiros | On Wednesday, 12 February 2014 at 11:55:00 UTC, Bruno Medeiros wrote:
>
> Please follow this bug: https://github.com/bruno-medeiros/DDT/issues/43
> BTW, was that sample run in Linux? Using DMD?
Thanks for pointing me to the related bug!
Yes, I'm running it in Linux with GDB 7.7, DMD 2.064 and CDT 8.2.1
So far I haven't seen any errors in CDT views while running a debug session for my sample D program.
Interestingly though, I don't have the "GDB MI" page under "Debug" preferences sub-tree for CDT.
|
February 12, 2014 Re: DDT 0.9.0 released - GDB debugging integration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Krivopalov | On Wednesday, 12 February 2014 at 14:23:23 UTC, Vladimir Krivopalov wrote:
> Yes, I'm running it in Linux with GDB 7.7, DMD 2.064 and CDT 8.2.1
> So far I haven't seen any errors in CDT views while running a debug session for my sample D program.
> Interestingly though, I don't have the "GDB MI" page under "Debug" preferences sub-tree for CDT.
In case when I'm using GDC 4.8.2 I'm hitting the error you've described in the bug:
a struct int [] Error: Multiple errors reported.\ Failed to execute MI command: -var-create - * &(&(a)) Error message from debugger back end: Attempt to take address of value not located in memory.\ Failed to execute MI command: -var-create - * &(&(a)) Error message from debugger back end: Attempt to take address of value not located in memory.\ Unable to create variable object
a[0] Error: Multiple errors reported.\ Failed to execute MI command: -var-create - * a[0] Error message from debugger back end: Structure has no component named operator[].\ Unable to create variable object\ Failed to execute MI command: -data-evaluate-expression a[0] Error message from debugger back end: Structure has no component named operator[].\ Failed to execute MI command: -var-create - * a[0] Error message from debugger back end: Structure has no component named operator[].
It seems that CDT attempts to apply operators & and * to D array фы * &(&(a)) and thus fails.
|
Copyright © 1999-2021 by the D Language Foundation