?
Solved

debug information

Posted on 2003-11-13
8
Medium Priority
?
291 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 46

Accepted Solution

by:
Kent Olsen earned 2000 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Suggested Courses

777 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