|
|
 |
 |
 |
 |
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?
In article <1180542181.309655.38@g37g2000prf.googlegroups.com>, llothar <llot @web.de> 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? 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
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. -- Eric.Sos@sun.com
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
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?
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?
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?
Three identical postings over roughly 1 1/2 hours, and ignoring the answers posted in the interim. One of you and/or your reader are stupid. Probably the reader. -- <http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt> <http://www.securityfocus.com/columnists/423> <http://www.aaxnet.com/editor/edit043.html> <http://kadaitcha.cx/vista/dogsbreakfast/index.html> cbfalconer at maineline dot net -- Posted via a free Usenet account from http://www.teranews.com
CBFalconer <cbfalco @yahoo.com> writes: > llothar wrote: [snip] > Three identical postings over roughly 1 1/2 hours, and ignoring the > answers posted in the interim. One of you and/or your reader are > stupid. Probably the reader. It's a Google Groups problem. I'm in the midst of e-mail discussions with llothar to get more information and complain to Google. -- Keith Thompson (The_Other_Keith) k@mib.org <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"
Keith Thompson said: > CBFalconer <cbfalco @yahoo.com> writes: >> llothar wrote: > [snip] >> Three identical postings over roughly 1 1/2 hours, and ignoring the >> answers posted in the interim. One of you and/or your reader are >> stupid. Probably the reader. > It's a Google Groups problem. I'm in the midst of e-mail discussions > with llothar to get more information and complain to Google.
What good do you expect that to do? They're not *interested*, Keith. -- Richard Heathfield "Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk email: rjh at the above domain, - www.
Richard Heathfield <r @see.sig.invalid> writes: > Keith Thompson said: >> CBFalconer <cbfalco @yahoo.com> writes: >>> llothar wrote: >> [snip] >>> Three identical postings over roughly 1 1/2 hours, and ignoring the >>> answers posted in the interim. One of you and/or your reader are >>> stupid. Probably the reader. >> It's a Google Groups problem. I'm in the midst of e-mail discussions >> with llothar to get more information and complain to Google. > What good do you expect that to do? They're not *interested*, Keith.
They did eventually fix the default behavior for followups. -- Keith Thompson (The_Other_Keith) k@mib.org <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"
On Thu, May 31, 2007 at 08:18:51AM +0000, Richard Heathfield wrote: > Keith Thompson said: > > CBFalconer <cbfalco@yahoo.com> writes: > >> llothar wrote: > > [snip] > >> Three identical postings over roughly 1 1/2 hours, and ignoring the > >> answers posted in the interim. One of you and/or your reader are > >> stupid. Probably the reader. > > It's a Google Groups problem. I'm in the midst of e-mail discussions > > with llothar to get more information and complain to Google. > What good do you expect that to do? They're not *interested*, Keith.
My opinion on the matter is that Google is recognized as being an excellent control point for juvenile shennanigans and murky 'fun and games'. Without sloppy TOS policies and such, the perpetrators of destructive Usenet incursions and other (often) illegal activies would have to work harder. Complaining to Google of anything that would interfere with this is futile: They know their archiving is carefully selective; they know that the fidelity of their archives is suspect; they know people are using Google Groups to attack targets of opportunity or to disrupt civilized discourse. I suspect you know this too, but are unwilling to admit it to yourself. Regards, Steve
|
 |
 |
 |
 |
|