Solved

debug information

Posted on 2003-11-13
8
268 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops 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.

803 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