Deleted Added
sdiff udiff text old ( 13314:d1f53683ab94 ) new ( 13322:7391057615bd )
full compact
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#include <cstring>
31
32#include "base/logging.hh"
33#include "systemc/ext/utils/sc_report.hh"
34#include "systemc/ext/utils/sc_report_handler.hh"
35#include "systemc/utils/report.hh"
36
37namespace sc_core
38{
39
40sc_report::sc_report(sc_severity _severity, const char *msg_type,

--- 73 unchanged lines hidden (view full) ---

114{
115 sc_gem5::reportWarningsAsErrors = val;
116}
117
118void
119sc_report::register_id(int id, const char *msg)
120{
121 if (id < 0) {
122 SC_REPORT_ERROR("(E800) register_id failed", "invalid report id");
123 return;
124 }
125 if (!msg) {
126 SC_REPORT_ERROR("(E800) register_id failed", "invalid report message");
127 return;
128 }
129 auto p = sc_gem5::reportIdToMsgMap.insert(
130 std::pair<int, std::string>(id, msg));
131 if (!p.second) {
132 SC_REPORT_ERROR("(E800) register_id failed",
133 "report id already exists");
134 } else {
135 sc_gem5::reportMsgInfoMap[msg].id = id;
136 }
137}
138
139void
140sc_report::suppress_id(int id, bool suppress)
141{

--- 44 unchanged lines hidden ---