diff --git a/src/apps/debugger/arch/x86/ArchitectureX86.cpp b/src/apps/debugger/arch/x86/ArchitectureX86.cpp
index b0bec17..e1c8488 100644
a
|
b
|
ArchitectureX86::CreateStackFrame(Image* image, FunctionDebugInfo* function,
|
272 | 272 | CpuState*& _previousCpuState) |
273 | 273 | { |
274 | 274 | CpuStateX86* cpuState = dynamic_cast<CpuStateX86*>(_cpuState); |
275 | | |
| 275 | if (!cpuState) { |
| 276 | fprintf(stderr, "ArchitectureX86::CreateStackFrame(): \ |
| 277 | Dynamic Cast failed"); |
| 278 | return B_ERROR; |
| 279 | } |
| 280 | |
276 | 281 | uint32 framePointer = cpuState->IntRegisterValue(X86_REGISTER_EBP); |
277 | 282 | uint32 eip = cpuState->IntRegisterValue(X86_REGISTER_EIP); |
278 | 283 | |
… |
… |
ArchitectureX86::UpdateStackFrameCpuState(const StackFrame* frame,
|
416 | 421 | // This is not a top frame, so we want to offset eip to the previous |
417 | 422 | // (calling) instruction. |
418 | 423 | CpuStateX86* cpuState = dynamic_cast<CpuStateX86*>(previousCpuState); |
| 424 | if (!cpuState) |
| 425 | debugger("ArchitectureX86::CreateStackFrame(): \ |
| 426 | Dynamic Cast failed"); |
419 | 427 | |
420 | 428 | // get eip |
421 | 429 | uint32 eip = cpuState->IntRegisterValue(X86_REGISTER_EIP); |
… |
… |
ArchitectureX86::GetReturnAddressLocation(StackFrame* frame,
|
676 | 684 | } else { |
677 | 685 | ValuePieceLocation piece; |
678 | 686 | CpuStateX86* state = dynamic_cast<CpuStateX86*>(frame->GetCpuState()); |
| 687 | if (!state) { |
| 688 | fprintf(stderr, "ArchitectureX86::GetReturnAddressLocation(): \ |
| 689 | Dynamic Cast failed"); |
| 690 | return B_ERROR; |
| 691 | } |
| 692 | |
679 | 693 | piece.SetToMemory(state->IntRegisterValue(X86_REGISTER_EAX)); |
680 | 694 | piece.SetSize(valueSize); |
681 | 695 | if (!location->AddPiece(piece)) |
diff --git a/src/apps/debugger/user_interface/gui/util/SettingsMenu.cpp b/src/apps/debugger/user_interface/gui/util/SettingsMenu.cpp
index 6165eef..730f2c8 100644
a
|
b
|
|
16 | 16 | #include "MessageCodes.h" |
17 | 17 | #include "SettingsDescription.h" |
18 | 18 | |
19 | | |
20 | 19 | // #pragma mark - SettingsMenu |
21 | 20 | |
22 | 21 | |
… |
… |
public:
|
176 | 175 | { |
177 | 176 | SettingsOption* selectedOption = settings->OptionValue( |
178 | 177 | dynamic_cast<OptionsSetting*>(GetSetting())); |
| 178 | if (!selectedOption) |
| 179 | debugger("SettingsMenuImpl::PrepareToShow(): \ |
| 180 | Dynamic cast failed"); |
179 | 181 | |
180 | 182 | for (int32 i = 0; BMenuItem* item = Submenu()->ItemAt(i); i++) { |
181 | 183 | OptionMenuItem* optionItem = dynamic_cast<OptionMenuItem*>(item); |
diff --git a/src/apps/debugger/value/value_nodes/ArrayValueNode.cpp b/src/apps/debugger/value/value_nodes/ArrayValueNode.cpp
index bc05323..381c10f 100644
a
|
b
|
ArrayValueNodeChild::ResolveLocation(ValueLoader* valueLoader,
|
315 | 315 | |
316 | 316 | child = dynamic_cast<AbstractArrayValueNodeChild*>( |
317 | 317 | child->ArrayParent()->NodeChild()); |
| 318 | if (!child) { |
| 319 | fprintf(stderr, "ArrayValueNodeChild::ResolveLocation(): \ |
| 320 | Dynamic cast failed"); |
| 321 | return B_ERROR; |
| 322 | } |
318 | 323 | } |
319 | 324 | |
320 | 325 | // resolve the element location |
diff --git a/src/apps/debugger/value/value_nodes/BMessageValueNode.cpp b/src/apps/debugger/value/value_nodes/BMessageValueNode.cpp
index 0da34fe..318e222 100644
a
|
b
|
public:
|
70 | 70 | ValueLocation* parentLocation = fParent->Location(); |
71 | 71 | ValueLocation* location; |
72 | 72 | CompoundType* type = dynamic_cast<CompoundType*>(fParent->GetType()); |
| 73 | if (!type) |
| 74 | debugger("Dynamic cast failed"); |
| 75 | |
73 | 76 | status_t error = B_OK; |
74 | 77 | if (fParent->fIsFlatMessage) { |
75 | 78 | location = new ValueLocation(); |
… |
… |
BMessageValueNode::CreateChildren()
|
334 | 337 | { |
335 | 338 | DataMember* member = NULL; |
336 | 339 | CompoundType* messageType = dynamic_cast<CompoundType*>(fType); |
| 340 | if (!messageType) { |
| 341 | fprintf(stderr, "BMessageValueNode::CreateChildren(): \ |
| 342 | Dynamic cast failed"); |
| 343 | return B_ERROR; |
| 344 | } |
| 345 | |
337 | 346 | for (int32 i = 0; i < messageType->CountDataMembers(); i++) { |
338 | 347 | member = messageType->DataMemberAt(i); |
339 | 348 | if (strcmp(member->Name(), "what") == 0) { |