Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] Re: Profiling gdb?
Date: Mon, 06 Jan 2003 16:04:00 -0000	[thread overview]
Message-ID: <3E19A90B.10203@redhat.com> (raw)
In-Reply-To: <20030106151054.GA8796@nevyn.them.org>

> 
> _mcleanup() is no more or less published than monstartup(), as far as I
> can tell; I'll submit a glibc patch to document these when I get around
> to it.  I know both FreeBSD and GNU/Linux have these, because that's
> how Emacs controls profiling.

Good old emacs - can always be relied on as the keeper of portability 
knowledge.

FYI,

They are all based on the same berkley code.  Looking at the Free/Net 
BSD man pages they document.

      moncontrol(int mode);

      monstartup(u_long *lowpc, u_long *highpc);

but not _mcleanup() (hence my comment about interfaces).  One thing, 
while the doco indicates pointers, the actual code matches your 
declaration.  So gess we stick with that.

http://www.opengroup.org doesn't mention any of this.

glibc recently modified its internal structures so that are incompatible 
with the other implementations.

FreeBSD also modified the internal structures but in a `forward 
compatible' way.

NetBSD hasn't touched the code in yonks (other than to fix portability 
problems).

> Hmm, make that less documented, since FreeBSD has a man page for
> monstartup.  They're both provided, however.
> 
> I am indeed sure of monstartup()'s function signature - well, at least
> for GNU/Linux; I don't have access to a FreeBSD system but according to
> the source for libc in FreeBSD 5.0 it'll work there too.  Although I
> think it may leak memory in multiple runs, the way I use it.  It's
> declared in a non-system-specific file as taking longs (unsigned, oops,
> will fix).

Andrew



  reply	other threads:[~2003-01-06 16:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020120210343.A22638@nevyn.them.org>
     [not found] ` <3C4B8A6B.30407@cygnus.com>
2003-01-05 22:27   ` Daniel Jacobowitz
2003-01-06  4:39     ` Eli Zaretskii
2003-01-06 14:17     ` Andrew Cagney
2003-01-06 15:12       ` Daniel Jacobowitz
2003-01-06 16:04         ` Andrew Cagney [this message]
2003-01-18  3:51           ` Daniel Jacobowitz
2003-01-06 18:38         ` Eli Zaretskii
2003-01-22 23:52         ` Daniel Jacobowitz

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=3E19A90B.10203@redhat.com \
    --to=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /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: link
Be 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