Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Side by Side Diff: src/processor/minidump_processor.cc

Issue 1833123002: Make EXC_BAD_ACCESS / EXC_I386_GPFLT print nicely in the processor (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Updated with review comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006, Google Inc. 1 // Copyright (c) 2006, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 reason.append("EXC_PPC_BADSPACE"); 738 reason.append("EXC_PPC_BADSPACE");
739 break; 739 break;
740 case MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED: 740 case MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED:
741 reason.append("EXC_PPC_UNALIGNED"); 741 reason.append("EXC_PPC_UNALIGNED");
742 break; 742 break;
743 default: 743 default:
744 reason.append(flags_string); 744 reason.append(flags_string);
745 BPLOG(INFO) << "Unknown exception reason " << reason; 745 BPLOG(INFO) << "Unknown exception reason " << reason;
746 break; 746 break;
747 } 747 }
748 } else if (raw_system_info->processor_architecture ==
749 MD_CPU_ARCHITECTURE_X86 ||
750 raw_system_info->processor_architecture ==
751 MD_CPU_ARCHITECTURE_AMD64) {
752 switch (exception_flags) {
753 case MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT:
754 reason.append("EXC_I386_GPFLT");
755 break;
756 default:
757 reason.append(flags_string);
758 BPLOG(INFO) << "Unknown exception reason " << reason;
759 break;
760 }
748 } else { 761 } else {
749 reason.append(flags_string); 762 reason.append(flags_string);
750 BPLOG(INFO) << "Unknown exception reason " << reason; 763 BPLOG(INFO) << "Unknown exception reason " << reason;
751 } 764 }
752 break; 765 break;
753 } 766 }
754 break; 767 break;
755 case MD_EXCEPTION_MAC_BAD_INSTRUCTION: 768 case MD_EXCEPTION_MAC_BAD_INSTRUCTION:
756 reason = "EXC_BAD_INSTRUCTION / "; 769 reason = "EXC_BAD_INSTRUCTION / ";
757 switch (raw_system_info->processor_architecture) { 770 switch (raw_system_info->processor_architecture) {
(...skipping 30 matching lines...) Expand all
788 case MD_EXCEPTION_CODE_MAC_PPC_PERFORMANCE_MONITOR: 801 case MD_EXCEPTION_CODE_MAC_PPC_PERFORMANCE_MONITOR:
789 reason.append("EXC_PPC_PERFMON"); 802 reason.append("EXC_PPC_PERFMON");
790 break; 803 break;
791 default: 804 default:
792 reason.append(flags_string); 805 reason.append(flags_string);
793 BPLOG(INFO) << "Unknown exception reason " << reason; 806 BPLOG(INFO) << "Unknown exception reason " << reason;
794 break; 807 break;
795 } 808 }
796 break; 809 break;
797 } 810 }
811 case MD_CPU_ARCHITECTURE_AMD64:
798 case MD_CPU_ARCHITECTURE_X86: { 812 case MD_CPU_ARCHITECTURE_X86: {
799 switch (exception_flags) { 813 switch (exception_flags) {
800 case MD_EXCEPTION_CODE_MAC_X86_INVALID_OPERATION: 814 case MD_EXCEPTION_CODE_MAC_X86_INVALID_OPERATION:
801 reason.append("EXC_I386_INVOP"); 815 reason.append("EXC_I386_INVOP");
802 break; 816 break;
803 case MD_EXCEPTION_CODE_MAC_X86_INVALID_TASK_STATE_SEGMENT: 817 case MD_EXCEPTION_CODE_MAC_X86_INVALID_TASK_STATE_SEGMENT:
804 reason.append("EXC_INVTSSFLT"); 818 reason.append("EXC_INVTSSFLT");
Mark Mentovai 2016/03/29 15:21:57 All of the rest of these are EXC_I386_* too.
805 break; 819 break;
806 case MD_EXCEPTION_CODE_MAC_X86_SEGMENT_NOT_PRESENT: 820 case MD_EXCEPTION_CODE_MAC_X86_SEGMENT_NOT_PRESENT:
807 reason.append("EXC_SEGNPFLT"); 821 reason.append("EXC_SEGNPFLT");
808 break; 822 break;
809 case MD_EXCEPTION_CODE_MAC_X86_STACK_FAULT: 823 case MD_EXCEPTION_CODE_MAC_X86_STACK_FAULT:
810 reason.append("EXC_STKFLT"); 824 reason.append("EXC_STKFLT");
811 break; 825 break;
812 case MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT: 826 case MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT:
813 reason.append("EXC_GPFLT"); 827 reason.append("EXC_I386_GPFLT");
814 break; 828 break;
815 case MD_EXCEPTION_CODE_MAC_X86_ALIGNMENT_FAULT: 829 case MD_EXCEPTION_CODE_MAC_X86_ALIGNMENT_FAULT:
816 reason.append("EXC_ALIGNFLT"); 830 reason.append("EXC_ALIGNFLT");
817 break; 831 break;
818 default: 832 default:
819 reason.append(flags_string); 833 reason.append(flags_string);
820 BPLOG(INFO) << "Unknown exception reason " << reason; 834 BPLOG(INFO) << "Unknown exception reason " << reason;
821 break; 835 break;
822 } 836 }
823 break; 837 break;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 break; 873 break;
860 case MD_EXCEPTION_CODE_MAC_PPC_ALTIVEC_ASSIST: 874 case MD_EXCEPTION_CODE_MAC_PPC_ALTIVEC_ASSIST:
861 reason.append("EXC_PPC_ALTIVECASSIST"); 875 reason.append("EXC_PPC_ALTIVECASSIST");
862 default: 876 default:
863 reason.append(flags_string); 877 reason.append(flags_string);
864 BPLOG(INFO) << "Unknown exception reason " << reason; 878 BPLOG(INFO) << "Unknown exception reason " << reason;
865 break; 879 break;
866 } 880 }
867 break; 881 break;
868 } 882 }
883 case MD_CPU_ARCHITECTURE_AMD64:
869 case MD_CPU_ARCHITECTURE_X86: { 884 case MD_CPU_ARCHITECTURE_X86: {
870 switch (exception_flags) { 885 switch (exception_flags) {
871 case MD_EXCEPTION_CODE_MAC_X86_DIV: 886 case MD_EXCEPTION_CODE_MAC_X86_DIV:
872 reason.append("EXC_I386_DIV"); 887 reason.append("EXC_I386_DIV");
873 break; 888 break;
874 case MD_EXCEPTION_CODE_MAC_X86_INTO: 889 case MD_EXCEPTION_CODE_MAC_X86_INTO:
875 reason.append("EXC_I386_INTO"); 890 reason.append("EXC_I386_INTO");
876 break; 891 break;
877 case MD_EXCEPTION_CODE_MAC_X86_NOEXT: 892 case MD_EXCEPTION_CODE_MAC_X86_NOEXT:
878 reason.append("EXC_I386_NOEXT"); 893 reason.append("EXC_I386_NOEXT");
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 case MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT: 974 case MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT:
960 reason.append("EXC_PPC_BREAKPOINT"); 975 reason.append("EXC_PPC_BREAKPOINT");
961 break; 976 break;
962 default: 977 default:
963 reason.append(flags_string); 978 reason.append(flags_string);
964 BPLOG(INFO) << "Unknown exception reason " << reason; 979 BPLOG(INFO) << "Unknown exception reason " << reason;
965 break; 980 break;
966 } 981 }
967 break; 982 break;
968 } 983 }
984 case MD_CPU_ARCHITECTURE_AMD64:
969 case MD_CPU_ARCHITECTURE_X86: { 985 case MD_CPU_ARCHITECTURE_X86: {
970 switch (exception_flags) { 986 switch (exception_flags) {
971 case MD_EXCEPTION_CODE_MAC_X86_SGL: 987 case MD_EXCEPTION_CODE_MAC_X86_SGL:
972 reason.append("EXC_I386_SGL"); 988 reason.append("EXC_I386_SGL");
973 break; 989 break;
974 case MD_EXCEPTION_CODE_MAC_X86_BPT: 990 case MD_EXCEPTION_CODE_MAC_X86_BPT:
975 reason.append("EXC_I386_BPT"); 991 reason.append("EXC_I386_BPT");
976 break; 992 break;
977 default: 993 default:
978 reason.append(flags_string); 994 reason.append(flags_string);
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 char assertion_line[32]; 1552 char assertion_line[32];
1537 snprintf(assertion_line, sizeof(assertion_line), "%u", raw_assertion->line); 1553 snprintf(assertion_line, sizeof(assertion_line), "%u", raw_assertion->line);
1538 assertion_string.append(" at line "); 1554 assertion_string.append(" at line ");
1539 assertion_string.append(assertion_line); 1555 assertion_string.append(assertion_line);
1540 } 1556 }
1541 1557
1542 return assertion_string; 1558 return assertion_string;
1543 } 1559 }
1544 1560
1545 } // namespace google_breakpad 1561 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698