This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Re: Profiling gdb?

_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.


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. 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).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]