public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-4002] [Ada] Document that gnatmem requires fixed-position executables Date: Fri, 1 Oct 2021 06:14:15 +0000 (GMT) [thread overview] Message-ID: <20211001061415.C030E3857C5B@sourceware.org> (raw) https://gcc.gnu.org/g:c4f826d933368a60087f9bcc72c798cf005a6636 commit r12-4002-gc4f826d933368a60087f9bcc72c798cf005a6636 Author: Eric Botcazou <ebotcazou@adacore.com> Date: Wed Aug 4 15:07:17 2021 +0200 [Ada] Document that gnatmem requires fixed-position executables gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst (gnatmem): Document that it works only with fixed-position executables. Diff: --- gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst index c4f186ef130..24ef9d6ca41 100644 --- a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst +++ b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst @@ -3680,8 +3680,9 @@ execution of this erroneous program: The ``gnatmem`` utility monitors dynamic allocation and deallocation activity in a program, and displays information about incorrect deallocations and possible sources of memory leaks. - It is designed to work in association with a static runtime library - only and in this context provides three types of information: + It is designed to work for fixed-position executables in association + with a static runtime library only and in this context provides three + types of information: * General information concerning memory management, such as the total number of allocations and deallocations, the amount of allocated @@ -3711,15 +3712,16 @@ execution of this erroneous program: $ gnatmem [ switches ] [ DEPTH ] user_program - The program must have been linked with the instrumented version of the + The user program must be linked with the instrumented version of the allocation and deallocation routines. This is done by linking with the :file:`libgmem.a` library. For correct symbolic backtrace information, - the user program should be compiled with debugging options - (see :ref:`Switches_for_gcc`). For example to build :file:`my_program`: + the user program should also both be compiled with debugging options + (see :ref:`Switches_for_gcc`) and be linked at a fixed position. For + example to build :file:`my_program` with ``gnatmake``: :: - $ gnatmake -g my_program -largs -lgmem + $ gnatmake -g my_program -largs -lgmem -no-pie As library :file:`libgmem.a` contains an alternate body for package ``System.Memory``, :file:`s-memory.adb` should not be compiled and linked
reply other threads:[~2021-10-01 6:14 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211001061415.C030E3857C5B@sourceware.org \ --to=pmderodat@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).