Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Show Reason for Crash When Core Debugging

You will need to figure out which thread caused the crash.
I don't see that information given by GDB when quickly looking at some traces.
There may be a command you can send to GDB that will provide that info,
but I don't know myself.

So, if you can figure out the thread id from the output received in eventReceived,
you are set.  If you cannot, then you need some other way to find the crashed thread;
if you find such a way, you will probably need a different mechanism to sent such a
request to GDB, like an extra step in the FinalLaunchSequence for a core file case.
If you cannot find a way to know which thread caused the crash, then, what you can
do is add the crash text to the process level instead of the thread level.

If you do find a way to know which thread crashed, come back to use and we can
clarify a way forward based on your finding.

Also, you can make the suggestion to the GDB community to properly report
a crashed thread in this case.  It sounds like a missing feature if they don't
do that already.

Finally, I'd love to see this contributed back to CDT if you get it working.

Thanks


From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Adam Ward [award@xxxxxxxxxxxxxx]
Sent: June 15, 2016 11:19 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Show Reason for Crash When Core Debugging

Hi all,

 

I'm augmenting core debugging to show the reason for the crash on the thread label in the debug view (like what is seen when a process crashes while actively being debugged). I can see that when a process crashes while being debugged a MIExecAsyncOutput event is received by the eventReceived(Object) method in MIRunControlEventProcessor. The MIExecAsyncOutput event is used to create an MISignalEvent which is dispatched to update the UI. During core debugging an MITargetSelectCore command causes MIConsoleStreamOutput event to be received by this same eventReceived(Object) method which contains the signal and meaning in a string ("Program terminated with signal <signal>, <reason>"). Is there a way I can get an IExecutionDMContext from the MIConsoleStreamOutput so I can build an MISignalEvent or is there a better way of trying to accomplish this?

 

Thanks,

Adam

 

 


Back to the top