blob: ef448167844a8baac1912b437a31f62be14c8ad5 [file] [log] [blame]
Elliott Hughes872d4ec2011-10-21 17:07:15 -07001/*
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
Elliott Hughes3bb81562011-10-21 18:52:59 -070019#include <sys/uio.h>
20
Elliott Hughes872d4ec2011-10-21 17:07:15 -070021namespace art {
22
Elliott Hughes4ffd3132011-10-24 12:06:42 -070023// JDWP is allowed unless the Zygote forbids it.
24static bool gJdwpAllowed = true;
25
Elliott Hughes3bb81562011-10-21 18:52:59 -070026// Was there a -Xrunjdwp or -agent argument on the command-line?
27static bool gJdwpConfigured = false;
28
29// Broken-down JDWP options. (Only valid if gJdwpConfigured is true.)
30static JDWP::JdwpTransportType gJdwpTransport;
31static bool gJdwpServer;
32static bool gJdwpSuspend;
33static std::string gJdwpHost;
34static int gJdwpPort;
35
36// Runtime JDWP state.
37static JDWP::JdwpState* gJdwpState = NULL;
38static bool gDebuggerConnected; // debugger or DDMS is connected.
39static bool gDebuggerActive; // debugger is making requests.
40
41/*
42 * Handle one of the JDWP name/value pairs.
43 *
44 * JDWP options are:
45 * help: if specified, show help message and bail
46 * transport: may be dt_socket or dt_shmem
47 * address: for dt_socket, "host:port", or just "port" when listening
48 * server: if "y", wait for debugger to attach; if "n", attach to debugger
49 * timeout: how long to wait for debugger to connect / listen
50 *
51 * Useful with server=n (these aren't supported yet):
52 * onthrow=<exception-name>: connect to debugger when exception thrown
53 * onuncaught=y|n: connect to debugger when uncaught exception thrown
54 * launch=<command-line>: launch the debugger itself
55 *
56 * The "transport" option is required, as is "address" if server=n.
57 */
58static bool ParseJdwpOption(const std::string& name, const std::string& value) {
59 if (name == "transport") {
60 if (value == "dt_socket") {
61 gJdwpTransport = JDWP::kJdwpTransportSocket;
62 } else if (value == "dt_android_adb") {
63 gJdwpTransport = JDWP::kJdwpTransportAndroidAdb;
64 } else {
65 LOG(ERROR) << "JDWP transport not supported: " << value;
66 return false;
67 }
68 } else if (name == "server") {
69 if (value == "n") {
70 gJdwpServer = false;
71 } else if (value == "y") {
72 gJdwpServer = true;
73 } else {
74 LOG(ERROR) << "JDWP option 'server' must be 'y' or 'n'";
75 return false;
76 }
77 } else if (name == "suspend") {
78 if (value == "n") {
79 gJdwpSuspend = false;
80 } else if (value == "y") {
81 gJdwpSuspend = true;
82 } else {
83 LOG(ERROR) << "JDWP option 'suspend' must be 'y' or 'n'";
84 return false;
85 }
86 } else if (name == "address") {
87 /* this is either <port> or <host>:<port> */
88 std::string port_string;
89 gJdwpHost.clear();
90 std::string::size_type colon = value.find(':');
91 if (colon != std::string::npos) {
92 gJdwpHost = value.substr(0, colon);
93 port_string = value.substr(colon + 1);
94 } else {
95 port_string = value;
96 }
97 if (port_string.empty()) {
98 LOG(ERROR) << "JDWP address missing port: " << value;
99 return false;
100 }
101 char* end;
102 long port = strtol(port_string.c_str(), &end, 10);
103 if (*end != '\0') {
104 LOG(ERROR) << "JDWP address has junk in port field: " << value;
105 return false;
106 }
107 gJdwpPort = port;
108 } else if (name == "launch" || name == "onthrow" || name == "oncaught" || name == "timeout") {
109 /* valid but unsupported */
110 LOG(INFO) << "Ignoring JDWP option '" << name << "'='" << value << "'";
111 } else {
112 LOG(INFO) << "Ignoring unrecognized JDWP option '" << name << "'='" << value << "'";
113 }
114
115 return true;
116}
117
118/*
119 * Parse the latter half of a -Xrunjdwp/-agentlib:jdwp= string, e.g.:
120 * "transport=dt_socket,address=8000,server=y,suspend=n"
121 */
122bool Dbg::ParseJdwpOptions(const std::string& options) {
123 std::vector<std::string> pairs;
124 Split(options, ',', pairs);
125
126 for (size_t i = 0; i < pairs.size(); ++i) {
127 std::string::size_type equals = pairs[i].find('=');
128 if (equals == std::string::npos) {
129 LOG(ERROR) << "Can't parse JDWP option '" << pairs[i] << "' in '" << options << "'";
130 return false;
131 }
132 ParseJdwpOption(pairs[i].substr(0, equals), pairs[i].substr(equals + 1));
133 }
134
135 if (gJdwpTransport == JDWP::kJdwpTransportUnknown) {
136 LOG(ERROR) << "Must specify JDWP transport: " << options;
137 }
138 if (!gJdwpServer && (gJdwpHost.empty() || gJdwpPort == 0)) {
139 LOG(ERROR) << "Must specify JDWP host and port when server=n: " << options;
140 return false;
141 }
142
143 gJdwpConfigured = true;
144 return true;
145}
146
Elliott Hughesd1cc8362011-10-24 16:58:50 -0700147void Dbg::StartJdwp() {
148 // Init JDWP if the debugger is enabled. This may connect out to a
149 // debugger, passively listen for a debugger, or block waiting for a
150 // debugger.
151 if (gJdwpAllowed && gJdwpConfigured) {
152 JDWP::JdwpStartupParams params;
153 params.host = gJdwpHost;
154 params.transport = gJdwpTransport;
155 params.server = gJdwpServer;
156 params.suspend = gJdwpSuspend;
157 params.port = gJdwpPort;
158
159 gJdwpState = JDWP::JdwpStartup(&params);
160 if (gJdwpState == NULL) {
161 LOG(WARNING) << "debugger thread failed to initialize";
162 }
163 }
164
165 // If a debugger has already attached, send the "welcome" message.
166 // This may cause us to suspend all threads.
167 if (JDWP::JdwpIsActive(gJdwpState)) {
168 //ScopedThreadStateChange(Thread::Current(), Thread::kRunnable);
169 if (!JDWP::PostVMStart(gJdwpState, gJdwpSuspend)) {
170 LOG(WARNING) << "failed to post 'start' message to debugger";
171 }
172 }
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700173}
174
Elliott Hughesd1cc8362011-10-24 16:58:50 -0700175void Dbg::StopJdwp() {
176 JDWP::JdwpShutdown(gJdwpState);
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700177}
178
Elliott Hughes4ffd3132011-10-24 12:06:42 -0700179void Dbg::SetJdwpAllowed(bool allowed) {
180 gJdwpAllowed = allowed;
181}
182
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700183DebugInvokeReq* Dbg::GetInvokeReq() {
184 UNIMPLEMENTED(FATAL);
185 return NULL;
186}
187
188void Dbg::Connected() {
Elliott Hughes3bb81562011-10-21 18:52:59 -0700189 CHECK(!gDebuggerConnected);
190 LOG(VERBOSE) << "JDWP has attached";
191 gDebuggerConnected = true;
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700192}
193
194void Dbg::Active() {
195 UNIMPLEMENTED(FATAL);
196}
197
198void Dbg::Disconnected() {
199 UNIMPLEMENTED(FATAL);
200}
201
202bool Dbg::IsDebuggerConnected() {
Elliott Hughes3bb81562011-10-21 18:52:59 -0700203 return gDebuggerActive;
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700204}
205
206bool Dbg::IsDebuggingEnabled() {
Elliott Hughes3bb81562011-10-21 18:52:59 -0700207 return gJdwpConfigured;
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700208}
209
210int64_t Dbg::LastDebuggerActivity() {
211 UNIMPLEMENTED(WARNING);
212 return -1;
213}
214
215int Dbg::ThreadRunning() {
Elliott Hughesd1cc8362011-10-24 16:58:50 -0700216 return static_cast<int>(Thread::Current()->SetState(Thread::kRunnable));
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700217}
218
219int Dbg::ThreadWaiting() {
Elliott Hughesd1cc8362011-10-24 16:58:50 -0700220 return static_cast<int>(Thread::Current()->SetState(Thread::kVmWait));
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700221}
222
223int Dbg::ThreadContinuing(int status) {
224 UNIMPLEMENTED(FATAL);
225 return 0;
226}
227
228void Dbg::UndoDebuggerSuspensions() {
229 UNIMPLEMENTED(FATAL);
230}
231
232void Dbg::Exit(int status) {
233 UNIMPLEMENTED(FATAL);
234}
235
236const char* Dbg::GetClassDescriptor(JDWP::RefTypeId id) {
237 UNIMPLEMENTED(FATAL);
238 return NULL;
239}
240
241JDWP::ObjectId Dbg::GetClassObject(JDWP::RefTypeId id) {
242 UNIMPLEMENTED(FATAL);
243 return 0;
244}
245
246JDWP::RefTypeId Dbg::GetSuperclass(JDWP::RefTypeId id) {
247 UNIMPLEMENTED(FATAL);
248 return 0;
249}
250
251JDWP::ObjectId Dbg::GetClassLoader(JDWP::RefTypeId id) {
252 UNIMPLEMENTED(FATAL);
253 return 0;
254}
255
256uint32_t Dbg::GetAccessFlags(JDWP::RefTypeId id) {
257 UNIMPLEMENTED(FATAL);
258 return 0;
259}
260
261bool Dbg::IsInterface(JDWP::RefTypeId id) {
262 UNIMPLEMENTED(FATAL);
263 return false;
264}
265
266void Dbg::GetClassList(uint32_t* pNumClasses, JDWP::RefTypeId** pClassRefBuf) {
267 UNIMPLEMENTED(FATAL);
268}
269
270void Dbg::GetVisibleClassList(JDWP::ObjectId classLoaderId, uint32_t* pNumClasses, JDWP::RefTypeId** pClassRefBuf) {
271 UNIMPLEMENTED(FATAL);
272}
273
274void Dbg::GetClassInfo(JDWP::RefTypeId classId, uint8_t* pTypeTag, uint32_t* pStatus, const char** pSignature) {
275 UNIMPLEMENTED(FATAL);
276}
277
278bool Dbg::FindLoadedClassBySignature(const char* classDescriptor, JDWP::RefTypeId* pRefTypeId) {
279 UNIMPLEMENTED(FATAL);
280 return false;
281}
282
283void Dbg::GetObjectType(JDWP::ObjectId objectId, uint8_t* pRefTypeTag, JDWP::RefTypeId* pRefTypeId) {
284 UNIMPLEMENTED(FATAL);
285}
286
287uint8_t Dbg::GetClassObjectType(JDWP::RefTypeId refTypeId) {
288 UNIMPLEMENTED(FATAL);
289 return 0;
290}
291
292const char* Dbg::GetSignature(JDWP::RefTypeId refTypeId) {
293 UNIMPLEMENTED(FATAL);
294 return NULL;
295}
296
297const char* Dbg::GetSourceFile(JDWP::RefTypeId refTypeId) {
298 UNIMPLEMENTED(FATAL);
299 return NULL;
300}
301
302const char* Dbg::GetObjectTypeName(JDWP::ObjectId objectId) {
303 UNIMPLEMENTED(FATAL);
304 return NULL;
305}
306
307uint8_t Dbg::GetObjectTag(JDWP::ObjectId objectId) {
308 UNIMPLEMENTED(FATAL);
309 return 0;
310}
311
312int Dbg::GetTagWidth(int tag) {
313 UNIMPLEMENTED(FATAL);
314 return 0;
315}
316
317int Dbg::GetArrayLength(JDWP::ObjectId arrayId) {
318 UNIMPLEMENTED(FATAL);
319 return 0;
320}
321
322uint8_t Dbg::GetArrayElementTag(JDWP::ObjectId arrayId) {
323 UNIMPLEMENTED(FATAL);
324 return 0;
325}
326
327bool Dbg::OutputArray(JDWP::ObjectId arrayId, int firstIndex, int count, JDWP::ExpandBuf* pReply) {
328 UNIMPLEMENTED(FATAL);
329 return false;
330}
331
332bool Dbg::SetArrayElements(JDWP::ObjectId arrayId, int firstIndex, int count, const uint8_t* buf) {
333 UNIMPLEMENTED(FATAL);
334 return false;
335}
336
337JDWP::ObjectId Dbg::CreateString(const char* str) {
338 UNIMPLEMENTED(FATAL);
339 return 0;
340}
341
342JDWP::ObjectId Dbg::CreateObject(JDWP::RefTypeId classId) {
343 UNIMPLEMENTED(FATAL);
344 return 0;
345}
346
347JDWP::ObjectId Dbg::CreateArrayObject(JDWP::RefTypeId arrayTypeId, uint32_t length) {
348 UNIMPLEMENTED(FATAL);
349 return 0;
350}
351
352bool Dbg::MatchType(JDWP::RefTypeId instClassId, JDWP::RefTypeId classId) {
353 UNIMPLEMENTED(FATAL);
354 return false;
355}
356
357const char* Dbg::GetMethodName(JDWP::RefTypeId refTypeId, JDWP::MethodId id) {
358 UNIMPLEMENTED(FATAL);
359 return NULL;
360}
361
362void Dbg::OutputAllFields(JDWP::RefTypeId refTypeId, bool withGeneric, JDWP::ExpandBuf* pReply) {
363 UNIMPLEMENTED(FATAL);
364}
365
366void Dbg::OutputAllMethods(JDWP::RefTypeId refTypeId, bool withGeneric, JDWP::ExpandBuf* pReply) {
367 UNIMPLEMENTED(FATAL);
368}
369
370void Dbg::OutputAllInterfaces(JDWP::RefTypeId refTypeId, JDWP::ExpandBuf* pReply) {
371 UNIMPLEMENTED(FATAL);
372}
373
374void Dbg::OutputLineTable(JDWP::RefTypeId refTypeId, JDWP::MethodId methodId, JDWP::ExpandBuf* pReply) {
375 UNIMPLEMENTED(FATAL);
376}
377
378void Dbg::OutputVariableTable(JDWP::RefTypeId refTypeId, JDWP::MethodId id, bool withGeneric, JDWP::ExpandBuf* pReply) {
379 UNIMPLEMENTED(FATAL);
380}
381
382uint8_t Dbg::GetFieldBasicTag(JDWP::ObjectId objId, JDWP::FieldId fieldId) {
383 UNIMPLEMENTED(FATAL);
384 return 0;
385}
386
387uint8_t Dbg::GetStaticFieldBasicTag(JDWP::RefTypeId refTypeId, JDWP::FieldId fieldId) {
388 UNIMPLEMENTED(FATAL);
389 return 0;
390}
391
392void Dbg::GetFieldValue(JDWP::ObjectId objectId, JDWP::FieldId fieldId, JDWP::ExpandBuf* pReply) {
393 UNIMPLEMENTED(FATAL);
394}
395
396void Dbg::SetFieldValue(JDWP::ObjectId objectId, JDWP::FieldId fieldId, uint64_t value, int width) {
397 UNIMPLEMENTED(FATAL);
398}
399
400void Dbg::GetStaticFieldValue(JDWP::RefTypeId refTypeId, JDWP::FieldId fieldId, JDWP::ExpandBuf* pReply) {
401 UNIMPLEMENTED(FATAL);
402}
403
404void Dbg::SetStaticFieldValue(JDWP::RefTypeId refTypeId, JDWP::FieldId fieldId, uint64_t rawValue, int width) {
405 UNIMPLEMENTED(FATAL);
406}
407
408char* Dbg::StringToUtf8(JDWP::ObjectId strId) {
409 UNIMPLEMENTED(FATAL);
410 return NULL;
411}
412
413char* Dbg::GetThreadName(JDWP::ObjectId threadId) {
414 UNIMPLEMENTED(FATAL);
415 return NULL;
416}
417
418JDWP::ObjectId Dbg::GetThreadGroup(JDWP::ObjectId threadId) {
419 UNIMPLEMENTED(FATAL);
420 return 0;
421}
422
423char* Dbg::GetThreadGroupName(JDWP::ObjectId threadGroupId) {
424 UNIMPLEMENTED(FATAL);
425 return NULL;
426}
427
428JDWP::ObjectId Dbg::GetThreadGroupParent(JDWP::ObjectId threadGroupId) {
429 UNIMPLEMENTED(FATAL);
430 return 0;
431}
432
433JDWP::ObjectId Dbg::GetSystemThreadGroupId() {
434 UNIMPLEMENTED(FATAL);
435 return 0;
436}
437
438JDWP::ObjectId Dbg::GetMainThreadGroupId() {
439 UNIMPLEMENTED(FATAL);
440 return 0;
441}
442
443bool Dbg::GetThreadStatus(JDWP::ObjectId threadId, uint32_t* threadStatus, uint32_t* suspendStatus) {
444 UNIMPLEMENTED(FATAL);
445 return false;
446}
447
448uint32_t Dbg::GetThreadSuspendCount(JDWP::ObjectId threadId) {
449 UNIMPLEMENTED(FATAL);
450 return 0;
451}
452
453bool Dbg::ThreadExists(JDWP::ObjectId threadId) {
454 UNIMPLEMENTED(FATAL);
455 return false;
456}
457
458bool Dbg::IsSuspended(JDWP::ObjectId threadId) {
459 UNIMPLEMENTED(FATAL);
460 return false;
461}
462
463//void Dbg::WaitForSuspend(JDWP::ObjectId threadId);
464
465void Dbg::GetThreadGroupThreads(JDWP::ObjectId threadGroupId, JDWP::ObjectId** ppThreadIds, uint32_t* pThreadCount) {
466 UNIMPLEMENTED(FATAL);
467}
468
469void Dbg::GetAllThreads(JDWP::ObjectId** ppThreadIds, uint32_t* pThreadCount) {
470 UNIMPLEMENTED(FATAL);
471}
472
473int Dbg::GetThreadFrameCount(JDWP::ObjectId threadId) {
474 UNIMPLEMENTED(FATAL);
475 return 0;
476}
477
478bool Dbg::GetThreadFrame(JDWP::ObjectId threadId, int num, JDWP::FrameId* pFrameId, JDWP::JdwpLocation* pLoc) {
479 UNIMPLEMENTED(FATAL);
480 return false;
481}
482
483JDWP::ObjectId Dbg::GetThreadSelfId() {
484 UNIMPLEMENTED(FATAL);
485 return 0;
486}
487
488void Dbg::SuspendVM(bool isEvent) {
489 UNIMPLEMENTED(FATAL);
490}
491
492void Dbg::ResumeVM() {
493 UNIMPLEMENTED(FATAL);
494}
495
496void Dbg::SuspendThread(JDWP::ObjectId threadId) {
497 UNIMPLEMENTED(FATAL);
498}
499
500void Dbg::ResumeThread(JDWP::ObjectId threadId) {
501 UNIMPLEMENTED(FATAL);
502}
503
504void Dbg::SuspendSelf() {
505 UNIMPLEMENTED(FATAL);
506}
507
508bool Dbg::GetThisObject(JDWP::ObjectId threadId, JDWP::FrameId frameId, JDWP::ObjectId* pThisId) {
509 UNIMPLEMENTED(FATAL);
510 return false;
511}
512
513void Dbg::GetLocalValue(JDWP::ObjectId threadId, JDWP::FrameId frameId, int slot, uint8_t tag, uint8_t* buf, int expectedLen) {
514 UNIMPLEMENTED(FATAL);
515}
516
517void Dbg::SetLocalValue(JDWP::ObjectId threadId, JDWP::FrameId frameId, int slot, uint8_t tag, uint64_t value, int width) {
518 UNIMPLEMENTED(FATAL);
519}
520
521void Dbg::PostLocationEvent(const Method* method, int pcOffset, Object* thisPtr, int eventFlags) {
522 UNIMPLEMENTED(FATAL);
523}
524
525void Dbg::PostException(void* throwFp, int throwRelPc, void* catchFp, int catchRelPc, Object* exception) {
526 UNIMPLEMENTED(FATAL);
527}
528
529void Dbg::PostThreadStart(Thread* t) {
Elliott Hughes3bb81562011-10-21 18:52:59 -0700530 if (!gDebuggerConnected) {
531 return;
532 }
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700533 UNIMPLEMENTED(WARNING);
534}
535
536void Dbg::PostThreadDeath(Thread* t) {
Elliott Hughes3bb81562011-10-21 18:52:59 -0700537 if (!gDebuggerConnected) {
538 return;
539 }
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700540 UNIMPLEMENTED(WARNING);
541}
542
543void Dbg::PostClassPrepare(Class* c) {
544 UNIMPLEMENTED(FATAL);
545}
546
547bool Dbg::WatchLocation(const JDWP::JdwpLocation* pLoc) {
548 UNIMPLEMENTED(FATAL);
549 return false;
550}
551
552void Dbg::UnwatchLocation(const JDWP::JdwpLocation* pLoc) {
553 UNIMPLEMENTED(FATAL);
554}
555
556bool Dbg::ConfigureStep(JDWP::ObjectId threadId, JDWP::JdwpStepSize size, JDWP::JdwpStepDepth depth) {
557 UNIMPLEMENTED(FATAL);
558 return false;
559}
560
561void Dbg::UnconfigureStep(JDWP::ObjectId threadId) {
562 UNIMPLEMENTED(FATAL);
563}
564
565JDWP::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) {
566 UNIMPLEMENTED(FATAL);
567 return JDWP::ERR_NONE;
568}
569
570void Dbg::ExecuteMethod(DebugInvokeReq* pReq) {
571 UNIMPLEMENTED(FATAL);
572}
573
574void Dbg::RegisterObjectId(JDWP::ObjectId id) {
575 UNIMPLEMENTED(FATAL);
576}
577
578bool Dbg::DdmHandlePacket(const uint8_t* buf, int dataLen, uint8_t** pReplyBuf, int* pReplyLen) {
579 UNIMPLEMENTED(FATAL);
580 return false;
581}
582
583void Dbg::DdmConnected() {
584 UNIMPLEMENTED(FATAL);
585}
586
587void Dbg::DdmDisconnected() {
588 UNIMPLEMENTED(FATAL);
589}
590
Elliott Hughes3bb81562011-10-21 18:52:59 -0700591void Dbg::DdmSendChunk(int type, size_t byte_count, const uint8_t* buf) {
592 CHECK(buf != NULL);
593 iovec vec[1];
594 vec[0].iov_base = reinterpret_cast<void*>(const_cast<uint8_t*>(buf));
595 vec[0].iov_len = byte_count;
596 Dbg::DdmSendChunkV(type, vec, 1);
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700597}
598
599void Dbg::DdmSendChunkV(int type, const struct iovec* iov, int iovcnt) {
Elliott Hughes3bb81562011-10-21 18:52:59 -0700600 if (gJdwpState == NULL) {
601 LOG(VERBOSE) << "Debugger thread not active, ignoring DDM send: " << type;
602 } else {
603 JDWP::DdmSendChunkV(gJdwpState, type, iov, iovcnt);
604 }
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700605}
606
607} // namespace art