Debugger: Add definitions for signal dispositions.
- Add header for defining the possible signal dispositions that can be configured. - Add corresponding UI helper function to map to a string representation.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2015, Rene Gollent, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef SIGNAL_DISPOSITION_TYPES_H
|
||||
#define SIGNAL_DISPOSITION_TYPES_H
|
||||
|
||||
|
||||
enum SignalDisposition {
|
||||
SIGNAL_DISPOSITION_IGNORE = 0,
|
||||
SIGNAL_DISPOSITION_STOP_AT_RECEIPT,
|
||||
SIGNAL_DISPOSITION_STOP_AT_SIGNAL_HANDLER,
|
||||
// NB: if the team has no signal handler installed for
|
||||
// the corresponding signal, this implies stop at receipt.
|
||||
|
||||
SIGNAL_DISPOSITION_MAX
|
||||
};
|
||||
|
||||
|
||||
#endif // SIGNAL_DISPOSITION_TYPES_H
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "FunctionInstance.h"
|
||||
#include "Image.h"
|
||||
#include "RangeList.h"
|
||||
#include "SignalDispositionTypes.h"
|
||||
#include "StackFrame.h"
|
||||
#include "Team.h"
|
||||
#include "TeamMemoryBlock.h"
|
||||
@@ -559,3 +560,21 @@ UiUtils::FormatSIMDValue(const BVariant& value, uint32 bitSize,
|
||||
|
||||
return _output;
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
UiUtils::SignalDispositionToString(int disposition)
|
||||
{
|
||||
switch (disposition) {
|
||||
case SIGNAL_DISPOSITION_IGNORE:
|
||||
return "Ignore";
|
||||
case SIGNAL_DISPOSITION_STOP_AT_RECEIPT:
|
||||
return "Stop at receipt";
|
||||
case SIGNAL_DISPOSITION_STOP_AT_SIGNAL_HANDLER:
|
||||
return "Stop at signal handler";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
@@ -74,6 +74,8 @@ public:
|
||||
static const BString& FormatSIMDValue(const BVariant& value,
|
||||
uint32 bitSize, uint32 format,
|
||||
BString& _output);
|
||||
|
||||
static const char* SignalDispositionToString(int disposition);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user