blob: 181b6b0c5e92d4bd8ff2bd8beec9fd21bb3f6b01 [file] [log] [blame]
Chris Lattner24943d22010-06-08 16:52:24 +00001//===-- SBInstruction.cpp ---------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "lldb/API/SBInstruction.h"
11
12#include "lldb/Core/Disassembler.h"
13
14using namespace lldb;
15using namespace lldb_private;
16
17//SBInstruction::SBInstruction (lldb_private::Disassembler::Instruction *lldb_insn) :
Greg Clayton63094e02010-06-23 01:19:29 +000018// m_opaque_sp (lldb_insn);
Chris Lattner24943d22010-06-08 16:52:24 +000019//{
20//}
21
22SBInstruction::SBInstruction ()
23{
24}
25
26SBInstruction::~SBInstruction ()
27{
28}
29
30//bool
31//SBInstruction::IsValid()
32//{
Greg Clayton63094e02010-06-23 01:19:29 +000033// return (m_opaque_sp.get() != NULL);
Chris Lattner24943d22010-06-08 16:52:24 +000034//}
35
36//size_t
37//SBInstruction::GetByteSize ()
38//{
39// if (IsValid())
40// {
Greg Clayton63094e02010-06-23 01:19:29 +000041// return m_opaque_sp->GetByteSize();
Chris Lattner24943d22010-06-08 16:52:24 +000042// }
43// return 0;
44//}
45
46//void
47//SBInstruction::SetByteSize (size_T byte_size)
48//{
49// if (IsValid ())
50// {
Greg Clayton63094e02010-06-23 01:19:29 +000051// m_opaque_sp->SetByteSize (byte_size);
Chris Lattner24943d22010-06-08 16:52:24 +000052// }
53//}
54
55//bool
56//SBInstruction::DoesBranch ()
57//{
58// if (IsValid ())
59// {
Greg Clayton63094e02010-06-23 01:19:29 +000060// return m_opaque_sp->DoesBranch ();
Chris Lattner24943d22010-06-08 16:52:24 +000061// }
62// return false;
63//}
64
65void
66SBInstruction::Print (FILE *out)
67{
68 if (out == NULL)
69 return;
70
71 //StreamFile out_strem (out);
72
Greg Clayton63094e02010-06-23 01:19:29 +000073 //m_opaque_sp->Dump (out, LLDB_INVALID_ADDRESS, NULL, 0);
Chris Lattner24943d22010-06-08 16:52:24 +000074}