Solved

debug information

Posted on 2003-11-13
8
263 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
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…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

758 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

22 Experts available now in Live!

Get 1:1 Help Now