473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Integrated debug library for a C program

Hello, i'm using Eiffel at the moment for my program.

One of the killer features is a very simple traceback that gives me
after an assert failure the whole stracktrace together with a readable
dump of all local variables and function parameters (normally much
less then 50kb compressed). This can be added to the generated
executable file and so it can run on the clients computer.

Is there any c compiler or library that allows me to do this?

May 30 '07 #1
3 1644
In article <11*********************@g37g2000prf.googlegroups. com>,
llothar <ll*****@web.dewrote:
>Hello, i'm using Eiffel at the moment for my program.
>One of the killer features is a very simple traceback that gives me
after an assert failure the whole stracktrace together with a readable
dump of all local variables and function parameters (normally much
less then 50kb compressed). This can be added to the generated
executable file and so it can run on the clients computer.
>Is there any c compiler or library that allows me to do this?
Unfortunately, the C language itself does not have any provisions
for this.

I gather (perhaps incorrectly) that gcc provides extra
calls to get stack traces; as I have not looked into that, I
do not know whether those facilities are available for all gcc
execution targets or only for some of them or only for "hosted"
targets (e.g., it would not surprise me if the facility were not
available when the target was an embedded system.)

There are other compilers that provide these kind of facilities,
and there are operating systems that provide operating system
calls for similar purpose.

If you were to indicate the target OS(s), we might be able to
redirect you to specific compilers or to newsgroups more likely
to know for those OS(s).
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
May 30 '07 #2
llothar wrote On 05/30/07 12:23,:
Hello, i'm using Eiffel at the moment for my program.

One of the killer features is a very simple traceback that gives me
after an assert failure the whole stracktrace together with a readable
dump of all local variables and function parameters (normally much
less then 50kb compressed). This can be added to the generated
executable file and so it can run on the clients computer.

Is there any c compiler or library that allows me to do this?
Most C environments include tools to do this sort
of thing. The capabilities, modes of operation, and so
on are specific to the environment and not part of C,
just as the editor you use to prepare C source is not
part of C. You'll need to look at what the plaforms
you care about offer: gdb, pstack, dbx, ...

The amount of information such tools are able to
extract is often influenced by the option flags used to
compile and link the program: There are often specific
"debugging" flags that cause the program to retain a
lot of self-descriptive information that would otherwise
have been discarded, things like information about the
names and types of variables. Usually one can get (at
best) uninterpreted or only semi-interpreted hex dumps
of memory-resident data if debugging flags aren't used.

A further complication is C's tradition of aggressive
optimization. Even with debugging information present
the behavior of a program can seem perverse. For example,
after an `assert (x >= 0)' failure the post-mortem output
might indicate that the value of x is 42 -- so, why did
the assertion fail? It might be that the memory slot
devoted to x is not up-to-date with a transient x being
held in a register; the generated code would have stored
the new (negative) value into x's memory eventually, but
the assert fired first ...

Summary: Traceback facilities (debugging facilities in
general) are system-specific and subject to variation,
compiler and linker options can often improve the quality
of the information they produce, and the information must
be viewed with a dash of caution.

--
Er*********@sun.com
May 30 '07 #3
llothar wrote:
Hello, i'm using Eiffel at the moment for my program.

One of the killer features is a very simple traceback that gives me
after an assert failure the whole stracktrace together with a readable
dump of all local variables and function parameters (normally much
less then 50kb compressed). This can be added to the generated
executable file and so it can run on the clients computer.

Is there any c compiler or library that allows me to do this?
Yes. Q software solutions sells such a library, and I did
some years ago a customized debugger for SmallEiffel, that
now is called SmartEiffel.

contact me for further information.

jacob
May 30 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ravikanth[MVP] | last post by:
Hi It is possible that IIS and SQL Server can reside on Seperate Machines and you can use Integrated Windows Authentication to connect. Ravikanth >-----Original Message-----
7
by: Sunil Varma | last post by:
Hello all, I wrote a Windows Service in VC.NET 2005 I want to debug the solution. I tried as mentioned in the following link. ...
4
by: nmrcarl | last post by:
I'm trying to upgrade a large project from VS 6.0 to VS 2005. After fixing a lot of things that changed (mostly sloppy coding in the original project that VS2005 didn't allow), I got the release...
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
0
by: JCD | last post by:
I am using Office XP Professional on Windows XP Home. When I try to open a Word document, I get a Microsoft Visual C++ Debug Library window stating Debug Error! Program:C\Program Files\Microsoft...
7
by: =?Utf-8?B?SmltIFdhbHNo?= | last post by:
I'm new to working with mixed assemblies. All of my previous experience has been with VC++/MFC in native, unmanaged applications. When I create a mixed assembly in which one or more of the files...
0
by: llothar | last post by:
Hello, i'm using Eiffel at the moment for my program. One of the killer features is a very simple traceback that gives me after an assert failure the whole stracktrace together with a readable...
7
by: FredSchall | last post by:
I have a conflict with AOL. They have tried everything to remove the problem and can not solve the problem. I am computer literate. I want to remove MS visual studio 8 and the debug library..the...
11
by: benoitc | last post by:
I've been having a problem debugging an ASP.NET 1.1 application on an existing Windows XP/Visual Studio 2003 workstation that I've inherited from somebody else. The application builds fine, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.