comp.lang.ada
 help / color / mirror / Atom feed
* gnatmem
@ 2009-05-30 10:42 Olivier Scalbert
  2009-06-01 15:55 ` gnatmem Rob Norris
  0 siblings, 1 reply; 8+ messages in thread
From: Olivier Scalbert @ 2009-05-30 10:42 UTC (permalink / raw)


Hello,

I would like to detect (potential) memory leak problems in Ada programs. 
I think gnatmem can do that.
I am using debian and I do not found any package containing gnatmem.
Do I miss something, or is there an other tool somewhere ?

Thanks,

Olivier.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnatmem
  2009-05-30 10:42 gnatmem Olivier Scalbert
@ 2009-06-01 15:55 ` Rob Norris
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Norris @ 2009-06-01 15:55 UTC (permalink / raw)


On Sat, 30 May 2009 12:42:12 +0200, Olivier Scalbert <olivier.scalbert@algosyn.com> wrote:

>Hello,
>
>I would like to detect (potential) memory leak problems in Ada programs. 
>I think gnatmem can do that.
>I am using debian and I do not found any package containing gnatmem.
>Do I miss something, or is there an other tool somewhere ?
>
>Thanks,
>
>Olivier.

You can try using the valgrind suite of programs.

I think valgrind is the debian package name too.

I think you'll need to modify your linking command (normally in a Makefile or gpr) to use the
valgrind library(s).

Valgrind comes with pretty extensive help on and off line.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* gnatmem
@ 2012-01-10 15:26 Robert Matthews
  2012-01-10 16:00 ` gnatmem Ludovic Brenta
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Matthews @ 2012-01-10 15:26 UTC (permalink / raw)


I am trying to use gnatmem on Ubuntu 11.10 with gnat 4.6.1, but I can't find 
it. It is availabe with the Libre 2011 version but with that version of gnat 
I get a link error (can't find crt1.0 - but which does exist in 
/usr/lib/i386-linux-gnu).

Please help!

Thanks,

Robert



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnatmem
  2012-01-10 15:26 gnatmem Robert Matthews
@ 2012-01-10 16:00 ` Ludovic Brenta
  2012-01-10 17:08   ` gnatmem Robert Matthews
  2012-01-12 11:41   ` gnatmem Ludovic Brenta
  0 siblings, 2 replies; 8+ messages in thread
From: Ludovic Brenta @ 2012-01-10 16:00 UTC (permalink / raw)


Robert Matthews wrote:
> I am trying to use gnatmem on Ubuntu 11.10 with gnat 4.6.1, but I can't find
> it. It is availabe with the Libre 2011 version but with that version of gnat
> I get a link error (can't find crt1.0 - but which does exist in
> /usr/lib/i386-linux-gnu).
>
> Please help!

The fact that gnatmem is not in the package gnat-4.6 is an oversight
on my part. I'll fix it. Note that the fix will appear in Debian
unstable, then possibly Debian testing, before it migrates to Ubuntu.

In the mean time, maybe you can export LD_LIBRARY_PATH=/usr/lib/i386-
linux-gnu and run the gnatmem from GNAT GPL Edition. Or, you can use
valgrind.

--
Ludovic Brenta.
gnat maintainer in Debian



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnatmem
  2012-01-10 16:00 ` gnatmem Ludovic Brenta
@ 2012-01-10 17:08   ` Robert Matthews
  2012-01-10 17:20     ` gnatmem Georg Bauhaus
  2012-01-12 11:41   ` gnatmem Ludovic Brenta
  1 sibling, 1 reply; 8+ messages in thread
From: Robert Matthews @ 2012-01-10 17:08 UTC (permalink / raw)


Ludovic Brenta wrote:

> Robert Matthews wrote:
>> I am trying to use gnatmem on Ubuntu 11.10 with gnat 4.6.1, but I can't
>> find it. It is availabe with the Libre 2011 version but with that version
>> of gnat I get a link error (can't find crt1.0 - but which does exist in
>> /usr/lib/i386-linux-gnu).
>>
>> Please help!
> 
> The fact that gnatmem is not in the package gnat-4.6 is an oversight
> on my part. I'll fix it. Note that the fix will appear in Debian
> unstable, then possibly Debian testing, before it migrates to Ubuntu.
> 
> In the mean time, maybe you can export LD_LIBRARY_PATH=/usr/lib/i386-
> linux-gnu and run the gnatmem from GNAT GPL Edition. Or, you can use
> valgrind.
> 
> --
> Ludovic Brenta.
> gnat maintainer in Debian

I just tried setting LD_LIBRARY_PATH but the linker (with GNAT GPL 2011)
still complains it cannot find crt1.o (sorry: I put crt1.0 earlier). 
Curiously I don't get that error with gnat 4.6.1.

