aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-trace.c
AgeCommit message (Collapse)AuthorFilesLines
2016-01-05sim: trace: add support for disassemblingMike Frysinger1-0/+62
Some targets have started to add support for calling the disassembler automatically when executing code. Add support for that directly into the trace core.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-06-24sim: trace: drop unused trace_one_insnMike Frysinger1-85/+0
Everyone has migrated to the split functions (trace_prefix + trace_generic) a while ago, so we can drop this one now.
2015-06-24sim: trace: rename debug_printf fullyMike Frysinger1-1/+1
Rather than redirect using a define, just rename the symbol fully.
2015-06-24sim: trace: add a basic cpu register classMike Frysinger1-12/+24
The bfin/msp430 ports already had trace logic set up for reading/writing cpu registers, albeit using different unrelated levels (core & vpu). Add a proper register class for these and for other ports.
2015-06-24sim: trace: document alu/fpu/vpu trace options betterMike Frysinger1-4/+4
Make the acronyms clear for people.
2015-06-23sim: assume recentish compiler/systemsMike Frysinger1-18/+0
Assume the build system supports stdint.h/stdarg.h as those have been around long enough and we don't care about pre-stdc compilers anymore.
2015-06-12sim: trace: add WITH_TRACE_ANY_P helperMike Frysinger1-4/+4
We have STRACE_ANY_P and TRACE_ANY_P, so add WITH_TRACE_ANY_P to fill out the API. This lets us wrap the internal configure symbol.
2015-06-11sim: trace: centralize the system tracingMike Frysinger1-10/+2
First we convert the ETRACE_P to STRACE_EVENTS_P. This means we move from using the sim_events.trace storage to the common sim_state_base.trace_data array. With that deleted, the common trace init code can be simplified so the sim state works the same as the sim cpu.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-01-07remove VA_* macros from simTom Tromey1-2/+2
Remove the obsolete VA_* macros from sim. 2014-01-06 Tom Tromey <tromey@redhat.com> * common/cgen-trace.c: Don't use old VA_* macros. * common/sim-load.c (xprintf): Likewise. * common/sim-trace.c (trace_printf, debug_printf): Likewise.
2014-01-07remove PARAMS from simTom Tromey1-2/+2
This removes the last uses of PARAMS from sim. 2014-01-06 Tom Tromey <tromey@redhat.com> * README-HACKING: Don't use PARAMS. * arm/wrapper.c: Don't use PARAMS. * bfin/sim-main.h: Don't use PARAMS. * common/callback.c: Don't use PARAMS. * common/cgen-trace.c: Don't use PARAMS. * common/run-sim.h: Don't use PARAMS. * common/run.c: Don't use PARAMS. * common/sim-base.h: Don't use PARAMS. * common/sim-load.c: Don't use PARAMS. * common/sim-options.h: Don't use PARAMS. * common/sim-trace.c: Don't use PARAMS. * common/sim-trace.h: Don't use PARAMS. * common/sim-utils.h: Don't use PARAMS. * cr16/cr16_sim.h: Don't use PARAMS. * cr16/gencode.c: Don't use PARAMS. * cr16/interp.c: Don't use PARAMS. * cr16/simops.c: Don't use PARAMS. * d10v/d10v_sim.h: Don't use PARAMS. * d10v/gencode.c: Don't use PARAMS. * d10v/interp.c: Don't use PARAMS. * d10v/simops.c: Don't use PARAMS. * erc32/erc32.c: Don't use PARAMS. * erc32/exec.c: Don't use PARAMS. * erc32/float.c: Don't use PARAMS. * erc32/func.c: Don't use PARAMS. * erc32/sis.c: Don't use PARAMS. * erc32/sis.h: Don't use PARAMS. * mips/interp.c: Don't use PARAMS. * mips/sim-main.h: Don't use PARAMS. * sh/interp.c: Don't use PARAMS. * v850/sim-main.h: Don't use PARAMS. * v850/v850_sim.h: Don't use PARAMS.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker1-2/+1
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-03-29Commit gdb and sim support for v850e2 and v850e2v3 on behalf ofKevin Buettner1-12/+1
Rathish C <Rathish.C@kpitcummins.com>.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker1-2/+2
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-05-26sim: add syscall tracing levelMike Frysinger1-1/+13
It's useful to be able to trace just the system calls the simulated program is calling, so add a new --trace-syscall option for ports to leverage if they choose. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-03-15sim: common: trim trailing whitespaceMike Frysinger1-13/+13
2011-01-01run copyright.sh for 2011.Joel Brobecker1-1/+1
2010-04-12sim: add missing values to array initializersMike Frysinger1-19/+19
The sim code has a lot of static initializer for options and devices, but since they aren't using newer struct style, they have to specify a value for every option otherwise gcc spits a lot of warnings about "missing initializer". So add NULL/0 stubs for pointers/values. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-10sim: constify save_data()Mike Frysinger1-1/+1
The local save_data() function takes a pointer to a buffer and only uses it as the source to the memcpy() function. Since it is given const strings, GCC likes to spit out warnings: common/sim-trace.c: In function 'trace_prefix': common/sim-trace.c:697: warning: passing argument 5 of 'save_data' discards qualifiers from pointer target type So I've committed this as obvious. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-30sim: fix unused cpu_nr warningsMike Frysinger1-1/+1
The trace_option_handler() function only uses cpu_nr when the SIM_HAVE_ADDR_RANGE define is enabled. So move the decl down to where the code exists. Otherwise GCC warns: sim-trace.c: In function 'trace_option_handler': sim-trace.c:236: warning: unused variable 'cpu_nr'
2010-03-30sim: convert old style function definitionsMike Frysinger1-10/+2
GCC currently emits warnings like: nrun.c: In function 'usage': nrun.c:223: warning: old-style function definition
2010-01-01Update copyright notices to add year 2010.Joel Brobecker1-1/+1
2009-01-14 Update the copyright notice of some of the files I missedJoel Brobecker1-1/+2
in the previous copyright update.
2008-01-01 Updated copyright notices for most files.Daniel Jacobowitz1-1/+1
2007-08-24 Switch the license of all files explicitly copyright the FSFJoel Brobecker1-5/+4
to GPLv3.
2007-01-09Copyright updates for 2007.Daniel Jacobowitz1-1/+1
2003-10-31Index: sim/frv/ChangeLogAndrew Cagney1-1/+1
2003-10-30 Andrew Cagney <cagney@redhat.com> * traps.c: Replace "struct symbol_cache_entry" with "struct bfd_symbol". Index: sim/d10v/ChangeLog 2003-10-30 Andrew Cagney <cagney@redhat.com> * simops.c: Replace "struct symbol_cache_entry" with "struct bfd_symbol". Index: sim/common/ChangeLog 2003-10-30 Andrew Cagney <cagney@redhat.com> * sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry" with "struct bfd_symbol". Index: ld/ChangeLog 2003-10-30 Andrew Cagney <cagney@redhat.com> * emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry" with "struct bfd_symbol". Index: bfd/ChangeLog 2003-10-30 Andrew Cagney <cagney@redhat.com> * syms.c: Replace "struct symbol_cache_entry" with "struct bfd_symbol". * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto. * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto. * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto. * bfd-in2.h: Re-generate.
2001-02-222001-02-22 Ben Elliston <bje@redhat.com>Ben Elliston1-2/+15
* sim-trace.h (TRACE_VPU_IDX): Add. (TRACE_vpu): Define. (WITH_TRACE_VPU_P): Likewise. (TRACE_VPU_P): Likewise. * sim-trace.c (OPTION_TRACE_VPU): Define. (trace_options): Add --trace-vpu. (trace_option_handler): Handle OPTION_TRACE_VPU. (trace_option_handler): Include VPU tracing in --trace-semantics. (trace_idx_to_str): Handle TRACE_VPU_IDX.
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+1341
1999-04-16Initial creation of sourceware repositoryStan Shebs1-1338/+0
1998-12-05 * cgen-defs.h: New file, old cgen-sim.h.Doug Evans1-18/+170
* cgen-sim.h: Simple header that includes others. * sim-arange.c: New file. * sim-arange.h: New file. * sim-basics.h: Include it. * Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-arange.o. (sim-arange.o): Add rule for. * sim-cpu.h (sim_cpu_msg_prefix): Add prototype. (sim_io_eprintf_cpu): Add prototype. * sim-inline.h (HAVE_INLINE): Define if GNUC. (INLINE2): New macro. (EXTERN_INLINE): New macro. * sim-module.c (sim_post_argv_init): Initialize cpu backlink before calling module init fns. * sim-profile.h (OPTION_PROFILE_*): Move into enum. (profile_init): New function. (profile_options): New option --profile-range. (profile_option_handler): Handle --profile-range. (profile_print_insn): Qualify address range specific section titles. (profile_print_addr_ranges): New function. (profile_info): Print address ranges if specified. (profile_install): Set profile_init init fn. * sim-profile.h (PROFILE_DATA): New member `range'. * sim-trace.c (trace_init): New function. (trace_options): New option --trace-range. (trace_option_handler): Handle --trace-range. (trace_install): Set trace_init init fn. * sim-trace.h (TRACE_DATA): New member `range'. * sim-utils.c (sim_cpu_msg_prefix): New function. (sim_io_eprintf_cpu): New function. * cgen-engine.h (PC_IN_TRACE_RANGE_P): New macro. (PC_IN_PROFILE_RANGE_P): New macro. * cgen-trace.c (trace_insn_init): Set current_insn to NULL. (trace_insn_fini): New arg abuf. All callers updated. Exit early if trace_insn not called. Check ARGBUF_PROFILE_P before printing cycle counts. * cgen-trace.h (trace_insn_fini): Update prototype. (TRACE_RESULT_P): New macro. (TRACE_INSN_INIT,TRACE_INSN_FINI): New arg abuf. All callers updated. (TRACE_INSN): Check ARGBUF_TRACE_P. (TRACE_EXTRACT,TRACE_RESULT): New arg abuf. All callers updated. * cgen-types.h (SIM_INLINE): Delete. (SIM_HAVE_MODEL,SIM_HAVE_ADDR_RANGE): Define. * cgen-utils.c: Don't include cgen-engine.h * genmloop.sh (@cpu@_fill_argbuf): New function. (@cpu@_fill_argbuf_tp): New function. (@cpu@_emit_before,@cpu@_emit_after): New functions. (@cpu@_pbb_begin): Prefix cti_sc,insn_count with '_'. (SET_CTI_VPC,SET_INSN_COUNT): Update. (@cpu@_pbb_before): Check ARGBUF_PROFILE_P before calling doing profiling. Update call to TRACE_INSN_INIT,TRACE_INSN_FINI. (@cpu@_pbb_after): Check ARGBUF_PROFILE_P before calling doing profiling. Update call to TRACE_INSN_FINI.
1998-03-13 * sim-base.h (struct sim_state_base): Add prog_syms andFred Fish1-8/+27
define macro STATE_PROG_SYMS. * sim-trace.c (trace_one_insn): Add variables abfd, symsize, symbol_count, and asymbols. Call bfd_get_symtab_upper_bound and bfd_canonicalize_symtab, to get symbol table on first use and preserve it via STATE_PROG_SYMS for future calls to bfd_find_nearest_line.
1998-02-25Extend TRACE macros to include more cases.Andrew Cagney1-0/+14
Add MAX/MIN floating point functions. Add max32, min32 floating point contstants.
1998-02-24Add tracing to r5900 p* instructions.Andrew Cagney1-1/+60
1998-02-23Add tracing of booleans and addresses.Andrew Cagney1-21/+95
1998-02-20fix typoMichael Meissner1-30/+40
1998-02-18Extend sim-trace.[hc] to include a generic set of macro's for tracingAndrew Cagney1-35/+530
ALU/... inputs/outputs. Base implementation on original v850 code. Update igen to generate code interfacing with newer sim-trace.[hc].
1997-11-24 * sim-trace.c (trace_option_handler): Set state trace fileDoug Evans1-20/+48
for --trace-file in addition to cpu's values. (trace_vprintf): If cpu == NULL, try state's trace file.
1997-05-21Watchpoint interface.Andrew Cagney1-75/+118
1997-05-07o Clean-up tic80 fp tracingAndrew Cagney1-15/+30
o Fill in more tic80 insns
1997-05-06 * sim-trace.c (trace_uninstall): Don't close a file twice.David Edelsohn1-2/+11
1997-05-06Add semantic tracing to the tic80Michael Meissner1-22/+61
1997-05-06Fix typo; pass trace_line request as arg; pass common stuff in static structMichael Meissner1-19/+16
1997-05-06Enable --trace-linenum supportMichael Meissner1-4/+93
1997-05-05Add flakey floating-point support to the TI c80 simulator.Andrew Cagney1-5/+230
1997-04-17sim-trace.c: New file.David Edelsohn1-0/+70