1 /* 2 * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _DEBUGGER_H 6 #define _DEBUGGER_H 7 8 9 #include <signal.h> 10 11 #include <image.h> 12 #include <OS.h> 13 14 // include architecture specific definitions 15 #include <arch/x86/arch_debugger.h> 16 #include <arch/ppc/arch_debugger.h> 17 #include <arch/m68k/arch_debugger.h> 18 #include <arch/mipsel/arch_debugger.h> 19 #include <arch/arm/arch_debugger.h> 20 21 22 #ifdef __INTEL__ 23 typedef struct x86_debug_cpu_state debug_cpu_state; 24 #elif __POWERPC__ 25 typedef struct ppc_debug_cpu_state debug_cpu_state; 26 #elif __M68K__ 27 typedef struct m68k_debug_cpu_state debug_cpu_state; 28 #elif __MIPSEL__ 29 typedef struct mipsel_debug_cpu_state debug_cpu_state; 30 #elif __ARM__ 31 typedef struct arm_debug_cpu_state debug_cpu_state; 32 #else 33 #error unsupported architecture 34 #endif 35 36 37 #ifdef __cplusplus 38 extern "C" { 39 #endif 40 41 extern status_t install_default_debugger(port_id debuggerPort); 42 extern port_id install_team_debugger(team_id team, port_id debuggerPort); 43 extern status_t remove_team_debugger(team_id team); 44 extern status_t debug_thread(thread_id thread); 45 extern void wait_for_debugger(void); 46 47 // EXPERIMENTAL: Self-debugging functions. Will fail when a team debugger is 48 // installed. A breakpoint/watchpoint hit will cause the default debugger to 49 // be installed for the team. 50 extern status_t set_debugger_breakpoint(void *address); 51 extern status_t clear_debugger_breakpoint(void *address); 52 extern status_t set_debugger_watchpoint(void *address, uint32 type, 53 int32 length); 54 extern status_t clear_debugger_watchpoint(void *address); 55 56 57 // team debugging flags 58 enum { 59 // event mask: If a flag is set, any of the team's threads will stop when 60 // the respective event occurs. None of the flags are enabled by default. 61 // Always enabled are debugger() calls and hardware exceptions, as well as 62 // the deletion of the debugged team. 63 B_TEAM_DEBUG_SIGNALS = 0x00010000, 64 B_TEAM_DEBUG_PRE_SYSCALL = 0x00020000, 65 B_TEAM_DEBUG_POST_SYSCALL = 0x00040000, 66 B_TEAM_DEBUG_TEAM_CREATION = 0x00080000, 67 B_TEAM_DEBUG_THREADS = 0x00100000, 68 B_TEAM_DEBUG_IMAGES = 0x00200000, 69 B_TEAM_DEBUG_PREVENT_EXIT = 0x00400000, 70 71 // new thread handling 72 B_TEAM_DEBUG_STOP_NEW_THREADS = 0x01000000, 73 74 B_TEAM_DEBUG_USER_FLAG_MASK = 0xffff0000, 75 }; 76 77 // per-thread debugging flags 78 enum { 79 // event mask: If a flag is set, the thread will stop when the respective 80 // event occurs. If there is a corresponding team flag, it is sufficient, 81 // if either is set. Per default none of the flags is set. 82 B_THREAD_DEBUG_PRE_SYSCALL = 0x00010000, 83 B_THREAD_DEBUG_POST_SYSCALL = 0x00020000, 84 85 // child thread handling 86 B_THREAD_DEBUG_STOP_CHILD_THREADS = 0x00100000, 87 B_THREAD_DEBUG_SYSCALL_TRACE_CHILD_THREADS = 0x00200000, 88 89 B_THREAD_DEBUG_USER_FLAG_MASK = 0xffff0000, 90 }; 91 92 // in case of a B_EXCEPTION_OCCURRED event: the type of the exception 93 typedef enum { 94 B_NON_MASKABLE_INTERRUPT = 0, 95 B_MACHINE_CHECK_EXCEPTION, 96 B_SEGMENT_VIOLATION, 97 B_ALIGNMENT_EXCEPTION, 98 B_DIVIDE_ERROR, 99 B_OVERFLOW_EXCEPTION, 100 B_BOUNDS_CHECK_EXCEPTION, 101 B_INVALID_OPCODE_EXCEPTION, 102 B_SEGMENT_NOT_PRESENT, 103 B_STACK_FAULT, 104 B_GENERAL_PROTECTION_FAULT, 105 B_FLOATING_POINT_EXCEPTION, 106 } debug_exception_type; 107 108 // Value indicating how a stopped thread shall continue. 109 enum { 110 B_THREAD_DEBUG_HANDLE_EVENT = 0, // handle the event normally 111 // (e.g. a signal is delivered, a 112 // CPU fault kills the team,...) 113 B_THREAD_DEBUG_IGNORE_EVENT, // ignore the event and continue as if 114 // it didn't occur (e.g. a signal or 115 // a CPU fault will be ignored) 116 }; 117 118 // watchpoint types (ToDo: Check PPC support.) 119 enum { 120 B_DATA_READ_WATCHPOINT = 0, // !x86 121 B_DATA_WRITE_WATCHPOINT, 122 B_DATA_READ_WRITE_WATCHPOINT, 123 }; 124 125 // how to apply signal ignore masks 126 typedef enum { 127 B_DEBUG_SIGNAL_MASK_AND = 0, 128 B_DEBUG_SIGNAL_MASK_OR, 129 B_DEBUG_SIGNAL_MASK_SET, 130 } debug_signal_mask_op; 131 132 #define B_DEBUG_SIGNAL_TO_MASK(signal) (1ULL << ((signal) - 1)) 133 134 // maximal number of bytes to read/write via B_DEBUG_MESSAGE_{READ,WRITE]_MEMORY 135 enum { 136 B_MAX_READ_WRITE_MEMORY_SIZE = 1024, 137 }; 138 139 // messages to the debug nub thread 140 typedef enum { 141 B_DEBUG_MESSAGE_READ_MEMORY = 0, // read from the team's memory 142 B_DEBUG_MESSAGE_WRITE_MEMORY, // write to the team's memory 143 B_DEBUG_MESSAGE_SET_TEAM_FLAGS, // set the team's debugging flags 144 B_DEBUG_MESSAGE_SET_THREAD_FLAGS, // set a thread's debugging flags 145 B_DEBUG_MESSAGE_CONTINUE_THREAD, // continue a stopped thread 146 B_DEBUG_MESSAGE_SET_CPU_STATE, // change a stopped thread's CPU state 147 B_DEBUG_MESSAGE_GET_CPU_STATE, // get the thread's current CPU state 148 B_DEBUG_MESSAGE_SET_BREAKPOINT, // set a breakpoint 149 B_DEBUG_MESSAGE_CLEAR_BREAKPOINT, // clear a breakpoint 150 B_DEBUG_MESSAGE_SET_WATCHPOINT, // set a watchpoint 151 B_DEBUG_MESSAGE_CLEAR_WATCHPOINT, // clear a watchpoint 152 B_DEBUG_MESSAGE_SET_SIGNAL_MASKS, // set/get a thread's masks of signals 153 B_DEBUG_MESSAGE_GET_SIGNAL_MASKS, // the debugger is interested in 154 B_DEBUG_MESSAGE_SET_SIGNAL_HANDLER, // set/get a thread's signal handler for 155 B_DEBUG_MESSAGE_GET_SIGNAL_HANDLER, // a signal 156 157 B_DEBUG_MESSAGE_PREPARE_HANDOVER, // prepares the debugged team for being 158 // handed over to another debugger; 159 // the new debugger can just invoke 160 // install_team_debugger() 161 162 B_DEBUG_START_PROFILER, // start/stop sampling 163 B_DEBUG_STOP_PROFILER // 164 } debug_nub_message; 165 166 // messages sent to the debugger 167 typedef enum { 168 B_DEBUGGER_MESSAGE_THREAD_DEBUGGED = 0, // debugger message in reaction to 169 // an invocation of debug_thread() 170 B_DEBUGGER_MESSAGE_DEBUGGER_CALL, // thread called debugger() 171 B_DEBUGGER_MESSAGE_BREAKPOINT_HIT, // thread hit a breakpoint 172 B_DEBUGGER_MESSAGE_WATCHPOINT_HIT, // thread hit a watchpoint 173 B_DEBUGGER_MESSAGE_SINGLE_STEP, // thread was single-stepped 174 B_DEBUGGER_MESSAGE_PRE_SYSCALL, // begin of a syscall 175 B_DEBUGGER_MESSAGE_POST_SYSCALL, // end of a syscall 176 B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED, // thread received a signal 177 B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED, // an exception occurred 178 B_DEBUGGER_MESSAGE_TEAM_CREATED, // the debugged team created a new 179 // one 180 B_DEBUGGER_MESSAGE_TEAM_DELETED, // the debugged team is gone 181 B_DEBUGGER_MESSAGE_TEAM_EXEC, // the debugged team executes exec() 182 B_DEBUGGER_MESSAGE_THREAD_CREATED, // a thread has been created 183 B_DEBUGGER_MESSAGE_THREAD_DELETED, // a thread has been deleted 184 B_DEBUGGER_MESSAGE_IMAGE_CREATED, // an image has been created 185 B_DEBUGGER_MESSAGE_IMAGE_DELETED, // an image has been deleted 186 187 B_DEBUGGER_MESSAGE_PROFILER_UPDATE, // flush the profiling buffer for a 188 // thread 189 190 B_DEBUGGER_MESSAGE_HANDED_OVER, // the debugged team has been 191 // handed over to another debugger, 192 // sent to both debuggers 193 } debug_debugger_message; 194 195 196 // profile events -- when the buffer is in variable stack depth format, a sample 197 // count entry >= B_DEBUG_PROFILE_EVENT_BASE indicates a profile event 198 enum { 199 B_DEBUG_PROFILE_EVENT_BASE = 0x80000000, 200 B_DEBUG_PROFILE_EVENT_PARAMETER_MASK = 0x0000ffff, 201 // & with to get the event's parameter count 202 203 B_DEBUG_PROFILE_IMAGE_EVENT = 0x80010001 204 // single parameter: the respective image event counter 205 }; 206 207 208 // #pragma mark - 209 // #pragma mark ----- messages to the debug nub thread ----- 210 211 // B_DEBUG_MESSAGE_READ_MEMORY 212 213 typedef struct { 214 port_id reply_port; // port to send the reply to 215 void *address; // address from which to read 216 int32 size; // number of bytes to read 217 } debug_nub_read_memory; 218 219 typedef struct { 220 status_t error; // B_OK, if reading went fine 221 int32 size; // the number of bytes actually read 222 // > 0, iff error == B_OK 223 char data[B_MAX_READ_WRITE_MEMORY_SIZE]; 224 // the read data 225 } debug_nub_read_memory_reply; 226 227 // B_DEBUG_MESSAGE_WRITE_MEMORY 228 229 typedef struct { 230 port_id reply_port; // port to send the reply to 231 void *address; // address to which to write 232 int32 size; // number of bytes to write 233 char data[B_MAX_READ_WRITE_MEMORY_SIZE]; 234 // data to write 235 } debug_nub_write_memory; 236 237 typedef struct { 238 status_t error; // B_OK, if writing went fine 239 int32 size; // the number of bytes actually written 240 } debug_nub_write_memory_reply; 241 242 // B_DEBUG_MESSAGE_SET_TEAM_FLAGS 243 244 typedef struct { 245 int32 flags; // the new team debugging flags 246 } debug_nub_set_team_flags; 247 248 // B_DEBUG_MESSAGE_SET_THREAD_FLAGS 249 250 typedef struct { 251 thread_id thread; // the thread 252 int32 flags; // the new thread debugging flags 253 } debug_nub_set_thread_flags; 254 255 // B_DEBUG_MESSAGE_CONTINUE_THREAD 256 257 typedef struct { 258 thread_id thread; // the thread 259 uint32 handle_event; // how to handle the occurred event 260 bool single_step; // true == single step, false == run full speed 261 } debug_nub_continue_thread; 262 263 // B_DEBUG_MESSAGE_SET_CPU_STATE 264 265 typedef struct { 266 thread_id thread; // the thread 267 debug_cpu_state cpu_state; // the new CPU state 268 } debug_nub_set_cpu_state; 269 270 // B_DEBUG_MESSAGE_GET_CPU_STATE 271 272 typedef struct { 273 port_id reply_port; // port to send the reply to 274 thread_id thread; // the thread 275 } debug_nub_get_cpu_state; 276 277 typedef struct { 278 status_t error; // != B_OK, if something went wrong 279 // (bad thread ID, thread not stopped) 280 debug_debugger_message message; // the reason why the thread stopped 281 debug_cpu_state cpu_state; // the thread's CPU state 282 } debug_nub_get_cpu_state_reply; 283 284 // B_DEBUG_MESSAGE_SET_BREAKPOINT 285 286 typedef struct { 287 port_id reply_port; // port to send the reply to 288 void *address; // breakpoint address 289 } debug_nub_set_breakpoint; 290 291 typedef struct { 292 status_t error; // B_OK, if the breakpoint has been set 293 // successfully 294 } debug_nub_set_breakpoint_reply; 295 296 // B_DEBUG_MESSAGE_CLEAR_BREAKPOINT 297 298 typedef struct { 299 void *address; // breakpoint address 300 } debug_nub_clear_breakpoint; 301 302 // B_DEBUG_MESSAGE_SET_WATCHPOINT 303 304 typedef struct { 305 port_id reply_port; // port to send the reply to 306 void *address; // watchpoint address 307 uint32 type; // watchpoint type (see type constants above) 308 int32 length; // number of bytes to watch (typically 1, 2, 309 // 4); architecture specific alignment 310 // restrictions apply. 311 } debug_nub_set_watchpoint; 312 313 typedef struct { 314 status_t error; // B_OK, if the watchpoint has been set 315 // successfully 316 } debug_nub_set_watchpoint_reply; 317 318 // B_DEBUG_MESSAGE_CLEAR_WATCHPOINT 319 320 typedef struct { 321 void *address; // watchpoint address 322 } debug_nub_clear_watchpoint; 323 324 // B_DEBUG_MESSAGE_SET_SIGNAL_MASKS 325 326 typedef struct { 327 thread_id thread; // the thread 328 uint64 ignore_mask; // the mask for signals the 329 // debugger wishes not to be 330 // notified of 331 uint64 ignore_once_mask; // the mask for signals the 332 // debugger wishes not to be 333 // notified of when they next 334 // occur 335 debug_signal_mask_op ignore_op; // what to do with ignore_mask 336 debug_signal_mask_op ignore_once_op; // what to do with 337 // ignore_once_mask 338 } debug_nub_set_signal_masks; 339 340 // B_DEBUG_MESSAGE_GET_SIGNAL_MASKS 341 342 typedef struct { 343 port_id reply_port; // port to send the reply to 344 thread_id thread; // the thread 345 } debug_nub_get_signal_masks; 346 347 typedef struct { 348 status_t error; // B_OK, if the thread exists 349 uint64 ignore_mask; // the mask for signals the debugger wishes 350 // not to be notified of 351 uint64 ignore_once_mask; // the mask for signals the debugger wishes 352 // not to be notified of when they next 353 // occur 354 } debug_nub_get_signal_masks_reply; 355 356 // B_DEBUG_MESSAGE_SET_SIGNAL_HANDLER 357 358 typedef struct { 359 thread_id thread; // the thread 360 int signal; // the signal 361 struct sigaction handler; // the new signal handler 362 } debug_nub_set_signal_handler; 363 364 // B_DEBUG_MESSAGE_GET_SIGNAL_HANDLER 365 366 typedef struct { 367 port_id reply_port; // port to send the reply to 368 thread_id thread; // the thread 369 int signal; // the signal 370 } debug_nub_get_signal_handler; 371 372 typedef struct { 373 status_t error; // B_OK, if the thread exists 374 struct sigaction handler; // the signal handler 375 } debug_nub_get_signal_handler_reply; 376 377 // B_DEBUG_MESSAGE_PREPARE_HANDOVER 378 379 // no parameters, no reply 380 381 // B_DEBUG_START_PROFILER 382 383 struct debug_profile_function { 384 addr_t base; // function base address 385 size_t size; // function size 386 }; 387 388 typedef struct { 389 port_id reply_port; // port to send the reply to 390 thread_id thread; // thread to profile 391 bigtime_t interval; // sample interval 392 area_id sample_area; // area into which the sample will be 393 // written 394 int32 stack_depth; // number of return address per hit 395 bool variable_stack_depth; 396 // variable number of samples per hit; 397 // cf. debug_profiler_update 398 } debug_nub_start_profiler; 399 400 typedef struct { 401 status_t error; 402 int32 image_event; // number of the last image event 403 bigtime_t interval; // actual sample interval (might 404 // differ from the requested one) 405 } debug_nub_start_profiler_reply; 406 407 // B_DEBUG_STOP_PROFILER 408 409 typedef struct { 410 port_id reply_port; // port to send the reply to 411 thread_id thread; // thread to profile 412 } debug_nub_stop_profiler; 413 414 // reply is debug_profiler_update 415 416 // union of all messages structures sent to the debug nub thread 417 typedef union { 418 debug_nub_read_memory read_memory; 419 debug_nub_write_memory write_memory; 420 debug_nub_set_team_flags set_team_flags; 421 debug_nub_set_thread_flags set_thread_flags; 422 debug_nub_continue_thread continue_thread; 423 debug_nub_set_cpu_state set_cpu_state; 424 debug_nub_get_cpu_state get_cpu_state; 425 debug_nub_set_breakpoint set_breakpoint; 426 debug_nub_clear_breakpoint clear_breakpoint; 427 debug_nub_set_watchpoint set_watchpoint; 428 debug_nub_clear_watchpoint clear_watchpoint; 429 debug_nub_set_signal_masks set_signal_masks; 430 debug_nub_get_signal_masks get_signal_masks; 431 debug_nub_set_signal_handler set_signal_handler; 432 debug_nub_get_signal_handler get_signal_handler; 433 debug_nub_start_profiler start_profiler; 434 debug_nub_stop_profiler stop_profiler; 435 } debug_nub_message_data; 436 437 438 // #pragma mark - 439 // #pragma mark ----- messages to the debugger ----- 440 441 // first member of all debugger messages -- not a message by itself 442 typedef struct { 443 thread_id thread; // the thread being the event origin 444 team_id team; // the thread's team 445 port_id nub_port; // port to debug nub for this team (only set 446 // for synchronous messages) 447 } debug_origin; 448 449 // B_DEBUGGER_MESSAGE_THREAD_DEBUGGED 450 451 typedef struct { 452 debug_origin origin; 453 } debug_thread_debugged; 454 455 // B_DEBUGGER_MESSAGE_DEBUGGER_CALL 456 457 typedef struct { 458 debug_origin origin; 459 void *message; // address of the message passed to 460 // debugger() 461 } debug_debugger_call; 462 463 // B_DEBUGGER_MESSAGE_BREAKPOINT_HIT 464 465 typedef struct { 466 debug_origin origin; 467 debug_cpu_state cpu_state; // cpu state 468 } debug_breakpoint_hit; 469 470 // B_DEBUGGER_MESSAGE_WATCHPOINT_HIT 471 472 typedef struct { 473 debug_origin origin; 474 debug_cpu_state cpu_state; // cpu state 475 } debug_watchpoint_hit; 476 477 // B_DEBUGGER_MESSAGE_SINGLE_STEP 478 479 typedef struct { 480 debug_origin origin; 481 debug_cpu_state cpu_state; // cpu state 482 } debug_single_step; 483 484 // B_DEBUGGER_MESSAGE_PRE_SYSCALL 485 486 typedef struct { 487 debug_origin origin; 488 uint32 syscall; // the syscall number 489 uint32 args[16]; // syscall arguments 490 } debug_pre_syscall; 491 492 // B_DEBUGGER_MESSAGE_POST_SYSCALL 493 494 typedef struct { 495 debug_origin origin; 496 bigtime_t start_time; // time of syscall start 497 bigtime_t end_time; // time of syscall completion 498 uint64 return_value; // the syscall's return value 499 uint32 syscall; // the syscall number 500 uint32 args[16]; // syscall arguments 501 } debug_post_syscall; 502 503 // B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED 504 505 typedef struct { 506 debug_origin origin; 507 int signal; // the signal 508 struct sigaction handler; // the signal handler 509 bool deadly; // true, if handling the signal will kill 510 // the team 511 } debug_signal_received; 512 513 // B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED 514 515 typedef struct { 516 debug_origin origin; 517 debug_exception_type exception; // the exception 518 int signal; // the signal that will be sent, 519 // when the thread continues 520 // normally 521 } debug_exception_occurred; 522 523 // B_DEBUGGER_MESSAGE_TEAM_CREATED 524 525 typedef struct { 526 debug_origin origin; 527 team_id new_team; // the newly created team 528 } debug_team_created; 529 530 // B_DEBUGGER_MESSAGE_TEAM_DELETED 531 532 typedef struct { 533 debug_origin origin; // thread is < 0, team is the deleted team 534 // (asynchronous message) 535 } debug_team_deleted; 536 537 // B_DEBUGGER_MESSAGE_TEAM_EXEC 538 539 typedef struct { 540 debug_origin origin; 541 int32 image_event; // number of the image event 542 } debug_team_exec; 543 544 // B_DEBUGGER_MESSAGE_THREAD_CREATED 545 546 typedef struct { 547 debug_origin origin; // the thread that created the new thread 548 team_id new_thread; // the newly created thread 549 } debug_thread_created; 550 551 // B_DEBUGGER_MESSAGE_THREAD_DELETED 552 553 typedef struct { 554 debug_origin origin; // the deleted thread (asynchronous message) 555 } debug_thread_deleted; 556 557 // B_DEBUGGER_MESSAGE_IMAGE_CREATED 558 559 typedef struct { 560 debug_origin origin; 561 image_info info; // info for the image 562 int32 image_event; // number of the image event 563 } debug_image_created; 564 565 // B_DEBUGGER_MESSAGE_IMAGE_DELETED 566 567 typedef struct { 568 debug_origin origin; 569 image_info info; // info for the image 570 int32 image_event; // number of the image event 571 } debug_image_deleted; 572 573 // B_DEBUGGER_MESSAGE_PROFILER_UPDATE 574 575 typedef struct { 576 debug_origin origin; 577 int32 image_event; // number of the last image event; all 578 // samples were recorded after this 579 // event and before the next one 580 int32 stack_depth; // number of return addresses per tick 581 int32 sample_count; // number of samples in the buffer 582 int32 dropped_ticks; // number of ticks that had been 583 // dropped, since the buffer was full 584 bool variable_stack_depth; 585 // the number of samples per hit is 586 // variable, i.e. the format for the 587 // samples of a hit in the buffer is 588 // <n> <sample 1> ... <sample n> 589 // instead of 590 // <sample 1> ... <sample stack_depth> 591 bool stopped; // if true, the thread is no longer 592 // being profiled 593 } debug_profiler_update; 594 595 // B_DEBUGGER_MESSAGE_HANDED_OVER 596 597 typedef struct { 598 debug_origin origin; // thread is < 0, team is the deleted team 599 // (asynchronous message) 600 team_id debugger; // the new debugger 601 port_id debugger_port; // the port the new debugger uses 602 thread_id causing_thread; // the thread that caused entering the 603 // debugger in the first place, -1 if the 604 // debugger wasn't attached automatically 605 } debug_handed_over; 606 607 // union of all messages structures sent to the debugger 608 typedef union { 609 debug_thread_debugged thread_debugged; 610 debug_debugger_call debugger_call; 611 debug_breakpoint_hit breakpoint_hit; 612 debug_watchpoint_hit watchpoint_hit; 613 debug_single_step single_step; 614 debug_pre_syscall pre_syscall; 615 debug_post_syscall post_syscall; 616 debug_signal_received signal_received; 617 debug_exception_occurred exception_occurred; 618 debug_team_created team_created; 619 debug_team_deleted team_deleted; 620 debug_team_exec team_exec; 621 debug_thread_created thread_created; 622 debug_thread_deleted thread_deleted; 623 debug_image_created image_created; 624 debug_image_deleted image_deleted; 625 debug_profiler_update profiler_update; 626 debug_handed_over handed_over; 627 628 debug_origin origin; // for convenience (no real message) 629 } debug_debugger_message_data; 630 631 632 extern void get_debug_message_string(debug_debugger_message message, 633 char *buffer, int32 bufferSize); 634 extern void get_debug_exception_string(debug_exception_type exception, 635 char *buffer, int32 bufferSize); 636 637 638 #ifdef __cplusplus 639 } // extern "C" 640 #endif 641 642 #endif // _DEBUGGER_H 643