1 /* Copyright (C) 2021 Free Software Foundation, Inc.
4 This file is part of GNU Binutils.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
25 #include "DbeApplication.h"
29 void ipc_mainLoop (int argc, char *argv[]);
32 template <class ITEM> class Vector;
35 class er_print : public DbeApplication
39 er_print (int argc, char *argv[]);
41 void start (int argc, char *argv[]);
42 bool free_memory_before_exit ();
55 Vector<Histable*> *cstack;
58 // override methods in base class
59 int check_args (int argc, char *argv[]);
62 int is_valid_seg_name (char *seg_name, int prev);
63 int cmp_seg_name (char *full_name, char *seg_name);
64 int process_object_select (char *cov);
65 int set_libexpand (char *cov, enum LibExpand expand);
66 int set_libdefaults ();
68 bool end_command (char *cmd);
69 void run (int argc, char *argv[]);
71 void proc_cmd (CmdType cmd_type, int cparam, char *arg1, char *arg2,
72 char *arg3 = NULL, char *arg4 = NULL, bool xdefault = true);
73 void disp_list (int no_header, int size, int align[],
74 char *header[], char **lists[]);
79 void print_objects ();
80 void print_overview ();
81 void print_overview_nodes (Vector<void*> *data, int level,
82 Vector<char *> *metric_cmds, Vector<char *> *non_metric_cmds);
83 void print_overview_tree (Vector<void*> *data, int level, Vector<void*> *values,
84 Vector<char *> *metric_cmds, Vector<char *> *non_metric_cmds);
85 void print_segments ();
86 void filter_list (CmdType cmd_type);
87 int check_exp_id (int exp_id, char *sel);
88 int get_exp_id (char *sel, int &bgn_index, int &end_index);
89 void print_func (Histable::Type type, Print_mode mode,
90 MetricList *mlist1, MetricList *mlist2,
91 char *func_name = NULL, char *sel = NULL);
92 void print_gprof (CmdType cmd_type, char *func_name, char *sel);
93 void print_ctree (CmdType cmd_type);
94 void print_dobj (Print_mode type, MetricList *mlist1,
95 char *dobj_name = NULL, char *sel = NULL);
96 void memobj (char *, int);
97 void mo_list (bool showtab, FILE *outf);
98 void mo_define (char *, char *, char *, char *, char *);
99 void indxobj (char *, int);
100 void indxo_list (bool showtab, FILE *outf);
101 void indxo_define (char *, char *, char *, char *);
105 void dump_unk_pcs ();
106 void dump_funcs (char *);
107 void dump_dataobjects (char *);
109 void dump_entities ();
111 void dump_proc_warnings ();
113 void print_cmd (er_print_common_display *);
114 FILE *set_outfile (char *cmd, FILE *&set_file, bool append);
115 void gen_mapfile (char *seg_name, char *cmd);
118 #endif /* _ER_PRINT_H */