one more question about API

See file SBThread.h:
comment about stop reason-data:
    // eStopReasonException N exception data
What is "exception data" ?

Thanks in advance.

That is the raw data that comes with the Mach Exceptions. Each exception contains a code and a sub code & some data. The interpretation depends on the exception. Exceptions are defined in /usr/include/mach/exception_types.h, and there's generally a machine specific file in /usr/include/mach/i386/exception.h with machine specific info.

You can also look in StopInfoMachException.cpp for more details if you want to know more.


This value with be the actual value of the exception (no matter what index is actually passed in). The integer value will be one of the #define values that starts with EXC_ from /usr/include/mach/exception_types.h on MacOSX. On other platforms it will be something that describes the exception. You really don't need to worry about displaying this at all as the text from the exception should be enough for you to get by (just show the description) which should be accesssed with:

    SBThread::GetStopDescription (char *dst, size_t dst_len);

This enumeration really gives you more of a classification of why the thread stopped:


eStopReasonException is the most severe of all of the stops and usually signals that you might not be able to continue your program, so you might want to display different icons for each of these and make the "eStopReasonException" icon more red to show it is more of an error case. All of the other values are normal stop reasons that are always easily dealt with.

Also know that if you have N threads running, each thread will have a different stop reason. If a thread has a stop reason of eStopReasonNone, then it just got stopped because the other threads had a reason to stop and they were suspended.

Greg Clayton

Thank you Jim!

Displaying different icons on gutter and against threads in list when stopped is great idea. Thank you. Will do it in this way :wink: