Bug 840319: Keep js/src/gdb/gdb-tests.cpp's 'breakpoint' function from being unified with other functions in SM. r=sfink

This commit is contained in:
Jim Blandy 2013-02-12 11:55:00 -08:00
parent a2d95150b3
commit f32a41d7c9

View File

@ -44,7 +44,13 @@ void reportError(JSContext *cx, const char *message, JSErrorReport *report)
// prolog.py sets a breakpoint on this function; test functions can call it
// to easily return control to GDB where desired.
void breakpoint() {}
void breakpoint() {
// If we leave this function empty, the linker will unify it with other
// empty functions throughout SpiderMonkey. If we then set a GDB
// breakpoint on it, that breakpoint will hit at all sorts of random
// times. So make it perform a distinctive side effect.
fprintf(stderr, "Called " __FILE__ ":breakpoint\n");
}
GDBFragment *GDBFragment::allFragments = NULL;