Home | History | Annotate | Download | only in coregrind

Lines Matching refs:VG_

52 #include "pub_core_syscall.h"       // VG_(strerror)
60 #include "pub_core_seqmatch.h" // For VG_(string_match)
62 #include "pub_core_stacks.h" // For VG_(register_stack)
65 #include "pub_core_translate.h" // For VG_(translate)
85 which must be supplied when they are VG_(printf)'d. */
309 VG_(log_output_sink).fd = 1;
310 VG_(log_output_sink).is_socket = False;
312 if (VG_(needs).malloc_replacement) {
313 VG_(sprintf)(default_alignment, "%d", VG_MIN_MALLOC_SZB);
314 VG_(sprintf)(default_redzone_size, "%lu", VG_(tdict).tool_client_redzone_szB);
316 VG_(strcpy)(default_alignment, "not used by this tool");
317 VG_(strcpy)(default_redzone_size, "not used by this tool");
320 VG_(printf)(usage1,
321 VG_(clo_vgdb_error) /* int */,
325 VG_(clo_vgdb_poll) /* int */,
326 VG_(vgdb_prefix_default)() /* char* */,
330 if (VG_(details).name) {
331 VG_(printf)(" user options for %s:\n", VG_(details).name);
332 if (VG_(needs).command_line_options)
335 VG_(printf)(" (none)\n");
338 VG_(printf)("%s", usage2);
340 if (VG_(details).name) {
341 VG_(printf)(" debugging options for %s:\n", VG_(details).name);
343 if (VG_(needs).command_line_options)
346 VG_(printf)(" (none)\n");
349 VG_(printf)(usage3, VG_(details).name, VG_(details).copyright_author,
351 VG_(exit)(0);
355 /* Peer at previously set up VG_(args_for_valgrind) and do some
361 - set VG_(clo_max_stackframe) (--max-stackframe=)
362 - set VG_(clo_main_stacksize) (--main-stacksize=)
363 - set VG_(clo_sim_hints) (--sim-hints=)
364 - set VG_(clo_max_threads) (--max-threads)
377 vg_assert( VG_(args_for_valgrind) );
380 for (i = 0; i < VG_(sizeXA)( VG_(args_for_valgrind) ); i++) {
382 str = * (HChar**) VG_(indexXA)( VG_(args_for_valgrind), i );
386 if VG_XACT_CLO(str, "--version", VG_(log_output_sink).fd, 1) {
387 VG_(log_output_sink).is_socket = False;
388 VG_(printf)("valgrind-" VERSION "\n");
389 VG_(exit)(0);
400 // Set up VG_(clo_max_stackframe) and VG_(clo_main_stacksize).
401 // These are needed by VG_(ii_create_image), which happens
403 else if VG_INT_CLO(str, "--max-stackframe", VG_(clo_max_stackframe)) {}
404 else if VG_INT_CLO(str, "--main-stacksize", VG_(clo_main_stacksize)) {}
406 // Set up VG_(clo_max_threads); needed for VG_(tl_pre_clo_init)
407 else if VG_INT_CLO(str, "--max-threads", VG_(clo_max_threads)) {}
409 // Set up VG_(clo_sim_hints). This is needed a.o. for an inner
416 VG_(clo_sim_hints)) {}
420 VG_N_THREADS = VG_(clo_max_threads);
435 VG_(log_output_sink) in m_libcprint. Also, if --log-file=STR was
437 it, is stored in VG_(clo_log_fname_expanded), in m_options, just in
440 When printing, VG_(log_output_sink) is consulted to find the
452 // VG_(clo_log_fd) is used by all the messaging. It starts as 2 (stderr)
457 Int toolname_len = VG_(strlen)(toolname);
483 VG_(err_config_error)("Please use absolute paths in "
486 vg_assert( VG_(args_for_valgrind) );
488 VG_(clo_suppressions) = VG_(newXA)(VG_(malloc), "main.mpclo.4",
489 VG_(free), sizeof(HChar *));
490 VG_(clo_fullpath_after) = VG_(newXA)(VG_(malloc), "main.mpclo.5",
491 VG_(free), sizeof(HChar *));
492 VG_(clo_req_tsyms) = VG_(newXA)(VG_(malloc), "main.mpclo.6",
493 VG_(free), sizeof(HChar *));
505 for (i = 0; i < VG_(sizeXA)( VG_(args_for_valgrind) ); i++) {
507 HChar* arg = * (HChar**) VG_(indexXA)( VG_(args_for_valgrind), i );
539 VG_(printf)("tool-specific arg: %s\n", arg);
540 arg = VG_(strdup)("main.mpclo.1", arg + toolname_len + 1);
565 VG_(clo_valgrind_stacksize),
567 {VG_(clo_valgrind_stacksize)
568 = VG_PGROUNDUP(VG_(clo_valgrind_stacksize));}
572 VG_(fmsg_bad_option)
578 VG_(fmsg_bad_option)
588 VG_(clo_verbosity)++;
592 VG_(clo_verbosity)--;
594 else if VG_BOOL_CLO(arg, "--sigill-diagnostics", VG_(clo_sigill_diag))
597 else if VG_BOOL_CLO(arg, "--stats", VG_(clo_stats)) {}
598 else if VG_BOOL_CLO(arg, "--xml", VG_(clo_xml))
599 VG_(debugLog_setXml)(VG_(clo_xml));
601 else if VG_XACT_CLO(arg, "--vgdb=no", VG_(clo_vgdb), Vg_VgdbNo) {}
602 else if VG_XACT_CLO(arg, "--vgdb=yes", VG_(clo_vgdb), Vg_VgdbYes) {}
603 else if VG_XACT_CLO(arg, "--vgdb=full", VG_(clo_vgdb), Vg_VgdbFull) {
606 VG_(clo_vex_control).iropt_register_updates_default
607 = VG_(clo_px_file_backed)
610 else if VG_INT_CLO (arg, "--vgdb-poll", VG_(clo_vgdb_poll)) {}
611 else if VG_INT_CLO (arg, "--vgdb-error", VG_(clo_vgdb_error)) {}
614 VG_(clo_vgdb_stop_at)) {}
615 else if VG_STR_CLO (arg, "--vgdb-prefix", VG_(clo_vgdb_prefix)) {
616 VG_(arg_vgdb_prefix) = arg;
619 VG_(clo_vgdb_shadow_registers)) {}
620 else if VG_BOOL_CLO(arg, "--db-attach", VG_(clo_db_attach)) {}
621 else if VG_BOOL_CLO(arg, "--demangle", VG_(clo_demangle)) {}
622 else if VG_STR_CLO (arg, "--soname-synonyms",VG_(clo_soname_synonyms)) {}
623 else if VG_BOOL_CLO(arg, "--error-limit", VG_(clo_error_limit)) {}
624 else if VG_INT_CLO (arg, "--error-exitcode", VG_(clo_error_exitcode)) {}
630 m < sizeof(VG_(clo_error_markers))
631 /sizeof(VG_(clo_error_markers)[0]);
634 VG_(free)(VG_(clo_error_markers)[m]);
635 VG_(clo_error_markers)[m] = NULL;
637 nextpos = VG_(strchr)(startpos, ',');
639 nextpos = startpos + VG_(strlen)(startpos);
641 VG_(clo_error_markers)[m]
642 = VG_(malloc)("main.mpclo.2", nextpos - startpos + 1);
643 VG_(memcpy)(VG_(clo_error_markers)[m], startpos,
645 VG_(clo_error_markers)[m][nextpos - startpos] = '\0';
650 else if VG_BOOL_CLO(arg, "--show-emwarns", VG_(clo_show_emwarns)) {}
652 else if VG_BOOL_CLO(arg, "--run-libc-freeres", VG_(clo_run_libc_freeres)) {}
653 else if VG_BOOL_CLO(arg, "--show-below-main", VG_(clo_show_below_main)) {}
654 else if VG_BOOL_CLO(arg, "--time-stamp", VG_(clo_time_stamp)) {}
655 else if VG_BOOL_CLO(arg, "--track-fds", VG_(clo_track_fds)) {}
656 else if VG_BOOL_CLO(arg, "--trace-children", VG_(clo_trace_children)) {}
658 VG_(clo_child_silent_after_fork)) {}
660 if (VG_(strcmp)(tmp_str, "yes") == 0)
661 VG_(clo_fair_sched) = enable_fair_sched;
662 else if (VG_(strcmp)(tmp_str, "try") == 0)
663 VG_(clo_fair_sched) = try_fair_sched;
664 else if (VG_(strcmp)(tmp_str, "no") == 0)
665 VG_(clo_fair_sched) = disable_fair_sched;
667 VG_(fmsg_bad_option)(arg,
670 else if VG_BOOL_CLO(arg, "--trace-sched", VG_(clo_trace_sched)) {}
671 else if VG_BOOL_CLO(arg, "--trace-signals", VG_(clo_trace_signals)) {}
672 VG_(clo_trace_symtab)) {}
673 else if VG_STR_CLO (arg, "--trace-symtab-patt", VG_(clo_trace_symtab_patt)) {}
674 else if VG_BOOL_CLO(arg, "--trace-cfi", VG_(clo_trace_cfi)) {}
675 else if VG_XACT_CLO(arg, "--debug-dump=syms", VG_(clo_debug_dump_syms),
677 else if VG_XACT_CLO(arg, "--debug-dump=line", VG_(clo_debug_dump_line),
680 VG_(clo_debug_dump_frames), True) {}
681 else if VG_BOOL_CLO(arg, "--trace-redir", VG_(clo_trace_redir)) {}
683 else if VG_BOOL_CLO(arg, "--trace-syscalls", VG_(clo_trace_syscalls)) {}
684 else if VG_BOOL_CLO(arg, "--wait-for-gdb", VG_(clo_wait_for_gdb)) {}
685 else if VG_STR_CLO (arg, "--db-command", VG_(clo_db_command)) {}
686 else if VG_BOOL_CLO(arg, "--sym-offsets", VG_(clo_sym_offsets)) {}
687 else if VG_BOOL_CLO(arg, "--read-inline-info", VG_(clo_read_inline_info)) {}
688 else if VG_BOOL_CLO(arg, "--read-var-info", VG_(clo_read_var_info)) {}
690 else if VG_INT_CLO (arg, "--dump-error", VG_(clo_dump_error)) {}
691 else if VG_INT_CLO (arg, "--input-fd", VG_(clo_input_fd)) {}
692 else if VG_INT_CLO (arg, "--sanity-level", VG_(clo_sanity_level)) {}
693 else if VG_BINT_CLO(arg, "--num-callers", VG_(clo_backtrace_size), 1,
696 VG_(clo_num_transtab_sectors),
699 VG_(clo_avg_transtab_entry_size),
702 VG_(clo_merge_recursive_frames), 0,
706 VG_(clo_smc_check), Vg_SmcNone) {}
708 VG_(clo_smc_check), Vg_SmcStack) {}
710 VG_(clo_smc_check), Vg_SmcAll) {}
712 VG_(clo_smc_check), Vg_SmcAllNonFile) {}
719 VG_(clo_kernel_variant)) {}
721 else if VG_BOOL_CLO(arg, "--dsymutil", VG_(clo_dsymutil)) {}
724 VG_(clo_trace_children_skip)) {}
726 VG_(clo_trace_children_skip_by_arg)) {}
729 VG_(clo_vex_control).iropt_verbosity, 0, 10) {}
731 VG_(clo_vex_control).iropt_level, 0, 2) {}
738 VG_(clo_vex_control).iropt_register_updates_default = pxVals[ix];
746 VG_(clo_vex_control).iropt_register_updates_default = pxVals[ix];
754 VG_(clo_px_file_backed) = pxVals[ix];
758 VG_(clo_vex_control).iropt_unroll_thresh, 0, 400) {}
760 VG_(clo_vex_control).guest_max_insns, 1, 100) {}
762 VG_(clo_vex_control).guest_chase_thresh, 0, 99) {}
764 VG_(clo_vex_control).guest_chase_cond) {}
790 VG_(clo_debuginfo_server)) {}
793 VG_(clo_allow_mismatched_debuginfo)) {}
796 VG_(clo_xml_user_comment)) {}
799 VG_(clo_default_supp)) {}
802 VG_(addToXA)(VG_(clo_suppressions), &tmp_str);
806 VG_(addToXA)(VG_(clo_fullpath_after), &tmp_str);
810 VG_(clo_extra_debuginfo_path)) {}
821 ok = tmp_str && VG_(strlen)(tmp_str) > 0;
827 ok = VG_(string_match)(patt, tmp_str);
830 VG_(fmsg_bad_option)(arg,
833 VG_(addToXA)(VG_(clo_req_tsyms), &tmp_str);
839 if (8 != VG_(strlen)(tmp_str)) {
840 VG_(fmsg_bad_option)(arg,
845 else if ('1' == tmp_str[j]) VG_(clo_trace_flags) |= (1 << (7-j));
847 VG_(fmsg_bad_option)(arg,
853 else if VG_INT_CLO (arg, "--trace-notbelow", VG_(clo_trace_notbelow)) {}
855 else if VG_INT_CLO (arg, "--trace-notabove", VG_(clo_trace_notabove)) {}
860 if (8 != VG_(strlen)(tmp_str)) {
861 VG_(fmsg_bad_option)(arg,
866 else if ('1' == tmp_str[j]) VG_(clo_profyle_flags) |= (1 << (7-j));
868 VG_(fmsg_bad_option)(arg,
872 VG_(clo_profyle_sbs) = True;
876 VG_(clo_profyle_interval)) {}
879 VG_(clo_gen_suppressions), 0) {}
881 VG_(clo_gen_suppressions), 1) {}
883 VG_(clo_gen_suppressions), 2) {}
886 VG_(clo_unw_stack_scan_thresh), 0, 100) {}
888 VG_(clo_unw_stack_scan_frames), 0, 32) {}
891 VG_(clo_resync_filter), 0) {}
893 VG_(clo_resync_filter), 1) {}
895 VG_(clo_resync_filter), 2) {}
897 else if ( ! VG_(needs).command_line_options
899 VG_(fmsg_unknown_option)(arg);
906 if (VG_(clo_db_attach))
907 VG_(umsg)
912 if (VG_(clo_vgdb_prefix) == NULL)
913 VG_(clo_vgdb_prefix) = VG_(vgdb_prefix_default)();
917 if (VG_(clo_vex_control).guest_chase_thresh
918 >= VG_(clo_vex_control).guest_max_insns)
919 VG_(clo_vex_control).guest_chase_thresh
920 = VG_(clo_vex_control).guest_max_insns - 1;
922 if (VG_(clo_vex_control).guest_chase_thresh < 0)
923 VG_(clo_vex_control).guest_chase_thresh = 0;
927 if (VG_(clo_verbosity) < 0)
928 VG_(clo_verbosity) = 0;
931 VG_(clo_sigill_diag) = (VG_(clo_verbosity) > 0);
933 if (VG_(clo_trace_notbelow) == -1) {
934 if (VG_(clo_trace_notabove) == -1) {
936 VG_(clo_trace_notbelow) = 2147483647;
937 VG_(clo_trace_notabove) = 0;
940 VG_(clo_trace_notbelow) = 0;
943 if (VG_(clo_trace_notabove) == -1) {
945 VG_(clo_trace_notabove) = 2147483647;
951 VG_(dyn_vgdb_error) = VG_(clo_vgdb_error);
953 if (VG_(clo_gen_suppressions) > 0 &&
954 !VG_(needs).core_errors && !VG_(needs).tool_errors) {
955 VG_(fmsg_bad_option)("--gen-suppressions=yes",
957 "because it doesn't generate errors.\n", VG_(details).name);
961 if (VG_(clo_resync_filter) != 0) {
962 VG_(fmsg_bad_option)("--resync-filter=yes or =verbose",
970 if (VG_(clo_xml) && !VG_(needs).xml_output) {
971 VG_(clo_xml) = False;
972 VG_(fmsg_bad_option)("--xml=yes",
973 "%s does not support XML output.\n", VG_(details).name);
977 vg_assert( VG_(clo_gen_suppressions) >= 0 );
978 vg_assert( VG_(clo_gen_suppressions) <= 2 );
984 if (VG_(clo_xml)) {
993 if (VG_(clo_gen_suppressions) == 1) {
994 VG_(fmsg_bad_option)(
1004 if (VG_(clo_db_attach)) {
1005 VG_(fmsg_bad_option)(
1014 if (VG_(clo_dump_error) > 0) {
1015 VG_(fmsg_bad_option)("--xml=yes",
1020 VG_(clo_error_limit) = False;
1035 So set up logging now. After this is done, VG_(log_output_sink)
1036 and (if relevant) VG_(xml_output_sink) should be connected to
1041 vg_assert(VG_(log_output_sink).fd == 2 /* stderr */);
1042 vg_assert(VG_(log_output_sink).is_socket == False);
1043 vg_assert(VG_(clo_log_fname_expanded) == NULL);
1045 vg_assert(VG_(xml_output_sink).fd == -1 /* disabled */);
1046 vg_assert(VG_(xml_output_sink).is_socket == False);
1047 vg_assert(VG_(clo_xml_fname_expanded) == NULL);
1061 vg_assert(VG_(strlen)(log_fsname_unexpanded) <= 900); /* paranoia */
1065 logfilename = VG_(expand_file_name)("--log-file",
1067 sres = VG_(open)(logfilename,
1072 VG_(clo_log_fname_expanded) = logfilename;
1074 VG_(fmsg)("can't create log file '%s': %s\n",
1075 logfilename, VG_(strerror)(sr_Err(sres)));
1076 VG_(exit)(1);
1084 vg_assert(VG_(strlen)(log_fsname_unexpanded) <= 900); /* paranoia */
1085 tmp_log_fd = VG_(connect_via_socket)( log_fsname_unexpanded );
1087 VG_(fmsg)("Invalid --log-socket spec of '%s'\n",
1089 VG_(exit)(1);
1093 VG_(umsg)("failed to connect to logging server '%s'.\n"
1098 vg_assert(VG_(log_output_sink).fd == 2);
1102 VG_(log_output_sink).is_socket = True;
1120 vg_assert(VG_(strlen)(xml_fsname_unexpanded) <= 900); /* paranoia */
1124 xmlfilename = VG_(expand_file_name)("--xml-file",
1126 sres = VG_(open)(xmlfilename,
1131 VG_(clo_xml_fname_expanded) = xmlfilename;
1134 VG_(fmsg)("can't create XML file '%s': %s\n",
1135 xmlfilename, VG_(strerror)(sr_Err(sres)));
1136 VG_(exit)(1);
1144 vg_assert(VG_(strlen)(xml_fsname_unexpanded) <= 900); /* paranoia */
1145 tmp_xml_fd = VG_(connect_via_socket)( xml_fsname_unexpanded );
1147 VG_(fmsg)("Invalid --xml-socket spec of '%s'\n",
1149 VG_(exit)(1);
1153 VG_(umsg)("failed to connect to XML logging server '%s'.\n"
1157 vg_assert(VG_(xml_output_sink).fd == 2);
1161 VG_(xml_output_sink).is_socket = True;
1172 if (VG_(clo_xml) && tmp_xml_fd == -1) {
1173 VG_(fmsg_bad_option)(
1186 tmp_log_fd = VG_(fcntl)(tmp_log_fd, VKI_F_DUPFD, VG_(fd_hard_limit));
1188 VG_(message)(Vg_UserMsg, "valgrind: failed to move logfile fd "
1190 VG_(log_output_sink).fd = 2; // stderr
1191 VG_(log_output_sink).is_socket = False;
1193 VG_(log_output_sink).fd = tmp_log_fd;
1194 VG_(fcntl)(VG_(log_output_sink).fd, VKI_F_SETFD, VKI_FD_CLOEXEC);
1199 VG_(log_output_sink).fd = -1;
1200 VG_(log_output_sink).is_socket = False;
1208 tmp_xml_fd = VG_(fcntl)(tmp_xml_fd, VKI_F_DUPFD, VG_(fd_hard_limit));
1210 VG_(message)(Vg_UserMsg, "valgrind: failed to move XML file fd "
1212 VG_(xml_output_sink).fd = 2; // stderr
1213 VG_(xml_output_sink).is_socket = False;
1215 VG_(xml_output_sink).fd = tmp_xml_fd;
1216 VG_(fcntl)(VG_(xml_output_sink).fd, VKI_F_SETFD, VKI_FD_CLOEXEC);
1221 VG_(xml_output_sink).fd = -1;
1222 VG_(xml_output_sink).is_socket = False;
1227 if (VG_(clo_default_supp) &&
1228 (VG_(needs).core_errors || VG_(needs).tool_errors)) {
1232 Int len = VG_(strlen)(VG_(libdir)) + 1 + sizeof(default_supp);
1233 HChar *buf = VG_(malloc)("main.mpclo.3", len);
1234 VG_(sprintf)(buf, "%s/%s", VG_(libdir), default_supp);
1235 VG_(addToXA)(VG_(clo_suppressions), &buf);
1243 // It has been checked earlier in VG_(expand_file_name) when processing
1263 VG_(strncpy)(qualname, format + begin_qualname,
1266 qual = VG_(getenv)(qualname);
1268 VG_(printf_xml)("<logfilequalifier> <var>%pS</var> "
1291 SizeT len = VG_(strlen)(arg);
1295 if (VG_(strchr)(special, arg[i])) {
1296 VG_(umsg)("\\"); // escape with a backslash if necessary
1298 VG_(umsg)("%c", arg[i]);
1305 VG_(printf_xml)("%pS", arg);
1317 const HChar* xpre = VG_(clo_xml) ? " <line>" : "";
1318 const HChar* xpost = VG_(clo_xml) ? "</line>" : "";
1320 = VG_(clo_xml) ? VG_(printf_xml) : VG_(umsg);
1323 = VG_(clo_xml) ? xml_arg : umsg_arg;
1325 vg_assert( VG_(args_for_client) );
1326 vg_assert( VG_(args_for_valgrind) );
1329 if (VG_(clo_xml)) {
1330 VG_(printf_xml)("<?xml version=\"1.0\"?>\n");
1331 VG_(printf_xml)("\n");
1332 VG_(printf_xml)("<valgrindoutput>\n");
1333 VG_(printf_xml)("\n");
1334 VG_(printf_xml)("<protocolversion>4</protocolversion>\n");
1335 VG_(printf_xml)("<protocoltool>%s</protocoltool>\n", toolname);
1336 VG_(printf_xml)("\n");
1339 if (VG_(clo_xml) || VG_(clo_verbosity > 0)) {
1341 if (VG_(clo_xml))
1342 VG_(printf_xml)("<preamble>\n");
1345 umsg_or_xml( VG_(clo_xml) ? "%s%pS%pS%pS, %pS%s\n" : "%s%s%s%s, %s%s\n",
1347 VG_(details).name,
1348 NULL == VG_(details).version ? "" : "-",
1349 NULL == VG_(details).version
1350 ? "" : VG_(details).version,
1351 VG_(details).description,
1354 if (VG_(strlen)(toolname) >= 4 && VG_STREQN(4, toolname, "exp-")) {
1361 umsg_or_xml( VG_(clo_xml) ? "%s%pS%s\n" : "%s%s%s\n",
1362 xpre, VG_(details).copyright_author, xpost );
1375 umsg_or_xml_arg(VG_(args_the_exename));
1377 for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
1378 HChar* s = *(HChar**)VG_(indexXA)( VG_(args_for_client), i );
1384 if (VG_(clo_xml))
1385 VG_(printf_xml)("</preamble>\n");
1389 if (!VG_(clo_xml) && VG_(clo_verbosity) > 0 && !logging_to_fd) {
1390 VG_(umsg)("Parent PID: %d\n", VG_(getppid)());
1393 if (VG_(clo_xml)) {
1394 VG_(printf_xml)("\n");
1395 VG_(printf_xml)("<pid>%d</pid>\n", VG_(getpid)());
1396 VG_(printf_xml)("<ppid>%d</ppid>\n", VG_(getppid)());
1397 VG_(printf_xml)("<tool>%pS</tool>\n", toolname);
1400 if (VG_(clo_xml_user_comment)) {
1404 VG_(printf_xml)("<usercomment>%s</usercomment>\n",
1405 VG_(clo_xml_user_comment));
1407 VG_(printf_xml)("\n");
1408 VG_(printf_xml)("<args>\n");
1410 VG_(printf_xml)(" <vargv>\n");
1411 if (VG_(name_of_launcher))
1412 VG_(printf_xml)(" <exe>%pS</exe>\n",
1413 VG_(name_of_launcher));
1415 VG_(printf_xml)(" <exe>%pS</exe>\n",
1417 for (i = 0; i < VG_(sizeXA)( VG_(args_for_valgrind) ); i++) {
1418 VG_(printf_xml)(
1420 * (HChar**) VG_(indexXA)( VG_(args_for_valgrind), i )
1423 VG_(printf_xml)(" </vargv>\n");
1425 VG_(printf_xml)(" <argv>\n");
1426 VG_(printf_xml)(" <exe>%pS</exe>\n",
1427 VG_(args_the_exename));
1428 for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
1429 VG_(printf_xml)(
1431 * (HChar**) VG_(indexXA)( VG_(args_for_client), i )
1434 VG_(printf_xml)(" </argv>\n");
1436 VG_(printf_xml)("</args>\n");
1440 if (VG_(clo_xml))
1441 VG_(printf_xml)("\n");
1442 else if (VG_(clo_verbosity) > 0)
1443 VG_(umsg)("\n");
1445 if (VG_(clo_verbosity) > 1) {
1452 VG_(message)(Vg_DebugMsg, "\n");
1453 VG_(message)(Vg_DebugMsg, "Valgrind options:\n");
1454 for (i = 0; i < VG_(sizeXA)( VG_(args_for_valgrind) ); i++) {
1455 VG_(message)(Vg_DebugMsg,
1457 * (HChar**) VG_(indexXA)( VG_(args_for_valgrind), i ));
1461 VG_(message)(Vg_DebugMsg, "Contents of /proc/version:\n");
1462 fd = VG_(open) ( "/proc/version", VKI_O_RDONLY, 0 );
1464 VG_(message)(Vg_DebugMsg, " can't open /proc/version\n");
1468 VG_(message)(Vg_DebugMsg, " ");
1471 n = VG_(read)(fdno, version_buf, bufsiz);
1473 VG_(message)(Vg_DebugMsg, " error reading /proc/version\n");
1477 VG_(message)(Vg_DebugMsg, "%s", version_buf);
1479 VG_(message)(Vg_DebugMsg, "\n");
1480 VG_(close)(fdno);
1483 VG_(message)(Vg_DebugMsg, "Output from sysctl({CTL_KERN,KERN_VERSION}):\n");
1488 VG_(sysctl)(mib, sizeof(mib)/sizeof(Int), NULL, &len, NULL, 0);
1489 HChar *kernelVersion = VG_(malloc)("main.pp.1", len);
1490 VG_(sysctl)(mib, sizeof(mib)/sizeof(Int), kernelVersion, &len, NULL, 0);
1491 VG_(message)(Vg_DebugMsg, " %s\n", kernelVersion);
1492 VG_(free)( kernelVersion );
1495 VG_(machine_get_VexArchInfo)( &vex_arch, &vex_archinfo );
1496 VG_(message)(
1503 VG_(message)(
1508 VG_(message)(Vg_DebugMsg,
1509 "Valgrind library directory: %s\n", VG_(libdir));
1528 if (VG_(getrlimit)(VKI_RLIMIT_NOFILE, &rl) < 0) {
1542 VG_(printf)("fd limits: host, before: cur %lu max %lu\n",
1553 VG_(fd_soft_limit) = rl.rlim_cur - N_RESERVED_FDS;
1554 VG_(fd_hard_limit) = rl.rlim_cur - N_RESERVED_FDS;
1557 VG_(setrlimit)(VKI_RLIMIT_NOFILE, &rl);
1560 VG_(printf)("fd limits: host, after: cur %lu max %lu\n",
1562 VG_(printf)("fd limits: guest : cur %u max %u\n",
1563 VG_(fd_soft_limit), VG_(fd_hard_limit));
1566 if (VG_(cl_exec_fd) != -1)
1567 VG_(cl_exec_fd) = VG_(safe_fd)( VG_(cl_exec_fd) );
1585 } VG_(interim_stack);
1592 of it and passes it to VG_(ii_create_image)(). That produces
1593 'iifii', which is later handed to VG_(ii_finalise_image). */
1651 /* This is needed to make VG_(getenv) usable early. */
1652 VG_(client_envp) = (HChar**)envp;
1659 VG_(mach_init)();
1677 if VG_BOOL_CLO(argv[i], "--profile-heap", VG_(clo_profile_heap)) {}
1678 if VG_BINT_CLO(argv[i], "--core-redzone-size", VG_(clo_core_redzone_size),
1680 if VG_BINT_CLO(argv[i], "--redzone-size", VG_(clo_redzone_size),
1683 Bool ok = VG_(parse_Addr) (&tmp_str, &VG_(clo_aspacem_minAddr));
1685 VG_(fmsg_bad_option)(argv[i], "Invalid address\n");
1687 if (!VG_(am_is_valid_for_aspacem_minAddr)(VG_(clo_aspacem_minAddr),
1689 VG_(fmsg_bad_option)(argv[i], "%s\n", errmsg);
1695 VG_(debugLog_startup)(loglevel, "Stage 2 (main)");
1696 VG_(debugLog)(1, "main", "Welcome to Valgrind version "
1703 VG_(debugLog)(1, "main", "Checking current stack is plausible\n");
1704 { HChar* limLo = (HChar*)(&VG_(interim_stack).bytes[0]);
1705 HChar* limHi = limLo + sizeof(VG_(interim_stack));
1726 VG_(debugLog)(0, "main", "Root stack %p to %p, a local %p\n",
1728 VG_(debugLog)(0, "main", "Valgrind: FATAL: "
1730 VG_(debugLog)(0, "main", " Cannot continue. Sorry.\n");
1731 VG_(exit)(1);
1740 VG_(debugLog)(1, "main", "Checking initial stack was noted\n");
1742 VG_(debugLog)(0, "main", "Valgrind: FATAL: "
1744 VG_(debugLog)(0, "main", " Cannot continue. Sorry.\n");
1745 VG_(exit)(1);
1753 VG_(debugLog)(1, "main", "Starting the address space manager\n");
1761 the_iicii.clstack_end = VG_(am_startup)( the_iicii.sp_at_startup );
1762 VG_(debugLog)(1, "main", "Address space manager is running\n");
1772 VG_(debugLog)(1, "main", "Starting the dynamic memory manager\n");
1773 { void* p = VG_(malloc)( "main.vm.1", 12345 );
1774 VG_(free)( p );
1776 VG_(debugLog)(1, "main", "Dynamic memory manager is running\n");
1787 VG_(debugLog)(1, "main", "Initialise m_debuginfo\n");
1788 VG_(di_initialise)();
1792 { HChar *cp = VG_(getenv)(VALGRIND_LIB);
1794 VG_(libdir) = cp;
1795 VG_(debugLog)(1, "main", "VG_(libdir) = %s\n", VG_(libdir));
1800 VG_(debugLog)(1, "main", "Getting launcher's name ...\n");
1801 VG_(name_of_launcher) = VG_(getenv)(VALGRIND_LAUNCHER);
1802 if (VG_(name_of_launcher) == NULL) {
1803 VG_(printf)("valgrind: You cannot run '%s' directly.\n", argv[0]);
1804 VG_(printf)("valgrind: You should use $prefix/bin/valgrind.\n");
1805 VG_(exit)(1);
1807 VG_(debugLog)(1, "main", "... %s\n", VG_(name_of_launcher));
1814 VG_(getrlimit)(VKI_RLIMIT_DATA, &VG_(client_rlimit_data));
1815 zero.rlim_max = VG_(client_rlimit_data).rlim_max;
1816 VG_(setrlimit)(VKI_RLIMIT_DATA, &zero);
1819 VG_(getrlimit)(VKI_RLIMIT_STACK, &VG_(client_rlimit_stack));
1828 VG_(debugLog)(1, "main", "Get hardware capabilities ...\n");
1830 Bool ok = VG_(machine_get_hwcaps)();
1832 VG_(printf)("\n");
1833 VG_(printf)("valgrind: fatal error: unsupported CPU.\n");
1834 VG_(printf)(" Supported CPUs are:\n");
1835 VG_(printf)(" * x86 (practically any; Pentium-I or above), "
1837 VG_(printf)(" * AMD Athlon64/Opteron\n");
1838 VG_(printf)(" * ARM (armv7)\n");
1839 VG_(printf)(" * PowerPC (most; ppc405 and above)\n");
1840 VG_(printf)(" * System z (64bit only - s390x; z990 and above)\n");
1841 VG_(printf)("\n");
1842 VG_(exit)(1);
1844 VG_(machine_get_VexArchInfo)( &vex_arch, &vex_archinfo );
1845 VG_(debugLog)(
1855 VG_(debugLog)(1, "main", "Getting the working directory at startup\n");
1856 { Bool ok = VG_(record_startup_wd)();
1858 VG_(err_config_error)( "Can't establish current working "
1861 VG_(debugLog)(1, "main", "... %s\n", VG_(get_startup_wd)() );
1876 VG_(debugLog)(1, "main", "Split up command line\n");
1877 VG_(split_up_argv)( argc, argv );
1878 vg_assert( VG_(args_for_valgrind) );
1879 vg_assert( VG_(args_for_client) );
1881 for (i = 0; i < VG_(sizeXA)( VG_(args_for_valgrind) ); i++)
1882 VG_(printf)(
1884 * (HChar**) VG_(indexXA)( VG_(args_for_valgrind), i )
1886 VG_(printf)(" exe %s\n", VG_(args_the_exename));
1887 for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++)
1888 VG_(printf)(
1890 * (HChar**) VG_(indexXA)( VG_(args_for_client), i )
1898 // p: split_up_argv [for VG_(args_for_valgrind)]
1900 VG_(debugLog)(1, "main",
1906 VG_(clo_read_inline_info) == False);
1908 if (0 == VG_(strcmp)(toolname, "memcheck")
1909 || 0 == VG_(strcmp)(toolname, "helgrind")
1910 || 0 == VG_(strcmp)(toolname, "drd")) {
1915 VG_(clo_read_inline_info) = True;
1921 LibVEX_default_VexControl(& VG_(clo_vex_control));
1931 // p: set-libdir [for VG_(libdir)]
1934 // Setup client stack, eip, and VG_(client_arg[cv])
1940 // p: load_client() [for 'info' and hence VG_(brk_base)]
1946 VG_(debugLog)(1, "main", "Create initial image\n");
1956 /* NOTE: this call reads VG_(clo_main_stacksize). */
1957 the_iifii = VG_(ii_create_image)( the_iicii, &vex_archinfo );
1970 VG_(debugLog)(1, "main", "Setup file descriptors\n");
1979 // p: ii_create_image for VG_(client_auxv) setup.
1983 VG_(cl_cmdline_fd) = -1;
1984 VG_(cl_auxv_fd) = -1;
1988 HChar buf2[VG_(mkstemp_fullname_bufsz)(sizeof buf - 1)];
1993 VG_(debugLog)(1, "main", "Create fake /proc/<pid>/cmdline\n");
1995 VG_(sprintf)(buf, "proc_%d_cmdline", VG_(getpid)());
1996 fd = VG_(mkstemp)( buf, buf2 );
1998 VG_(err_config_error)("Can't create client cmdline file in %s\n", buf2);
2001 exename = VG_(args_the_exename);
2002 VG_(write)(fd, exename, VG_(strlen)( exename ));
2003 VG_(write)(fd, nul, 1);
2005 for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
2006 HChar* arg = * (HChar**) VG_(indexXA)( VG_(args_for_client), i );
2007 VG_(write)(fd, arg, VG_(strlen)( arg ));
2008 VG_(write)(fd, nul, 1);
2016 r = VG_(unlink)( buf2 );
2018 VG_(err_config_error)("Can't delete client cmdline file in %s\n", buf2);
2020 VG_(cl_cmdline_fd) = fd;
2022 VG_(debugLog)(1, "main", "Create fake /proc/<pid>/auxv\n");
2024 VG_(sprintf)(buf, "proc_%d_auxv", VG_(getpid)());
2025 fd = VG_(mkstemp)( buf, buf2 );
2027 VG_(err_config_error)("Can't create client auxv file in %s\n", buf2);
2029 UWord *client_auxv = VG_(client_auxv);
2038 VG_(write)(fd, VG_(client_auxv), client_auxv_len);
2045 r = VG_(unlink)( buf2 );
2047 VG_(err_config_error)("Can't delete client auxv file in %s\n", buf2);
2049 VG_(cl_auxv_fd) = fd;
2055 // p: setup_client_stack() [for 'VG_(client_arg[cv]']
2056 // p: setup_file_descriptors() [for 'VG_(fd_xxx_limit)']
2058 VG_(debugLog)(1, "main", "Initialise the tool part 1 (pre_clo_init)\n");
2059 VG_(tl_pre_clo_init)();
2061 if (VG_(needs).var_info)
2062 VG_(clo_read_var_info) = True;
2068 // p: tl_pre_clo_init [for 'VG_(tdict).usage']
2070 VG_(debugLog)(1, "main", "Print help and quit, if requested\n");
2077 // p: setup_client_stack() [for 'VG_(client_arg[cv]']
2078 // p: setup_file_descriptors() [for 'VG_(fd_xxx_limit)']
2080 VG_(debugLog)(1, "main",
2090 (void) VG_(read_millisecond_timer)();
2094 // p: tl_pre_clo_init [for 'VG_(details).name' and friends]
2096 // [for VG_(clo_verbosity), VG_(clo_xml),
2099 VG_(debugLog)(1, "main", "Print the preamble...\n");
2101 VG_(debugLog)(1, "main", "...finished the preamble\n");
2105 // p: setup_client_stack() [for 'VG_(client_arg[cv]']
2106 // p: setup_file_descriptors() [for 'VG_(fd_xxx_limit)']
2110 VG_(debugLog)(1, "main", "Initialise the tool part 2 (post_clo_init)\n");
2118 ok = VG_(sanity_check_needs)( &s );
2120 VG_(core_panic)(s);
2127 // p: tl_pre_clo_init [for 'VG_(details).avg_translation_sizeB']
2129 VG_(debugLog)(1, "main", "Initialise TT/TC\n");
2130 VG_(init_tt_tc)();
2134 // p: init_tt_tc [so it can call VG_(search_transtab) safely]
2137 VG_(debugLog)(1, "main", "Initialise redirects\n");
2138 VG_(redir_initialise)();
2142 // p: main_process_cmd_line_options() [for VG_(clo_wait_for_gdb)]
2146 if (VG_(clo_wait_for_gdb)) {
2148 VG_(debugLog)(1, "main", "Wait for GDB\n");
2149 VG_(printf)("pid=%d, entering delay loop\n", VG_(getpid)());
2179 // p: main_process_cmd_line_options [for VG_(clo_track_fds)]
2181 if (VG_(clo_track_fds)) {
2182 VG_(debugLog)(1, "main", "Init preopened fds\n");
2183 VG_(init_preopened_fds)();
2194 // come back from VG_(di_notify_mmap).
2204 VG_(debugLog)(1, "main", "Load initial debug info\n");
2207 addr2dihandle = VG_(newXA)( VG_(malloc), "main.vm.2",
2208 VG_(free), sizeof(Addr_n_ULong) );
2215 seg_starts = VG_(get_segment_starts)( SkFileC | SkFileV, &n_seg_starts );
2222 anu.ull = VG_(di_notify_mmap)( seg_starts[i], True/*allow_SkFileV*/,
2228 VG_(addToXA)( addr2dihandle, &anu );
2232 VG_(free)( seg_starts );
2237 seg_starts = VG_(get_segment_starts)( SkFileC, &n_seg_starts );
2244 VG_(di_notify_mmap)( seg_starts[i], False/*don't allow_SkFileV*/,
2248 VG_(free)( seg_starts );
2262 Addr co_start = VG_PGROUNDDN( (Addr)&VG_(trampoline_stuff_start) );
2263 Addr co_endPlus = VG_PGROUNDUP( (Addr)&VG_(trampoline_stuff_end) );
2264 VG_(debugLog)(1,"redir",
2269 = VG_(am_change_ownership_v_to_c)( co_start, co_endPlus - co_start );
2273 if (VG_(clo_xml)) {
2275 VG_(elapsed_wallclock_time)(buf, sizeof buf);
2276 VG_(printf_xml)( "<status>\n"
2281 VG_(printf_xml)( "\n" );
2284 VG_(init_Threads)();
2290 VG_(debugLog)(1, "main", "Initialise scheduler (phase 1)\n");
2291 tid_main = VG_(scheduler_init_phase1)();
2309 VG_(debugLog)(1, "main", "Tell tool about initial permissions\n");
2318 vg_assert(VG_(running_tid) == VG_INVALID_THREADID);
2319 VG_(running_tid) = tid_main;
2321 seg_starts = VG_(get_segment_starts)( SkFileC | SkAnonC | SkShmC,
2329 = VG_(am_find_nsegment)( seg_starts[i] );
2335 VG_(debugLog)(2, "main",
2343 n = VG_(sizeXA)( addr2dihandle );
2345 Addr_n_ULong* anl = VG_(indexXA)( addr2dihandle, j );
2356 ? ((Addr_n_ULong*)VG_(indexXA)( addr2dihandle, j ))->ull
2361 VG_(free)( seg_starts );
2362 VG_(deleteXA)( addr2dihandle );
2368 = VG_(am_find_nsegment)( the_iifii.initial_client_SP );
2386 VG_(debugLog)(2, "main", "mark stack inaccessible %010lx-%010lx\n",
2393 (Addr)&VG_(trampoline_stuff_start),
2394 (Addr)&VG_(trampoline_stuff_end)
2395 - (Addr)&VG_(trampoline_stuff_start),
2402 VG_(running_tid) = VG_INVALID_THREADID;
2403 vg_assert(VG_(running_tid) == VG_INVALID_THREADID);
2427 // p: setup_file_descriptors() [else VG_(safe_fd)() breaks]
2430 VG_(debugLog)(1, "main", "Initialise scheduler (phase 2)\n");
2432 = VG_(am_find_nsegment)( the_iifii.initial_client_SP );
2437 VG_(scheduler_init_phase2)( tid_main,
2445 // VG_(ii_create_image) [for 'the_iicii' initial info]
2447 VG_(debugLog)(1, "main", "Finalise initial image\n");
2448 VG_(ii_finalise_image)( the_iifii );
2455 VG_(debugLog)(1, "main", "Initialise signal management\n");
2457 VG_(vki_do_initial_consistency_checks)();
2459 VG_(sigstartup_actions)();
2463 // p: main_process_cmd_line_options() [for VG_(clo_suppressions)]
2465 if (VG_(needs).core_errors || VG_(needs).tool_errors) {
2466 VG_(debugLog)(1, "main", "Load suppressions\n");
2467 VG_(load_suppressions)();
2473 VG_(clstk_id) = VG_(register_stack)(VG_(clstk_start_base), VG_(clstk_end));
2478 VG_(debugLog)(1, "main", "\n");
2479 VG_(debugLog)(1, "main", "\n");
2480 VG_(am_show_nsegments)(1,"Memory layout at client startup");
2481 VG_(debugLog)(1, "main", "\n");
2482 VG_(debugLog)(1, "main", "\n");
2487 VG_(debugLog)(1, "main", "Running thread 1\n");
2499 VG_(address_of_m_main_shutdown_actions_NORETURN)
2504 VG_(main_thread_wrapper_NORETURN)(1);
2531 VG_(debugLog)(1, "main", "entering VG_(shutdown_actions_NORETURN)\n");
2532 VG_(am_show_nsegments)(1,"Memory layout at client shutdown");
2534 vg_assert(VG_(is_running_thread)(tid));
2542 vg_assert( VG_(count_living_threads)() == 1 );
2546 VG_(reap_threads)(tid);
2553 vg_assert(VG_(is_running_thread)(tid));
2554 vg_assert(VG_(count_living_threads)() == 1);
2562 vg_assert( VG_(count_living_threads)() >= 1 );
2570 vg_assert(VG_(is_running_thread)(tid));
2571 vg_assert(VG_(count_living_threads)() >= 1);
2575 if (VG_(gdbserver_stop_at) (VgdbStopAt_Exit)) {
2576 VG_(umsg)("(action at exit) vgdb me ... \n");
2577 VG_(gdbserver) (tid);
2579 VG_(threads)[tid].status = VgTs_Empty;
2586 if (VG_(clo_xml))
2587 VG_(printf_xml)("\n");
2588 else if (VG_(clo_verbosity) > 0)
2589 VG_(message)(Vg_UserMsg, "\n");
2591 if (VG_(clo_xml)) {
2593 VG_(elapsed_wallclock_time)(buf, sizeof buf);
2594 VG_(printf_xml)( "<status>\n"
2603 if (VG_(clo_track_fds))
2604 VG_(show_open_fds)("at exit");
2612 if (VG_(clo_xml)
2613 && (VG_(needs).core_errors || VG_(needs).tool_errors)) {
2614 VG_(show_error_counts_as_XML)();
2618 if (VG_(needs).core_errors || VG_(needs).tool_errors)
2619 VG_(show_all_errors)(VG_(clo_verbosity), VG_(clo_xml));
2621 if (VG_(clo_xml)) {
2622 VG_(printf_xml)("\n");
2623 VG_(printf_xml)("</valgrindoutput>\n");
2624 VG_(printf_xml)("\n");
2627 VG_(sanity_check_general)( True /*include expensive checks*/ );
2629 if (VG_(clo_stats))
2630 VG_(print_all_stats)(VG_(clo_verbosity) >= 1, /* Memory stats */
2636 if (VG_(clo_profile_heap)) {
2637 if (0) VG_(di_discard_ALL_debuginfo)();
2638 VG_(print_arena_cc_analysis)();
2644 if (VG_(clo_profyle_sbs) && VG_(clo_profyle_interval) == 0) {
2645 VG_(get_and_show_SB_profile)(0/*denoting end-of-run*/);
2652 /* Flush any output cached by previous calls to VG_(message). */
2653 VG_(message_flush)();
2658 VG_(gdbserver_exit) (tid, tids_schedretcode);
2664 VG_(debugLog)(1, "core_os",
2665 "VG_(terminate_NORETURN)(tid=%lld)\n", (ULong)tid);
2672 if (VG_(clo_error_exitcode) > 0
2673 && VG_(get_n_errs_found)() > 0) {
2674 VG_(client_exit)( VG_(clo_error_exitcode) );
2678 VG_(client_exit)( VG_(threads)[tid].os_state.exitcode );
2681 VG_(core_panic)("entered the afterlife in main() -- ExitT/P");
2686 vg_assert(VG_(threads)[tid].os_state.fatalsig != 0);
2687 VG_(kill_self)(VG_(threads)[tid].os_state.fatalsig);
2688 /* we shouldn't be alive at this point. But VG_(kill_self)
2691 VG_(debugLog)(0, "main", "VG_(kill_self) failed. Exiting normally.\n");
2692 VG_(exit)(0); /* bogus, but we really need to exit now */
2695 VG_(core_panic)("main(): signal was supposed to be fatal");
2699 VG_(core_panic)("main(): unexpected scheduler return code");
2713 Addr __libc_freeres_wrapper = VG_(client___libc_freeres_wrapper);
2715 vg_assert(VG_(is_running_thread)(tid));
2717 if ( !VG_(needs).libc_freeres ||
2718 !VG_(clo_run_libc_freeres) ||
2723 Addr r2 = VG_(get_tocptr)( __libc_freeres_wrapper );
2725 VG_(message)(Vg_UserMsg,
2727 VG_(message)(Vg_UserMsg,
2733 if (VG_(clo_verbosity) > 2 ||
2734 VG_(clo_trace_syscalls) ||
2735 VG_(clo_trace_sched))
2736 VG_(message)(Vg_DebugMsg,
2744 VG_(set_IP)(tid, __libc_freeres_wrapper);
2746 VG_(threads)[tid].arch.vex.guest_GPR2 = r2;
2749 VG_(threads)[tid].arch.vex.guest_GPR2 = __libc_freeres_wrapper;
2750 VG_(threads)[tid].arch.vex.guest_GPR12 = __libc_freeres_wrapper;
2754 VG_(threads)[tid].arch.vex.guest_r25 = __libc_freeres_wrapper;
2759 VG_(sigprocmask)(VKI_SIG_BLOCK, NULL, &VG_(threads)[tid].sig_mask);
2760 VG_(threads)[tid].tmp_sig_mask = VG_(threads)[tid].sig_mask;
2763 VG_(set_default_handler)(VKI_SIGSEGV);
2764 VG_(set_default_handler)(VKI_SIGBUS);
2765 VG_(set_default_handler)(VKI_SIGILL);
2766 VG_(set_default_handler)(VKI_SIGFPE);
2769 vg_assert(VG_(is_exiting)(tid));
2771 VG_(threads)[tid].exitreason = VgSrc_None;
2775 VG_(scheduler)(tid);
2777 vg_assert(VG_(is_exiting)(tid));
2811 return VG_(memcpy)(dest,src,n);
2815 return VG_(memmove)(dest,src,n);
2819 return VG_(memset)(s,c,n);
2825 VG_(printf)("Something called raise().\n");
2835 VG_(printf)("Something called raise().\n");
2841 VG_(printf)("Something called __aeabi_unwind_cpp_pr0()\n");
2847 VG_(printf)("Something called __aeabi_unwind_cpp_pr1()\n");
3281 (&VG_(interim_stack).bytes[0],
3282 &VG_(interim_stack).bytes[0] + sizeof(VG_(interim_stack))));
3284 VG_(memset)( &the_iicii, 0, sizeof(the_iicii) );
3285 VG_(memset)( &the_iifii, 0, sizeof(the_iifii) );
3311 VG_(exit)(r);
3387 return VG_(memcpy)(dest,src,n);
3392 return VG_(memset)(s,c,n);
3396 VG_(memset)(s,0,n);
3401 return VG_(memcpy)(dest,src,n);
3405 return VG_(memset)(s,c,n);
3421 (&VG_(interim_stack).bytes[0],
3422 &VG_(interim_stack).bytes[0] + sizeof(VG_(interim_stack))));
3424 VG_(memset)( &the_iicii, 0, sizeof(the_iicii) );
3425 VG_(memset)( &the_iifii, 0, sizeof(the_iifii) );
3431 VG_(exit)(r);