1 /* Copyright (C) 2014-2015 Free Software Foundation, Inc.
3 Contributed by Intel Corp. <markus.t.metzger@intel.com>
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #include "common-defs.h"
21 #include "btrace-common.h"
24 /* See btrace-common.h. */
27 btrace_format_string (enum btrace_format format
)
31 case BTRACE_FORMAT_NONE
:
32 return _("No or unknown format");
34 case BTRACE_FORMAT_BTS
:
35 return _("Branch Trace Store");
38 internal_error (__FILE__
, __LINE__
, _("Unknown branch trace format"));
41 /* See btrace-common.h. */
44 btrace_data_init (struct btrace_data
*data
)
46 data
->format
= BTRACE_FORMAT_NONE
;
49 /* See btrace-common.h. */
52 btrace_data_fini (struct btrace_data
*data
)
56 case BTRACE_FORMAT_NONE
:
60 case BTRACE_FORMAT_BTS
:
61 VEC_free (btrace_block_s
, data
->variant
.bts
.blocks
);
65 internal_error (__FILE__
, __LINE__
, _("Unkown branch trace format."));
68 /* See btrace-common.h. */
71 btrace_data_empty (struct btrace_data
*data
)
75 case BTRACE_FORMAT_NONE
:
78 case BTRACE_FORMAT_BTS
:
79 return VEC_empty (btrace_block_s
, data
->variant
.bts
.blocks
);
82 internal_error (__FILE__
, __LINE__
, _("Unkown branch trace format."));
This page took 0.034694 seconds and 5 git commands to generate.