As for valgrind - that gives me a HUGE number of memory leak messages,
the bulk to do with Gtk and seemingly unrelated to my code - I wonder if 
on Unbuntu "G_SLICE=always-malloc" and "G_DEBUG=gc-friendly" are ignored.

Robert



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnatmem
  2012-01-10 17:08   ` gnatmem Robert Matthews
@ 2012-01-10 17:20     ` Georg Bauhaus
  2012-01-10 18:50       ` gnatmem Robert Matthews
  0 siblings, 1 reply; 8+ messages in thread
From: Georg Bauhaus @ 2012-01-10 17:20 UTC (permalink / raw)


On 10.01.12 18:08, Robert Matthews wrote:

> I just tried setting LD_LIBRARY_PATH but the linker (with GNAT GPL 2011)
> still complains it cannot find crt1.o (sorry: I put crt1.0 earlier). 
> Curiously I don't get that error with gnat 4.6.1.

I vaguely recall a similar linker issue (32bit on a 64bit machine)
that was solved by setting LIBRARY_PATH, not LD_LIBRARY_PATH.
Don't know whether or not this has anything to do with it, just
mentioning.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnatmem
  2012-01-10 17:20     ` gnatmem Georg Bauhaus
@ 2012-01-10 18:50       ` Robert Matthews
  0 siblings, 0 replies; 8+ messages in thread
From: Robert Matthews @ 2012-01-10 18:50 UTC (permalink / raw)


Georg Bauhaus wrote:

> On 10.01.12 18:08, Robert Matthews wrote:
> 
>> I just tried setting LD_LIBRARY_PATH but the linker (with GNAT GPL 2011)
>> still complains it cannot find crt1.o (sorry: I put crt1.0 earlier).
>> Curiously I don't get that error with gnat 4.6.1.
> 
> I vaguely recall a similar linker issue (32bit on a 64bit machine)
> that was solved by setting LIBRARY_PATH, not LD_LIBRARY_PATH.
> Don't know whether or not this has anything to do with it, just
> mentioning.

Setting LIBRARY_PATH did it (though I am on a 32-bit system)!
I can now run gnatmem from GNAT GPL 2011.

Thank you. 

Robert.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnatmem
  2012-01-10 16:00 ` gnatmem Ludovic Brenta
  2012-01-10 17:08   ` gnatmem Robert Matthews
@ 2012-01-12 11:41   ` Ludovic Brenta
  1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Brenta @ 2012-01-12 11:41 UTC (permalink / raw)


Ludovic Brenta wrote on comp.lang.ada:
> The fact that gnatmem is not in the package gnat-4.6 is an oversight
> on my part. I'll fix it. Note that the fix will appear in Debian
> unstable, then possibly Debian testing, before it migrates to Ubuntu.

I checked. gnatmem is no longer part of GCC and no longer available
from a public source repository, but only as part of GNAT GPL Edition;
the sources are separate from the sources of GCC or GNAT. This
ChangeLog entry from the Subversion repository for GCC is
explicit:

------------------------------------------------------------------------
r165776 | charlet | 2010-10-21 06:27:26 -0700 (Thu, 21 Oct 2010) | 15
lines
Changed paths:
   M /trunk/gcc/ada/ChangeLog
   M /trunk/gcc/ada/einfo.ads
   M /trunk/gcc/ada/gcc-interface/Makefile.in
   D /trunk/gcc/ada/gmem.c
   D /trunk/gcc/ada/gnatmem.adb
   D /trunk/gcc/ada/memroot.adb
   D /trunk/gcc/ada/memroot.ads
   M /trunk/gcc/ada/sem_ch3.adb

2010-10-21  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb: Minor reformatting.

2010-10-21  Thomas Quinot  <quinot@adacore.com>

	* einfo.ads (Next_Girder_Discriminant): Remove obsolete description
for
	removed routine.

2010-10-21  Nicolas Roche  <roche@adacore.com>

	* gnatmem.adb, memroot.adb, memroot.ads, gmem.c,
	gcc-interface/Makefile.in: Remove gnatmem specific files.


If someone would like to package gnatmem from GNAT GPL Edition for
Debian, they are welcome and I'll sponsor the package; but in the mean
time I recommend valgrind.

--
Ludovic Brenta.
gnat maintainer in Debian



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-12 11:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-30 10:42 gnatmem Olivier Scalbert
2009-06-01 15:55 ` gnatmem Rob Norris
  -- strict thread matches above, loose matches on Subject: below --
2012-01-10 15:26 gnatmem Robert Matthews
2012-01-10 16:00 ` gnatmem Ludovic Brenta
2012-01-10 17:08   ` gnatmem Robert Matthews
2012-01-10 17:20     ` gnatmem Georg Bauhaus
2012-01-10 18:50       ` gnatmem Robert Matthews
2012-01-12 11:41   ` gnatmem Ludovic Brenta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox