www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - debugging on linux

reply The Neuromancer <The_member pathlink.com> writes:
hi,
i am following the DMD compiler since the 0.11* versions, and many new features
have been added, but there is no useful and usable debugging for the Linux
version.
Ok, I know that the line numbers now are ok, and i can watch global symbols, but
it would be cool if i could debug symbols that are allocated on the stack... It
would help me to develop my operating system in D :-)

I think Walter should wait to add new features, and make debugging work.

Sorry for my bad english :)

Knowledge is power.. knowledge shared is power lost
  -- Aleister Crowley
Oct 06 2005
next sibling parent reply JT <jtd514 ameritech.net> writes:
All the debugging symbols are present in the executables. I dont 
understand what you are asking for.


The Neuromancer wrote:
 hi,
 i am following the DMD compiler since the 0.11* versions, and many new features
 have been added, but there is no useful and usable debugging for the Linux
 version.
 Ok, I know that the line numbers now are ok, and i can watch global symbols,
but
 it would be cool if i could debug symbols that are allocated on the stack... It
 would help me to develop my operating system in D :-)
 
 I think Walter should wait to add new features, and make debugging work.
 
 Sorry for my bad english :)
 
 Knowledge is power.. knowledge shared is power lost
   -- Aleister Crowley
Oct 06 2005
parent reply John Demme <me teqdruid.com> writes:
All the debugging symbols are present in the DMD Linux executables?  I
don't think so.  With my patch, I've gotten GDB to work with the line
number information, but GDB doesn't see any of my variables, and neither
do I with the dumpobj -g command.  I can't even see global variables in
GDB.

~John Demme

On Thu, 06 Oct 2005 15:43:38 -0500, JT wrote:

 
 All the debugging symbols are present in the executables. I dont 
 understand what you are asking for.
 
 
 The Neuromancer wrote:
 hi,
 i am following the DMD compiler since the 0.11* versions, and many new features
 have been added, but there is no useful and usable debugging for the Linux
 version.
 Ok, I know that the line numbers now are ok, and i can watch global symbols,
but
 it would be cool if i could debug symbols that are allocated on the stack... It
 would help me to develop my operating system in D :-)
 
 I think Walter should wait to add new features, and make debugging work.
 
 Sorry for my bad english :)
 
 Knowledge is power.. knowledge shared is power lost
   -- Aleister Crowley
Oct 06 2005
parent reply JT <jtd514 ameritech.net> writes:
ahhh ok yeah codeview is a microsoft format - I have specs for OMF 
codeview data - but I dont know if walter is emitting it in the linux 
version. Are you using GDC or DMD? All the CodeView 4 symbols are there 
from the DMD compiler in the windows versions. Ive been building a 
windows debugger and playing with the codeview symbols for some time. 
However - there is some problem that seem to prevent the standard 
debuggers and tools to read the data correctly, i have no idea what this 
is - but ive had no trouble with parsing the codeview data myself. also 
some people confuse OMF/COFF symbols with the codeview symbols - the OMF 
symbols are being stripped.

have you looked into parsing OMF Codeview 4 data from the executables?


John Demme wrote:
 All the debugging symbols are present in the DMD Linux executables?  I
 don't think so.  With my patch, I've gotten GDB to work with the line
 number information, but GDB doesn't see any of my variables, and neither
 do I with the dumpobj -g command.  I can't even see global variables in
 GDB.
 
 ~John Demme
 
 On Thu, 06 Oct 2005 15:43:38 -0500, JT wrote:
 
 
All the debugging symbols are present in the executables. I dont 
understand what you are asking for.


The Neuromancer wrote:

hi,
i am following the DMD compiler since the 0.11* versions, and many new features
have been added, but there is no useful and usable debugging for the Linux
version.
Ok, I know that the line numbers now are ok, and i can watch global symbols, but
it would be cool if i could debug symbols that are allocated on the stack... It
would help me to develop my operating system in D :-)

I think Walter should wait to add new features, and make debugging work.

Sorry for my bad english :)

Knowledge is power.. knowledge shared is power lost
  -- Aleister Crowley
Oct 06 2005
next sibling parent The Neuromancer <The_member pathlink.com> writes:
ahhh ok yeah codeview is a microsoft format - I have specs for OMF 
codeview data - but I dont know if walter is emitting it in the linux 
version. Are you using GDC or DMD?
I am using DMD under linux, and IIRC the Linux version uses the DWARF debugging format.
All the CodeView 4 symbols are there 
from the DMD compiler in the windows versions. Ive been building a 
windows debugger and playing with the codeview symbols for some time. 
However - there is some problem that seem to prevent the standard 
debuggers and tools to read the data correctly, i have no idea what this 
is - but ive had no trouble with parsing the codeview data myself. also 
some people confuse OMF/COFF symbols with the codeview symbols - the OMF 
symbols are being stripped.

have you looked into parsing OMF Codeview 4 data from the executables?
My problem is that I'm writing my OS under Linux, since it is more flexible, and so full debugging will help things a lot :-) I am waiting for Walter's answer.
Oct 07 2005
prev sibling parent reply "Walter Bright" <newshound digitalmars.com> writes:
"JT" <jtd514 ameritech.net> wrote in message
news:di4br1$11td$1 digitaldaemon.com...
 ahhh ok yeah codeview is a microsoft format - I have specs for OMF
 codeview data - but I dont know if walter is emitting it in the linux
 version. Are you using GDC or DMD? All the CodeView 4 symbols are there
 from the DMD compiler in the windows versions. Ive been building a
 windows debugger and playing with the codeview symbols for some time.
 However - there is some problem that seem to prevent the standard
 debuggers and tools to read the data correctly,
Hmm. Windbg.exe is able to read it correctly.
 i have no idea what this
 is - but ive had no trouble with parsing the codeview data myself. also
 some people confuse OMF/COFF symbols with the codeview symbols - the OMF
 symbols are being stripped.

 have you looked into parsing OMF Codeview 4 data from the executables?
The linux version of DMD is not emitting CV4 info, or any symbolic info. Just line numbers.
Oct 11 2005
next sibling parent reply JT <jtd514 ameritech.net> writes:
how is windbg able to identify things such as local arrays?

Walter Bright wrote:
 "JT" <jtd514 ameritech.net> wrote in message
 news:di4br1$11td$1 digitaldaemon.com...
 
ahhh ok yeah codeview is a microsoft format - I have specs for OMF
codeview data - but I dont know if walter is emitting it in the linux
version. Are you using GDC or DMD? All the CodeView 4 symbols are there
from the DMD compiler in the windows versions. Ive been building a
windows debugger and playing with the codeview symbols for some time.
However - there is some problem that seem to prevent the standard
debuggers and tools to read the data correctly,
Hmm. Windbg.exe is able to read it correctly.
i have no idea what this
is - but ive had no trouble with parsing the codeview data myself. also
some people confuse OMF/COFF symbols with the codeview symbols - the OMF
symbols are being stripped.

have you looked into parsing OMF Codeview 4 data from the executables?
The linux version of DMD is not emitting CV4 info, or any symbolic info. Just line numbers.
Oct 11 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"JT" <jtd514 ameritech.net> wrote in message
news:dii298$g0u$1 digitaldaemon.com...
 how is windbg able to identify things such as local arrays?
Windbg doesn't know anything about D types. So the D types are represented as the nearest C type. For dynamic arrays, unfortunately, this would be a 64 bit "long".
Oct 11 2005
prev sibling parent JT <jtd514 ameritech.net> writes:
BTW, I was refering to microsofts dbghelp.dll - which seems to choak on 
DMD executables. At least I couldnt get it to work very well. However Im 
still interested to know how windbg handles arrays.

Walter Bright wrote:
 "JT" <jtd514 ameritech.net> wrote in message
 news:di4br1$11td$1 digitaldaemon.com...
 
ahhh ok yeah codeview is a microsoft format - I have specs for OMF
codeview data - but I dont know if walter is emitting it in the linux
version. Are you using GDC or DMD? All the CodeView 4 symbols are there
from the DMD compiler in the windows versions. Ive been building a
windows debugger and playing with the codeview symbols for some time.
However - there is some problem that seem to prevent the standard
debuggers and tools to read the data correctly,
Hmm. Windbg.exe is able to read it correctly.
i have no idea what this
is - but ive had no trouble with parsing the codeview data myself. also
some people confuse OMF/COFF symbols with the codeview symbols - the OMF
symbols are being stripped.

have you looked into parsing OMF Codeview 4 data from the executables?
The linux version of DMD is not emitting CV4 info, or any symbolic info. Just line numbers.
Oct 11 2005
prev sibling parent Wolfgang Draxinger <wdraxinger darkstargames.de> writes:
The Neuromancer wrote:

 hi,
 i am following the DMD compiler since the 0.11* versions, and
 many new features have been added, but there is no useful and
 usable debugging for the Linux version.
 Ok, I know that the line numbers now are ok, and i can watch
 global symbols, but it would be cool if i could debug symbols
 that are allocated on the stack... It would help me to develop
 my operating system in D :-)
 
 I think Walter should wait to add new features, and make
 debugging work.
You know that GDB isn't D aware out of the box. However there is a patch avaliable. -- Wolfgang Draxinger
Oct 06 2005