mirror of
https://github.com/corda/corda.git
synced 2025-06-06 09:21:47 +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)
|
$(jni-library): $(jni-objects)
|
||||||
@echo "linking $(@)"
|
@echo "linking $(@)"
|
||||||
$(cc) $(lflags) $(shared) $(^) -o $(@)
|
$(cc) $(lflags) $(shared) $(^) -o $(@) -lssl -lcrypto
|
||||||
|
|
||||||
$(executable): $(interpreter-objects) $(stdcpp-objects)
|
$(executable): $(interpreter-objects) $(stdcpp-objects)
|
||||||
@echo "linking $(@)"
|
@echo "linking $(@)"
|
||||||
|
@ -2605,6 +2605,11 @@ collect(Thread* t, Heap::CollectionType type)
|
|||||||
void
|
void
|
||||||
printTrace(Thread* t, object exception)
|
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)) {
|
for (object e = exception; e; e = throwableCauseUnsafe(t, e)) {
|
||||||
if (e != exception) {
|
if (e != exception) {
|
||||||
fprintf(stderr, "caused by: ");
|
fprintf(stderr, "caused by: ");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user