|
From: WAROQUIERS P. <phi...@eu...> - 2004-10-01 14:31:34
|
There is one bug (fixed in the CVS) which makes valgrind loop for a certain kind of stabs debug information. With this bug is fixed, at least on our code, we have another stabs entry which makes valgrind complain and then crash. This bug is not fixed yet. We are here using the supported version of gnat, so we have access to a newer version, which supports dwarf-2 debug information. With dwarf-2 debug info, valgrind seems to work properly on some medium size test program. valgrind seems to report some false warnings/errors but not a lot. Bref, it seems to work properly. A very big executable (with dwarf-2 debug info) is understood by valgrind, and startups properly, but I have not yet run the regression tests with it. I think you have now multiple approaches: * you could try to use dwarf-2 debug info with the gnat you have (but I have no idea if this works. Which version of gnat are you using ?) * if you have a support contract with ACT, you can ask ACT to get a beta release of gnat with dwarf-2 support. * Alternatively, you could try the gcc/gnat CVS version in the FSF tree. I think the sources there are quite up to date. I have no idea about the state of gnat in FSF tree, it seems quite shaky these times due to the impact of the heavily changed new gcc 4.0 back-end. * Or, as you suggest, you can compile your Ada code without debug information (assuming that the bugs you are chasing with valgrind are in C/C++ code). As the valgrind web page says: "The Valgrind tools are largely aimed at programs written in C and C++, because programs written in these languages tend to have the most bugs! " :). -----Original Message----- From: Bob Rossi [mailto:bo...@br...] Sent: 01-Oct-2004 15:28 To: val...@li... Subject: Re: [Valgrind-users] valgrind problem On Fri, Oct 01, 2004 at 12:20:24AM +0100, Tom Hughes wrote: > In message <20040930225703.GA3203@white> > Bob Rossi <bo...@br...> wrote: > > > > Is it C code or something else? > > > > It consists of C, C++ and ADA. > > It's probablt the ADA code. There is at least one bug relating to > problems reading the debug information generated by GNAT. I did fix > one bug, so you might like to try the CVS code, but I think there is > another bug open now. It works when there is no debug info at all. Both the latest release and CVS hang when there is debug info. Wonder what the next step is... Thanks, Bob Rossi ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Valgrind-users mailing list Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-users ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. |
|
From: WAROQUIERS P. <phi...@eu...> - 2004-10-01 16:50:23
|
> guess there is some normal amount of debug support that goes into an > application even when '-g' is not used. Have you recompiled the gnat runtime ? If the gnat runtime is compiled with debug info, then your application contains some debug entries from the gnat runtime that can trigger the bug. When you strip the program, then all debug info is gone. > $ /home/GNAT/gnat/bin/gcc --version > 2.8.1 The above gives the gcc version on wihch gnat is based, but does not give the version of gnat itself. The command gnatls -a will give you some info at the beginning giving the gnat version. > Could someone else please try to reproduce this problem? Maybe something > is wrong with my environment. with gnat-5.03w.20040802 and stabs debug info, "hello world" works very well with valgrind 2.2.0 (if we add the patch for bug 87904). However, to have a bigger executable working, we need to switch to dwarf-2 otherwise we trigger the bug 90128. ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. |
|
From: 'Bob R. <bo...@br...> - 2004-10-01 18:17:29
|
On Fri, Oct 01, 2004 at 06:25:23PM +0200, WAROQUIERS Philippe wrote: > > guess there is some normal amount of debug support that goes into an > > application even when '-g' is not used. > Have you recompiled the gnat runtime ? > If the gnat runtime is compiled with debug info, then your application > contains > some debug entries from the gnat runtime that can trigger the bug. > > When you strip the program, then all debug info is gone. I am pretty sure we didn't recompile the GNAT runtime with debug. It can from ACT the way that it is. Is there any way I can check an archive to tell if it was compiled with debug? > > $ /home/GNAT/gnat/bin/gcc --version > > 2.8.1 > The above gives the gcc version on wihch gnat is based, but does not give > the version of gnat itself. The command > gnatls -a > will give you some info at the beginning giving the gnat version. This does not seem to give the gnat version. However, we are using 3.14p. > > > Could someone else please try to reproduce this problem? Maybe something > > is wrong with my environment. > with gnat-5.03w.20040802 and stabs debug info, "hello world" works very > well with valgrind 2.2.0 (if we add the patch for bug 87904). > > However, to have a bigger executable working, we need to switch to dwarf-2 > otherwise we trigger the bug 90128. Sorry, I don't know about these bugs. Are the patches for these bugs currently in CVS? Since I am using the CVS version, I figure this shouldn't be a problem for me. Finally, I tried the FSF's version of GCC that has ADA support and that seems to work well with valgrind. However, I can't switch to that compiler since we don't use that compiler yet to build here. Is there anything I can do to get the current version of GNAT I'm using to work with valgrind in CVS? Thanks, Bob Rossi |
|
From: WAROQUIERS P. <phi...@eu...> - 2004-10-01 18:31:18
|
To have the gnat version, you have to run
gnatls -v
Sorry for the confusion.
> I am pretty sure we didn't recompile the GNAT runtime with debug.
> It can from ACT the way that it is. Is there any way I can check
> an archive to tell if it was compiled with debug?
I do not know how to check for sure but:
* when I take a copy of libgnat.a and I run strip on it, the
size decreases significantly
* and after this strip, nm reports "no symbols in it" while before, it
was reporting plenty of symbols.
So, at least here, we can be pretty sure that the runtime contains some
debugging info.
> Sorry, I don't know about these bugs. Are the patches for these bugs
> currently in CVS? Since I am using the CVS version, I figure this
> shouldn't be a problem for me.
The correction for bug 87904 is in the CVS version. But bug 90128 is
not yet fixed. You can find details about these bugs in bugzilla.
> Finally, I tried the FSF's version of GCC that has ADA support and that
> seems to work well with valgrind.
That is good news.
> Is there anything I can do to get the current version of GNAT I'm using
> to work with valgrind in CVS?
You could try to re-compile the run-time and your code with dwarf2 debug
entries but I doubt that it will work with 3.14p (which is quite old now).
We have here some problems with a recent gnat version (5.03w) when dwarf2 is
used together with -O2 optimisation level.
____
This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.
Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL unless it is confirmed by appropriately signed hard copy.
Any views expressed in this message are those of the sender.
|
|
From: 'Bob R. <bo...@br...> - 2004-10-04 13:26:49
|
On Fri, Oct 01, 2004 at 08:31:03PM +0200, WAROQUIERS Philippe wrote: > > To have the gnat version, you have to run > gnatls -v > Sorry for the confusion. $ /home/GNAT/gnat/bin/gnatls -v GNATLS 3.14p (20010503) Copyright 1997-2001 Free Software Foundation, Inc. > > I am pretty sure we didn't recompile the GNAT runtime with debug. > > It can from ACT the way that it is. Is there any way I can check > > an archive to tell if it was compiled with debug? > I do not know how to check for sure but: > * when I take a copy of libgnat.a and I run strip on it, the > size decreases significantly > * and after this strip, nm reports "no symbols in it" while before, it > was reporting plenty of symbols. OK. So, I have several paths to go down. I want to know what valgrind expects me to do to get passed this issue. Does valgrind officially want to support GNAT 3.14p? This used to work and know doesn't, is there a known reason why? How can I help debug the problem, since I can reproduce it? Thanks, Bob Rossi |
|
From: Tom H. <th...@cy...> - 2004-10-04 14:10:40
|
In message <20041004132638.GD8121@white>
Bob Rossi <bo...@br...> wrote:
> So, I have several paths to go down. I want to know what valgrind
> expects me to do to get passed this issue.
As valgrind is non-sentient is doesn't expect anything.
> Does valgrind officially want to support GNAT 3.14p?
Valgrind doesn't want to do anything. The developers would like to
support as many things as possible and there should certainly be no
reason why a particular programming language shouldn't work.
> This used to work and know doesn't, is there a known reason why?
Not really. The main problems seem to be that GNAT generates some
forms of stab that other compilers don't, combined with the virtual
impossibility of parsing stabs sanely and the fact that there is no
real specification for stabs anyway.
If in doubt then switch to DWARF and you will probably have far
fewer problems. It's the default in gcc 3 on linux anyway.
> How can I help debug the problem, since I can reproduce it?
File a bug with an appropriate test case.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|