mirror of
https://github.com/corda/corda.git
synced 2025-01-19 03:06:36 +00:00
If you pass 0 to printTrace, it will print the stack trace of a null
pointer exception. This dramatically simplifies debugging in GDB: p vm::printTrace(t, 0)
This commit is contained in:
parent
a9bbaff74f
commit
05321e97f9
2
makefile
2
makefile
@ -225,7 +225,7 @@ $(jni-objects): $(bld)/%.o: $(classpath)/%.cpp
|
||||
|
||||
$(jni-library): $(jni-objects)
|
||||
@echo "linking $(@)"
|
||||
$(cc) $(lflags) $(shared) $(^) -o $(@)
|
||||
$(cc) $(lflags) $(shared) $(^) -o $(@) -lssl -lcrypto
|
||||
|
||||
$(executable): $(interpreter-objects) $(stdcpp-objects)
|
||||
@echo "linking $(@)"
|
||||
|
@ -2605,6 +2605,11 @@ collect(Thread* t, Heap::CollectionType type)
|
||||
void
|
||||
printTrace(Thread* t, object exception)
|
||||
{
|
||||
if (exception == 0) {
|
||||
exception = makeNullPointerException(t, 0,
|
||||
makeTrace(t, t->m->processor->frameStart(t)),
|
||||
0);
|
||||
}
|
||||
for (object e = exception; e; e = throwableCauseUnsafe(t, e)) {
|
||||
if (e != exception) {
|
||||
fprintf(stderr, "caused by: ");
|
||||
|
Loading…
Reference in New Issue
Block a user