Solved

debug information

Posted on 2003-11-13
8
272 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:
Kent Olsen 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Picking random number 8 178
c language help - file paths 7 150
How to configure Digital Ouput in Renesas RH850/FIL Micrcontroller ? 5 201
Unable to start eclipse ? 17 154
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…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

828 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