Elliott Hughes | 872d4ec | 2011-10-21 17:07:15 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2008 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include "debugger.h" |
| 18 | |
| 19 | namespace art { |
| 20 | |
| 21 | bool Dbg::DebuggerStartup() { |
| 22 | UNIMPLEMENTED(FATAL); |
| 23 | return false; |
| 24 | } |
| 25 | |
| 26 | void Dbg::DebuggerShutdown() { |
| 27 | UNIMPLEMENTED(FATAL); |
| 28 | } |
| 29 | |
| 30 | DebugInvokeReq* Dbg::GetInvokeReq() { |
| 31 | UNIMPLEMENTED(FATAL); |
| 32 | return NULL; |
| 33 | } |
| 34 | |
| 35 | void Dbg::Connected() { |
| 36 | UNIMPLEMENTED(FATAL); |
| 37 | } |
| 38 | |
| 39 | void Dbg::Active() { |
| 40 | UNIMPLEMENTED(FATAL); |
| 41 | } |
| 42 | |
| 43 | void Dbg::Disconnected() { |
| 44 | UNIMPLEMENTED(FATAL); |
| 45 | } |
| 46 | |
| 47 | bool Dbg::IsDebuggerConnected() { |
| 48 | UNIMPLEMENTED(WARNING); |
| 49 | return false; |
| 50 | } |
| 51 | |
| 52 | bool Dbg::IsDebuggingEnabled() { |
| 53 | UNIMPLEMENTED(WARNING); |
| 54 | return false; //return gDvm.jdwpConfigured; |
| 55 | } |
| 56 | |
| 57 | int64_t Dbg::LastDebuggerActivity() { |
| 58 | UNIMPLEMENTED(WARNING); |
| 59 | return -1; |
| 60 | } |
| 61 | |
| 62 | int Dbg::ThreadRunning() { |
| 63 | UNIMPLEMENTED(FATAL); |
| 64 | return 0; |
| 65 | } |
| 66 | |
| 67 | int Dbg::ThreadWaiting() { |
| 68 | UNIMPLEMENTED(FATAL); |
| 69 | return 0; |
| 70 | } |
| 71 | |
| 72 | int Dbg::ThreadContinuing(int status) { |
| 73 | UNIMPLEMENTED(FATAL); |
| 74 | return 0; |
| 75 | } |
| 76 | |
| 77 | void Dbg::UndoDebuggerSuspensions() { |
| 78 | UNIMPLEMENTED(FATAL); |
| 79 | } |
| 80 | |
| 81 | void Dbg::Exit(int status) { |
| 82 | UNIMPLEMENTED(FATAL); |
| 83 | } |
| 84 | |
| 85 | const char* Dbg::GetClassDescriptor(JDWP::RefTypeId id) { |
| 86 | UNIMPLEMENTED(FATAL); |
| 87 | return NULL; |
| 88 | } |
| 89 | |
| 90 | JDWP::ObjectId Dbg::GetClassObject(JDWP::RefTypeId id) { |
| 91 | UNIMPLEMENTED(FATAL); |
| 92 | return 0; |
| 93 | } |
| 94 | |
| 95 | JDWP::RefTypeId Dbg::GetSuperclass(JDWP::RefTypeId id) { |
| 96 | UNIMPLEMENTED(FATAL); |
| 97 | return 0; |
| 98 | } |
| 99 | |
| 100 | JDWP::ObjectId Dbg::GetClassLoader(JDWP::RefTypeId id) { |
| 101 | UNIMPLEMENTED(FATAL); |
| 102 | return 0; |
| 103 | } |
| 104 | |
| 105 | uint32_t Dbg::GetAccessFlags(JDWP::RefTypeId id) { |
| 106 | UNIMPLEMENTED(FATAL); |
| 107 | return 0; |
| 108 | } |
| 109 | |
| 110 | bool Dbg::IsInterface(JDWP::RefTypeId id) { |
| 111 | UNIMPLEMENTED(FATAL); |
| 112 | return false; |
| 113 | } |
| 114 | |
| 115 | void Dbg::GetClassList(uint32_t* pNumClasses, JDWP::RefTypeId** pClassRefBuf) { |
| 116 | UNIMPLEMENTED(FATAL); |
| 117 | } |
| 118 | |
| 119 | void Dbg::GetVisibleClassList(JDWP::ObjectId classLoaderId, uint32_t* pNumClasses, JDWP::RefTypeId** pClassRefBuf) { |
| 120 | UNIMPLEMENTED(FATAL); |
| 121 | } |
| 122 | |
| 123 | void Dbg::GetClassInfo(JDWP::RefTypeId classId, uint8_t* pTypeTag, uint32_t* pStatus, const char** pSignature) { |
| 124 | UNIMPLEMENTED(FATAL); |
| 125 | } |
| 126 | |
| 127 | bool Dbg::FindLoadedClassBySignature(const char* classDescriptor, JDWP::RefTypeId* pRefTypeId) { |
| 128 | UNIMPLEMENTED(FATAL); |
| 129 | return false; |
| 130 | } |
| 131 | |
| 132 | void Dbg::GetObjectType(JDWP::ObjectId objectId, uint8_t* pRefTypeTag, JDWP::RefTypeId* pRefTypeId) { |
| 133 | UNIMPLEMENTED(FATAL); |
| 134 | } |
| 135 | |
| 136 | uint8_t Dbg::GetClassObjectType(JDWP::RefTypeId refTypeId) { |
| 137 | UNIMPLEMENTED(FATAL); |
| 138 | return 0; |
| 139 | } |
| 140 | |
| 141 | const char* Dbg::GetSignature(JDWP::RefTypeId refTypeId) { |
| 142 | UNIMPLEMENTED(FATAL); |
| 143 | return NULL; |
| 144 | } |
| 145 | |
| 146 | const char* Dbg::GetSourceFile(JDWP::RefTypeId refTypeId) { |
| 147 | UNIMPLEMENTED(FATAL); |
| 148 | return NULL; |
| 149 | } |
| 150 | |
| 151 | const char* Dbg::GetObjectTypeName(JDWP::ObjectId objectId) { |
| 152 | UNIMPLEMENTED(FATAL); |
| 153 | return NULL; |
| 154 | } |
| 155 | |
| 156 | uint8_t Dbg::GetObjectTag(JDWP::ObjectId objectId) { |
| 157 | UNIMPLEMENTED(FATAL); |
| 158 | return 0; |
| 159 | } |
| 160 | |
| 161 | int Dbg::GetTagWidth(int tag) { |
| 162 | UNIMPLEMENTED(FATAL); |
| 163 | return 0; |
| 164 | } |
| 165 | |
| 166 | int Dbg::GetArrayLength(JDWP::ObjectId arrayId) { |
| 167 | UNIMPLEMENTED(FATAL); |
| 168 | return 0; |
| 169 | } |
| 170 | |
| 171 | uint8_t Dbg::GetArrayElementTag(JDWP::ObjectId arrayId) { |
| 172 | UNIMPLEMENTED(FATAL); |
| 173 | return 0; |
| 174 | } |
| 175 | |
| 176 | bool Dbg::OutputArray(JDWP::ObjectId arrayId, int firstIndex, int count, JDWP::ExpandBuf* pReply) { |
| 177 | UNIMPLEMENTED(FATAL); |
| 178 | return false; |
| 179 | } |
| 180 | |
| 181 | bool Dbg::SetArrayElements(JDWP::ObjectId arrayId, int firstIndex, int count, const uint8_t* buf) { |
| 182 | UNIMPLEMENTED(FATAL); |
| 183 | return false; |
| 184 | } |
| 185 | |
| 186 | JDWP::ObjectId Dbg::CreateString(const char* str) { |
| 187 | UNIMPLEMENTED(FATAL); |
| 188 | return 0; |
| 189 | } |
| 190 | |
| 191 | JDWP::ObjectId Dbg::CreateObject(JDWP::RefTypeId classId) { |
| 192 | UNIMPLEMENTED(FATAL); |
| 193 | return 0; |
| 194 | } |
| 195 | |
| 196 | JDWP::ObjectId Dbg::CreateArrayObject(JDWP::RefTypeId arrayTypeId, uint32_t length) { |
| 197 | UNIMPLEMENTED(FATAL); |
| 198 | return 0; |
| 199 | } |
| 200 | |
| 201 | bool Dbg::MatchType(JDWP::RefTypeId instClassId, JDWP::RefTypeId classId) { |
| 202 | UNIMPLEMENTED(FATAL); |
| 203 | return false; |
| 204 | } |
| 205 | |
| 206 | const char* Dbg::GetMethodName(JDWP::RefTypeId refTypeId, JDWP::MethodId id) { |
| 207 | UNIMPLEMENTED(FATAL); |
| 208 | return NULL; |
| 209 | } |
| 210 | |
| 211 | void Dbg::OutputAllFields(JDWP::RefTypeId refTypeId, bool withGeneric, JDWP::ExpandBuf* pReply) { |
| 212 | UNIMPLEMENTED(FATAL); |
| 213 | } |
| 214 | |
| 215 | void Dbg::OutputAllMethods(JDWP::RefTypeId refTypeId, bool withGeneric, JDWP::ExpandBuf* pReply) { |
| 216 | UNIMPLEMENTED(FATAL); |
| 217 | } |
| 218 | |
| 219 | void Dbg::OutputAllInterfaces(JDWP::RefTypeId refTypeId, JDWP::ExpandBuf* pReply) { |
| 220 | UNIMPLEMENTED(FATAL); |
| 221 | } |
| 222 | |
| 223 | void Dbg::OutputLineTable(JDWP::RefTypeId refTypeId, JDWP::MethodId methodId, JDWP::ExpandBuf* pReply) { |
| 224 | UNIMPLEMENTED(FATAL); |
| 225 | } |
| 226 | |
| 227 | void Dbg::OutputVariableTable(JDWP::RefTypeId refTypeId, JDWP::MethodId id, bool withGeneric, JDWP::ExpandBuf* pReply) { |
| 228 | UNIMPLEMENTED(FATAL); |
| 229 | } |
| 230 | |
| 231 | uint8_t Dbg::GetFieldBasicTag(JDWP::ObjectId objId, JDWP::FieldId fieldId) { |
| 232 | UNIMPLEMENTED(FATAL); |
| 233 | return 0; |
| 234 | } |
| 235 | |
| 236 | uint8_t Dbg::GetStaticFieldBasicTag(JDWP::RefTypeId refTypeId, JDWP::FieldId fieldId) { |
| 237 | UNIMPLEMENTED(FATAL); |
| 238 | return 0; |
| 239 | } |
| 240 | |
| 241 | void Dbg::GetFieldValue(JDWP::ObjectId objectId, JDWP::FieldId fieldId, JDWP::ExpandBuf* pReply) { |
| 242 | UNIMPLEMENTED(FATAL); |
| 243 | } |
| 244 | |
| 245 | void Dbg::SetFieldValue(JDWP::ObjectId objectId, JDWP::FieldId fieldId, uint64_t value, int width) { |
| 246 | UNIMPLEMENTED(FATAL); |
| 247 | } |
| 248 | |
| 249 | void Dbg::GetStaticFieldValue(JDWP::RefTypeId refTypeId, JDWP::FieldId fieldId, JDWP::ExpandBuf* pReply) { |
| 250 | UNIMPLEMENTED(FATAL); |
| 251 | } |
| 252 | |
| 253 | void Dbg::SetStaticFieldValue(JDWP::RefTypeId refTypeId, JDWP::FieldId fieldId, uint64_t rawValue, int width) { |
| 254 | UNIMPLEMENTED(FATAL); |
| 255 | } |
| 256 | |
| 257 | char* Dbg::StringToUtf8(JDWP::ObjectId strId) { |
| 258 | UNIMPLEMENTED(FATAL); |
| 259 | return NULL; |
| 260 | } |
| 261 | |
| 262 | char* Dbg::GetThreadName(JDWP::ObjectId threadId) { |
| 263 | UNIMPLEMENTED(FATAL); |
| 264 | return NULL; |
| 265 | } |
| 266 | |
| 267 | JDWP::ObjectId Dbg::GetThreadGroup(JDWP::ObjectId threadId) { |
| 268 | UNIMPLEMENTED(FATAL); |
| 269 | return 0; |
| 270 | } |
| 271 | |
| 272 | char* Dbg::GetThreadGroupName(JDWP::ObjectId threadGroupId) { |
| 273 | UNIMPLEMENTED(FATAL); |
| 274 | return NULL; |
| 275 | } |
| 276 | |
| 277 | JDWP::ObjectId Dbg::GetThreadGroupParent(JDWP::ObjectId threadGroupId) { |
| 278 | UNIMPLEMENTED(FATAL); |
| 279 | return 0; |
| 280 | } |
| 281 | |
| 282 | JDWP::ObjectId Dbg::GetSystemThreadGroupId() { |
| 283 | UNIMPLEMENTED(FATAL); |
| 284 | return 0; |
| 285 | } |
| 286 | |
| 287 | JDWP::ObjectId Dbg::GetMainThreadGroupId() { |
| 288 | UNIMPLEMENTED(FATAL); |
| 289 | return 0; |
| 290 | } |
| 291 | |
| 292 | bool Dbg::GetThreadStatus(JDWP::ObjectId threadId, uint32_t* threadStatus, uint32_t* suspendStatus) { |
| 293 | UNIMPLEMENTED(FATAL); |
| 294 | return false; |
| 295 | } |
| 296 | |
| 297 | uint32_t Dbg::GetThreadSuspendCount(JDWP::ObjectId threadId) { |
| 298 | UNIMPLEMENTED(FATAL); |
| 299 | return 0; |
| 300 | } |
| 301 | |
| 302 | bool Dbg::ThreadExists(JDWP::ObjectId threadId) { |
| 303 | UNIMPLEMENTED(FATAL); |
| 304 | return false; |
| 305 | } |
| 306 | |
| 307 | bool Dbg::IsSuspended(JDWP::ObjectId threadId) { |
| 308 | UNIMPLEMENTED(FATAL); |
| 309 | return false; |
| 310 | } |
| 311 | |
| 312 | //void Dbg::WaitForSuspend(JDWP::ObjectId threadId); |
| 313 | |
| 314 | void Dbg::GetThreadGroupThreads(JDWP::ObjectId threadGroupId, JDWP::ObjectId** ppThreadIds, uint32_t* pThreadCount) { |
| 315 | UNIMPLEMENTED(FATAL); |
| 316 | } |
| 317 | |
| 318 | void Dbg::GetAllThreads(JDWP::ObjectId** ppThreadIds, uint32_t* pThreadCount) { |
| 319 | UNIMPLEMENTED(FATAL); |
| 320 | } |
| 321 | |
| 322 | int Dbg::GetThreadFrameCount(JDWP::ObjectId threadId) { |
| 323 | UNIMPLEMENTED(FATAL); |
| 324 | return 0; |
| 325 | } |
| 326 | |
| 327 | bool Dbg::GetThreadFrame(JDWP::ObjectId threadId, int num, JDWP::FrameId* pFrameId, JDWP::JdwpLocation* pLoc) { |
| 328 | UNIMPLEMENTED(FATAL); |
| 329 | return false; |
| 330 | } |
| 331 | |
| 332 | JDWP::ObjectId Dbg::GetThreadSelfId() { |
| 333 | UNIMPLEMENTED(FATAL); |
| 334 | return 0; |
| 335 | } |
| 336 | |
| 337 | void Dbg::SuspendVM(bool isEvent) { |
| 338 | UNIMPLEMENTED(FATAL); |
| 339 | } |
| 340 | |
| 341 | void Dbg::ResumeVM() { |
| 342 | UNIMPLEMENTED(FATAL); |
| 343 | } |
| 344 | |
| 345 | void Dbg::SuspendThread(JDWP::ObjectId threadId) { |
| 346 | UNIMPLEMENTED(FATAL); |
| 347 | } |
| 348 | |
| 349 | void Dbg::ResumeThread(JDWP::ObjectId threadId) { |
| 350 | UNIMPLEMENTED(FATAL); |
| 351 | } |
| 352 | |
| 353 | void Dbg::SuspendSelf() { |
| 354 | UNIMPLEMENTED(FATAL); |
| 355 | } |
| 356 | |
| 357 | bool Dbg::GetThisObject(JDWP::ObjectId threadId, JDWP::FrameId frameId, JDWP::ObjectId* pThisId) { |
| 358 | UNIMPLEMENTED(FATAL); |
| 359 | return false; |
| 360 | } |
| 361 | |
| 362 | void Dbg::GetLocalValue(JDWP::ObjectId threadId, JDWP::FrameId frameId, int slot, uint8_t tag, uint8_t* buf, int expectedLen) { |
| 363 | UNIMPLEMENTED(FATAL); |
| 364 | } |
| 365 | |
| 366 | void Dbg::SetLocalValue(JDWP::ObjectId threadId, JDWP::FrameId frameId, int slot, uint8_t tag, uint64_t value, int width) { |
| 367 | UNIMPLEMENTED(FATAL); |
| 368 | } |
| 369 | |
| 370 | void Dbg::PostLocationEvent(const Method* method, int pcOffset, Object* thisPtr, int eventFlags) { |
| 371 | UNIMPLEMENTED(FATAL); |
| 372 | } |
| 373 | |
| 374 | void Dbg::PostException(void* throwFp, int throwRelPc, void* catchFp, int catchRelPc, Object* exception) { |
| 375 | UNIMPLEMENTED(FATAL); |
| 376 | } |
| 377 | |
| 378 | void Dbg::PostThreadStart(Thread* t) { |
| 379 | UNIMPLEMENTED(WARNING); |
| 380 | } |
| 381 | |
| 382 | void Dbg::PostThreadDeath(Thread* t) { |
| 383 | UNIMPLEMENTED(WARNING); |
| 384 | } |
| 385 | |
| 386 | void Dbg::PostClassPrepare(Class* c) { |
| 387 | UNIMPLEMENTED(FATAL); |
| 388 | } |
| 389 | |
| 390 | bool Dbg::WatchLocation(const JDWP::JdwpLocation* pLoc) { |
| 391 | UNIMPLEMENTED(FATAL); |
| 392 | return false; |
| 393 | } |
| 394 | |
| 395 | void Dbg::UnwatchLocation(const JDWP::JdwpLocation* pLoc) { |
| 396 | UNIMPLEMENTED(FATAL); |
| 397 | } |
| 398 | |
| 399 | bool Dbg::ConfigureStep(JDWP::ObjectId threadId, JDWP::JdwpStepSize size, JDWP::JdwpStepDepth depth) { |
| 400 | UNIMPLEMENTED(FATAL); |
| 401 | return false; |
| 402 | } |
| 403 | |
| 404 | void Dbg::UnconfigureStep(JDWP::ObjectId threadId) { |
| 405 | UNIMPLEMENTED(FATAL); |
| 406 | } |
| 407 | |
| 408 | JDWP::JdwpError Dbg::InvokeMethod(JDWP::ObjectId threadId, JDWP::ObjectId objectId, JDWP::RefTypeId classId, JDWP::MethodId methodId, uint32_t numArgs, uint64_t* argArray, uint32_t options, uint8_t* pResultTag, uint64_t* pResultValue, JDWP::ObjectId* pExceptObj) { |
| 409 | UNIMPLEMENTED(FATAL); |
| 410 | return JDWP::ERR_NONE; |
| 411 | } |
| 412 | |
| 413 | void Dbg::ExecuteMethod(DebugInvokeReq* pReq) { |
| 414 | UNIMPLEMENTED(FATAL); |
| 415 | } |
| 416 | |
| 417 | void Dbg::RegisterObjectId(JDWP::ObjectId id) { |
| 418 | UNIMPLEMENTED(FATAL); |
| 419 | } |
| 420 | |
| 421 | bool Dbg::DdmHandlePacket(const uint8_t* buf, int dataLen, uint8_t** pReplyBuf, int* pReplyLen) { |
| 422 | UNIMPLEMENTED(FATAL); |
| 423 | return false; |
| 424 | } |
| 425 | |
| 426 | void Dbg::DdmConnected() { |
| 427 | UNIMPLEMENTED(FATAL); |
| 428 | } |
| 429 | |
| 430 | void Dbg::DdmDisconnected() { |
| 431 | UNIMPLEMENTED(FATAL); |
| 432 | } |
| 433 | |
| 434 | void Dbg::DdmSendChunk(int type, size_t length, const uint8_t* buf) { |
| 435 | UNIMPLEMENTED(WARNING) << "DdmSendChunk(" << type << ", " << length << ", " << (void*) buf << ");"; |
| 436 | } |
| 437 | |
| 438 | void Dbg::DdmSendChunkV(int type, const struct iovec* iov, int iovcnt) { |
| 439 | UNIMPLEMENTED(FATAL); |
| 440 | } |
| 441 | |
| 442 | } // namespace art |