Solved

debug information

Posted on 2003-11-13
8
264 Views
Last Modified: 2010-04-15
When compiling a C program (by Borland c++ ver 3.0), using the option -S,  I get an asm file which includes several lines similar to the following:
?debug      C E94B79902E064B4B2E435050
I know that it is for the debugger but what is its exact meaning ?  I would like to get a profound explanation.
Regards,
J.Veichselfish
0
Comment
Question by:xyoavx
8 Comments
 
LVL 22

Expert Comment

by:grg99
ID: 9739170
The format of debug info is different for each compiler/debugger combo.
You'd have to ask Borland about that.

Basically it's got to contain the variable name and some pointer into a type-definition table
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9739260
grg99 is right ... but if you are keen, you may get some information here... this is the source for recognizing the debugging information

http://sources.redhat.com/ml/binutils/2000-08/msg00263.html
0
 
LVL 45

Accepted Solution

by:
Kdo earned 500 total points
ID: 9748199

Hi xyoavx,

I checked with the Borland folks, and have some information for you.

The Compiler (C/CPP/DELPHI/etc.) creates an ASM file to be assembled, but needs to get top-level debugging info to the final layer.  It does this by embeding ?debug lines in the code, then telling the assembler to compile _without_ generating ASM debug info (that is, use the ?debug data instead of generating it's own). That way, the debug info that TD sees is for the original source, not for the ASM intermediary.


?debug     C E9 4B 79 90 2E 06 4B 4B 2E 43 50 50
                                              K   K    .   C   P   P

It appears that this  generated from a file called kk.cpp?


The other bytes are probably one of these flags:

      V      version
      S      "source"
      L      line
      C      const. probably to do with variable and label names.
      B      /* begin */
      E      /* end */
      F      function


To get a feel for what is going on try putting -ZI on the tasm command line (or -TZI on the tcc.exe command line or -ZI on a line in a tasm.cfg file in the default directory).  You'll get an error because of conflicting debug settings (both the compiler and assembler are generating comment records and it doesn't know what to do).


Kent
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:xyoavx
ID: 9783070
Hi  kent
Thanks a lot for your answer.
Regards,
J.Veichselfish
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9784788
xyoavx,

Did you intend to give the points to Kent? I just want to be sure that you have not accepted the wrong answer by error.

Sunny
0
 

Author Comment

by:xyoavx
ID: 9785726
sunny,
Yes, I intend to give the points to Kent
xyoavx
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9785744
I am posting in community support to unaccept my answer and give the points to Kent
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now