This is the mail archive of the
mailing list for the GDB project.
Re: [RFC] Re: Profiling gdb?
Good old emacs - can always be relied on as the keeper of portability
_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.
They are all based on the same berkley code. Looking at the Free/Net
BSD man pages they document.
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
NetBSD hasn't touched the code in yonks (other than to fix portability
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,