aboutsummaryrefslogtreecommitdiff
path: root/gdb/disasm.c
AgeCommit message (Collapse)AuthorFilesLines
2008-08-11 ARM BE8 support.Stan Shebs1-0/+1
* disasm.c (gdb_disassemble_info): Set endian_code. * gdbarch.sh (gdbarch_info): New field byte_order_for_code. * gdbarch.h, gdbarch.c: Regenerate. * arch-utils.c (initialize_current_architecture): Set the default byte_order_for_code. (gdbarch_info_init): Ditto. (gdbarch_info_fill): Ditto. * arm-tdep.c (SWAP_INT, SWAP_SHORT): New macros. (thumb_analyze_prologue): Swap halfword if code endianness is different from general endianness. (arm_skip_prologue): Similarly. (arm_scan_prologue): Ditto. (thumb_get_next_pc): Ditto. (arm_get_next_pc): Ditto. (arm_gdbarch_init): Set byte_order_for_code from BE8 flag, choose correct endianness for breakpoints.
2008-01-01 Updated copyright notices for most files.Daniel Jacobowitz1-1/+1
2007-08-23 Switch the license of all .c files to GPLv3.Joel Brobecker1-4/+2
Switch the license of all .h files to GPLv3. Switch the license of all .cc files to GPLv3.
2007-06-21gdb/:Maciej W. Rozycki1-4/+17
* disasm.c (gdb_print_insn): Return the number of branch delay slot instructions too. * disasm.h (gdb_print_insn): Update prototype. * printcmd.c (branch_delay_insns): New variable to record the number of delay slot instructions after disassembling a branch. (print_formatted): Record the number of branch delay slot instructions. (do_examine): When disassembling, if the last instruction disassembled has any branch delay slots, then bump the count so that they get disassembled too. * tui/tui-disasm.c (tui_disassemble): Update the call to gdb_print_insn(). * NEWS: Document the new behaviour. gdb/doc/: * gdb.texinfo (Examining Memory): Document the new behaviour. gdb/gdbtk/: * generic/gdbtk-cmds.c (gdbtk_load_asm): Update the call to gdb_print_insn().
2007-06-192007-06-19 Markus Deuling <deuling@de.ibm.com>Ulrich Weigand1-2/+2
* gdbarch.sh (TARGET_PRINT_INSN): Replace by gdbarch_print_insn. * disasm.c (dump_insns, gdb_print_insn): Likewise. * gdbarch.c, gdbarch.h: Regenerate.
2007-01-09Copyright updates for 2007.Daniel Jacobowitz1-1/+1
2005-12-17 * breakpoint.c:Eli Zaretskii1-3/+3
* arm-tdep.c: * ia64-tdep.c: * i386-tdep.c: * hpread.c: * hppa-tdep.c: * hppa-hpux-tdep.c: * gnu-nat.c: * gdbtypes.c: * gdbarch.h: * gdbarch.c: * eval.c: * dwarf2read.c: * dbxread.c: * copying: * symfile.c: * stabsread.c: * sh64-tdep.c: * sh-tdep.c: * s390-tdep.c: * rs6000-tdep.c: * remote.c: * remote-mips.c: * mips-tdep.c: * mdebugread.c: * linux-nat.c: * infrun.c: * xcoffread.c: * win32-nat.c: * valops.c: * utils.c: * tracepoint.c: * target.c: * symtab.c: * c-exp.y: * ada-valprint.c: * ada-typeprint.c: * ada-lex.l: * ada-lang.h: * ada-lang.c: * ada-exp.y: * alphafbsd-tdep.c: * alphabsd-tdep.h: * alphabsd-tdep.c: * alphabsd-nat.c: * alpha-tdep.h: * alpha-tdep.c: * alpha-osf1-tdep.c: * alpha-nat.c: * alpha-mdebug-tdep.c: * alpha-linux-tdep.c: * alpha-linux-nat.c: * aix-thread.c: * abug-rom.c: * arch-utils.c: * annotate.h: * annotate.c: * amd64obsd-tdep.c: * amd64obsd-nat.c: * amd64nbsd-tdep.c: * amd64nbsd-nat.c: * amd64fbsd-tdep.c: * amd64fbsd-nat.c: * amd64bsd-nat.c: * amd64-tdep.h: * amd64-tdep.c: * amd64-sol2-tdep.c: * amd64-nat.h: * amd64-nat.c: * amd64-linux-tdep.c: * amd64-linux-nat.c: * alphanbsd-tdep.c: * block.h: * block.c: * bfd-target.h: * bfd-target.c: * bcache.h: * bcache.c: * ax.h: * ax-general.c: * ax-gdb.h: * ax-gdb.c: * avr-tdep.c: * auxv.h: * auxv.c: * armnbsd-tdep.c: * armnbsd-nat.c: * arm-tdep.h: * arm-linux-nat.c: * arch-utils.h: * charset.c: * call-cmds.h: * c-valprint.c: * c-typeprint.c: * c-lang.h: * c-lang.c: * buildsym.h: * buildsym.c: * bsd-uthread.h: * bsd-uthread.c: * bsd-kvm.h: * bsd-kvm.c: * breakpoint.h: * core-regset.c: * core-aout.c: * completer.h: * completer.c: * complaints.h: * complaints.c: * command.h: * coffread.c: * coff-solib.h: * coff-solib.c: * coff-pe-read.h: * coff-pe-read.c: * cli-out.h: * cli-out.c: * charset.h: * dink32-rom.c: * dictionary.h: * dictionary.c: * demangle.c: * defs.h: * dcache.h: * dcache.c: * d10v-tdep.c: * cpu32bug-rom.c: * cp-valprint.c: * cp-support.h: * cp-support.c: * cp-namespace.c: * cp-abi.h: * cp-abi.c: * corelow.c: * corefile.c: * environ.c: * elfread.c: * dwarfread.c: * dwarf2loc.c: * dwarf2expr.h: * dwarf2expr.c: * dwarf2-frame.h: * dwarf2-frame.c: * dve3900-rom.c: * dummy-frame.h: * dummy-frame.c: * dsrec.c: * doublest.h: * doublest.c: * disasm.h: * disasm.c: * fork-child.c: * findvar.c: * fbsd-nat.h: * fbsd-nat.c: * f-valprint.c: * f-typeprint.c: * f-lang.h: * f-lang.c: * expression.h: * expprint.c: * exec.h: * exec.c: * exceptions.h: * exceptions.c: * event-top.h: * event-top.c: * event-loop.h: * event-loop.c: * gdb.c: * gdb-stabs.h: * gdb-events.h: * gdb-events.c: * gcore.c: * frv-tdep.h: * frv-tdep.c: * frv-linux-tdep.c: * frame.h: * frame.c: * frame-unwind.h: * frame-unwind.c: * frame-base.h: * frame-base.c: * gdb_vfork.h: * gdb_thread_db.h: * gdb_string.h: * gdb_stat.h: * gdb_regex.h: * gdb_ptrace.h: * gdb_proc_service.h: * gdb_obstack.h: * gdb_locale.h: * gdb_dirent.h: * gdb_curses.h: * gdb_assert.h: * gdbarch.sh: * gdb.h: * hpux-thread.c: * hppabsd-nat.c: * hppa-tdep.h: * hpacc-abi.c: * h8300-tdep.c: * gregset.h: * go32-nat.c: * gnu-v3-abi.c: * gnu-v2-abi.h: * gnu-v2-abi.c: * gnu-nat.h: * glibc-tdep.c: * gdbtypes.h: * gdbcore.h: * gdbcmd.h: * i386nbsd-tdep.c: * i386nbsd-nat.c: * i386gnu-tdep.c: * i386gnu-nat.c: * i386fbsd-tdep.c: * i386fbsd-nat.c: * i386bsd-tdep.c: * i386bsd-nat.h: * i386bsd-nat.c: * i386-tdep.h: * i386-sol2-nat.c: * i386-nto-tdep.c: * i386-nat.c: * i386-linux-tdep.h: * i386-linux-tdep.c: * i386-linux-nat.c: * i386-cygwin-tdep.c: * inf-ttrace.c: * inf-ptrace.h: * inf-ptrace.c: * inf-loop.h: * inf-loop.c: * inf-child.h: * inf-child.c: * ia64-tdep.h: * ia64-linux-nat.c: * i387-tdep.h: * i387-tdep.c: * i386v4-nat.c: * i386v-nat.c: * i386obsd-tdep.c: * i386obsd-nat.c: * kod.c: * jv-valprint.c: * jv-typeprint.c: * jv-lang.h: * jv-lang.c: * irix5-nat.c: * iq2000-tdep.c: * interps.h: * interps.c: * inftarg.c: * inflow.h: * inflow.c: * inferior.h: * infcmd.c: * infcall.h: * infcall.c: * inf-ttrace.h: * m32r-tdep.h: * m32r-tdep.c: * m32r-rom.c: * m32r-linux-tdep.c: * m32r-linux-nat.c: * m2-valprint.c: * m2-typeprint.c: * m2-lang.h: * m2-lang.c: * lynx-nat.c: * linux-thread-db.c: * linux-nat.h: * linespec.c: * libunwind-frame.h: * libunwind-frame.c: * language.h: * language.c: * macroexp.c: * macrocmd.c: * m88kbsd-nat.c: * m88k-tdep.h: * m88k-tdep.c: * m68klinux-tdep.c: * m68klinux-nat.c: * m68kbsd-tdep.c: * m68kbsd-nat.c: * m68k-tdep.h: * m68k-tdep.c: * mips-linux-nat.c: * mips-irix-tdep.c: * minsyms.c: * memattr.h: * memattr.c: * mem-break.c: * mdebugread.h: * main.h: * main.c: * macrotab.h: * macrotab.c: * macroscope.h: * macroscope.c: * macroexp.h: * nbsd-tdep.c: * mt-tdep.c: * monitor.h: * monitor.c: * mn10300-tdep.h: * mn10300-tdep.c: * mn10300-linux-tdep.c: * mipsv4-nat.c: * mipsread.c: * mipsnbsd-tdep.h: * mipsnbsd-tdep.c: * mipsnbsd-nat.c: * mips64obsd-tdep.c: * mips64obsd-nat.c: * mips-tdep.h: * mips-mdebug-tdep.c: * mips-linux-tdep.c: * osabi.h: * osabi.c: * ocd.h: * ocd.c: * observer.c: * objfiles.h: * objfiles.c: * objc-lang.h: * objc-lang.c: * objc-exp.y: * nto-tdep.h: * nto-tdep.c: * nto-procfs.c: * nlmread.c: * nbsd-tdep.h: * ppcobsd-tdep.c: * ppcobsd-nat.c: * ppcnbsd-tdep.h: * ppcnbsd-tdep.c: * ppcnbsd-nat.c: * ppcbug-rom.c: * ppc-tdep.h: * ppc-sysv-tdep.c: * ppc-linux-tdep.c: * ppc-linux-nat.c: * ppc-bdm.c: * parser-defs.h: * parse.c: * p-valprint.c: * p-typeprint.c: * p-lang.h: * p-lang.c: * remote-fileio.h: * remote-fileio.c: * remote-est.c: * remote-e7000.c: * regset.h: * regset.c: * reggroups.h: * reggroups.c: * regcache.h: * regcache.c: * proc-why.c: * proc-service.c: * proc-events.c: * printcmd.c: * ppcobsd-tdep.h: * sentinel-frame.h: * sentinel-frame.c: * scm-valprint.c: * scm-tags.h: * scm-lang.h: * scm-lang.c: * scm-exp.c: * s390-tdep.h: * rom68k-rom.c: * remote.h: * remote-utils.c: * remote-st.c: * remote-sim.c: * remote-sds.c: * remote-rdp.c: * remote-rdi.c: * remote-hms.c: * sim-regno.h: * shnbsd-tdep.h: * shnbsd-tdep.c: * shnbsd-nat.c: * sh-tdep.h: * serial.h: * serial.c: * ser-unix.h: * ser-unix.c: * ser-tcp.c: * ser-pipe.c: * ser-go32.c: * ser-e7kpc.c: * ser-base.h: * ser-base.c: * solib.c: * solib-svr4.h: * solib-svr4.c: * solib-sunos.c: * solib-som.h: * solib-som.c: * solib-pa64.h: * solib-pa64.c: * solib-osf.c: * solib-null.c: * solib-legacy.c: * solib-irix.c: * solib-frv.c: * solib-aix5.c: * sol-thread.c: * sparc64-linux-tdep.c: * sparc64-linux-nat.c: * sparc-tdep.h: * sparc-tdep.c: * sparc-sol2-tdep.c: * sparc-sol2-nat.c: * sparc-nat.h: * sparc-nat.c: * sparc-linux-tdep.c: * sparc-linux-nat.c: * source.h: * source.c: * somread.c: * solist.h: * solib.h: * std-regs.c: * stack.h: * stack.c: * stabsread.h: * sparcobsd-tdep.c: * sparcnbsd-tdep.c: * sparcnbsd-nat.c: * sparc64obsd-tdep.c: * sparc64nbsd-tdep.c: * sparc64nbsd-nat.c: * sparc64fbsd-tdep.c: * sparc64fbsd-nat.c: * sparc64-tdep.h: * sparc64-tdep.c: * sparc64-sol2-tdep.c: * sparc64-nat.c: * ui-file.c: * typeprint.h: * typeprint.c: * tramp-frame.h: * tramp-frame.c: * trad-frame.h: * trad-frame.c: * tracepoint.h: * top.c: * tobs.inc: * thread.c: * terminal.h: * target.h: * symfile.h: * stop-gdb.c: * vaxbsd-nat.c: * vax-tdep.h: * vax-tdep.c: * vax-nat.c: * varobj.h: * varobj.c: * value.h: * value.c: * valprint.h: * valprint.c: * v850-tdep.c: * uw-thread.c: * user-regs.c: * ui-out.h: * ui-out.c: * ui-file.h: * xcoffsolib.h: * xcoffsolib.c: * wrapper.c: * wince.c: * wince-stub.h: * wince-stub.c: * vaxobsd-tdep.c: * vaxnbsd-tdep.c: * gdb_gcore.sh: * copying.c: * configure.ac: * aclocal.m4: * acinclude.m4: * reply_mig_hack.awk: * observer.sh: * gdb_mbuild.sh: * arm-linux-tdep.c: * blockframe.c: * dbug-rom.c: * environ.h: * dwarf2loc.h: * gdb-events.sh: * glibc-tdep.h: * gdb_wait.h: * gdbthread.h: * i386-sol2-tdep.c: * hppabsd-tdep.c: * hppa-linux-nat.c: * hppa-hpux-nat.c: * ia64-linux-tdep.c: * infptrace.c: * linespec.h: * maint.c: * mips-mdebug-tdep.h: * remote-m32r-sdi.c: * s390-nat.c: * rs6000-nat.c: * remote-utils.h: * sh3-rom.c: * sh-linux-tdep.c: * top.h: * symtab.h: * symmisc.c: * symfile-mem.c: * srec.h: * user-regs.h: * version.h: * valarith.c: * xstormy16-tdep.c: * wrapper.h: * Makefile.in: * f-exp.y: * cris-tdep.c: * cp-name-parser.y: * procfs.c: * proc-utils.h: * proc-flags.c: * proc-api.c: * p-exp.y: * m68hc11-tdep.c: * m2-exp.y: * kod.h: * kod-cisco.c: * jv-exp.y: * hppa-linux-tdep.c: Add (c) after Copyright. Update the FSF address.
2005-07-31From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>:Daniel Jacobowitz1-2/+3
gdb/ * cli-out.c (cli_field_fmt, cli_message, out_field_fmt): Add ATTR_FORMAT or ATTRIBUTE_FPTR_PRINTF. * complaints.c (vcomplaint): Likewise. * defs.h (xvasprintf, xstrvprintf, verror, vfatal) (internal_verror, internal_vwarning, vwarning) (deprecated_query_hook, deprecated_warning_hook) (deprecated_readline_begin_hook): Likewise. * disasm.c (fprintf_disasm): Likewise. * exceptions.c (throw_it): Likewise. * exceptions.h (throw_verror, throw_vfatal): Likewise. * mi/mi-interp.c (mi_interp_query_hook): Likewise. * mi/mi-out.c (mi_field_fmt, mi_message): Likewise. * tui/tui-hooks.c (tui_query_hook): Likewise. * tui/tui-out.c (tui_field_fmt, tui_message, out_field_fmt): Likewise. * ui-out.c (default_field_fmt, default_message, uo_field_fmt) (uo_message): Likewise. * ui-out.h (ui_out_field_fmt, ui_out_message, field_fmt_ftype) (message_ftype): Likewise. * utils.c (vfprintf_maybe_filtered, internal_vproblem) (defaulted_query, printchar): Likewise. gdb/gdbserver/ * server.h (error, fatal, warning): Add ATTR_FORMAT.
2005-05-162005-05-16 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-2/+2
* target.h (target_read_partial, target_write_partial) (do_xfer_memory, xfer_memory, target_read, target_write) (get_target_memory): For buffers, change "void*" to gdb_byte. (struct target_ops): Ditto for to_xfer_partial and deprecated_xfer_memory. * dcache.h (dcache_xfer_memory): Ditto. * target.c (default_xfer_partial, target_read_partial) (target_write_partial, target_read, target_write) (do_xfer_memory, update_current_target, get_target_memory): Update. (target_read_string): Change buf to a gdb_byte. * dcache.c (dcache_xfer_memory): Update. * exec.c (xfer_memory): Make buffer type to gdb_byte. * mem-break.c (default_memory_insert_breakpoint): Remove cast. * disasm.c (dis_asm_read_memory): Remove cast, use gdb_byte.
2005-02-23* disasm.c (gdb_disassemble_info): Call disassemble_init_for_target.Jim Blandy1-0/+1
2004-01-062004-01-06 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-13/+11
* disasm.c: Update copyright to include 2004. (do_mixed_source_and_assembly): For uiout asm list and tuple cleanups, initialize to null_cleanup instead of NULL and do so prior to loop. Only reset when we close off the tuple/list. Move check for whether to close off the asm tuple/list to after dump_insns call where it will be run on each loop iteration.
2003-10-24Index: mi/ChangeLogAndrew Cagney1-1/+1
2003-10-24 Andrew Cagney <cagney@redhat.com> * tui-out.c: Fix "fortunatly"[sic]. Index: doc/ChangeLog 2003-10-24 Andrew Cagney <cagney@redhat.com> * annotate.texinfo: Fix "fortunatly"[sic]. 2003-10-24 Andrew Cagney <cagney@redhat.com> * osabi.c (gdbarch_init_osabi): Fix typos, and "fortunatly"[sic]. * PROBLEMS, arch-utils.c, cli-out.c, command.h: Ditto. * complaints.c, cris-tdep.c, disasm.c, dwarf2-frame.c: Ditto. * frame.c, frame.h, infcall.c, infcmd.c, infrun.c: Ditto. * kod.c, mips-tdep.c, regcache.c, regcache.h, remote.c: Ditto.
2003-09-092003-09-04 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-8/+10
* avr-tdep.c: Include "dis-asm.h". * cris-tdep.c: Include "dis-asm.h". (cris_delayed_get_disassembler): Use "struct disassemble_info" instead of corresponding typedef. * h8300-tdep.c: Include "dis-asm.h". * ia64-tdep.c: Include "dis-asm.h". * i386-tdep.c: Include "dis-asm.h". (i386_print_insn): Use "struct disassemble_info" instead of corresponding typedef. * m68k-tdep.c: Include "dis-asm.h". * mcore-tdep.c: Include "dis-asm.h". * mips-tdep.c: Include "dis-asm.h". (gdb_print_insn_mips): Make static, use "struct disassemble_info" instead of corresponding typedef. * ns32k-tdep.c: Include "dis-asm.h". * s390-tdep.c: Include "dis-asm.h". * sparc-tdep.c: Include "dis-asm.h". * vax-tdep.c: Include "dis-asm.h". * v850-tdep.c: Include "dis-asm.h". * mn10300-tdep.c: Include "dis-asm.h". * rs6000-tdep.c: Include "dis-asm.h". * xstormy16-tdep.c: Include "dis-asm.h". (_initialize_xstormy16_tdep): Delete "extern" declaration of print_insn_xstormy16. * Makefile.in (v850-tdep.o): Update dependencies. (vax-tdep.o, sparc-tdep.o, s390-tdep.o): Ditto. (ns32k-tdep.o, mips-tdep.o, mcore-tdep.o): Ditto. (m68k-tdep.o, ia64-tdep.o, i386-tdep.o): Ditto. (h8300-tdep.o, cris-tdep.o, avr-tdep.o): Ditto. (mn10300-tdep.o, xstormy16-tdep.o, disasm.o): Ditto. (gdbarch_h): Remove $(dis_asm_h). * disasm.c: Include "dis-asm.h". (dis_asm_read_memory): Use "struct disassemble_info" instead of corresponding typedef. (dis_asm_memory_error, dump_insns, do_assembly_only): Ditto. (gdb_disassemble_info, gdb_disassembly, gdb_print_insn): Ditto. * gdbarch.sh: Do not include "dis-asm.h". (struct disassemble_info): Declare opaque. (TARGET_PRINT_INSN): Update declaration. * gdbarch.h, gdbarch.c: Re-generate.
2003-09-042003-09-03 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-18/+0
* arch-utils.h (legacy_print_insn): Delete declaration. * arch-utils.c (legacy_print_insn): Delete function. * disasm.c (deprecated_tm_print_insn_info): Delete. (_initialize_disasm): Delete function, contained code initializing deprecated_tm_print_insn_info. * gdbarch.sh (deprecated_tm_print_insn): Delete. (deprecated_tm_print_insn_info): Delete. (TARGET_PRINT_INSN): Do not provide a default. * gdbarch.h, gdbarch.c: Re-generate.
2003-09-032003-09-03 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-6/+14
* disasm.c (fprintf_disasm): New function. (gdb_disassemble_info): Call "init_disassemble_info", instead of INIT_DISASSEMBLE_INFO_NO_ARCH. Do not initialize "insn_sets", reverts 2003-08-14 change. (_initialize_disasm): Call "init_disassemble_info", instead of INIT_DISASSEMBLE_INFO_NO_ARCH.
2003-08-142003-08-14 Michael Snyder <msnyder@redhat.com>Michael Snyder1-0/+1
* disasm.c (gdb_disassemble_info): Set info->insn_sets to zero.
2003-07-182003-07-18 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-0/+1
From 2003-07-04 Kei Sakamoto <sakamoto.kei@renesas.com>: * disasm.c (gdb_disassemble_info): Initilize di.arch.
2003-07-07 * disasm.c (dump_insns): Separate instructions from addresses.Daniel Jacobowitz1-0/+3
2003-05-22 * disasm.c (gdb_disassemble_info): Initialize disassemble_infoIan Lance Taylor1-1/+1
with fprintf_filtered, not fprintf_unfiltered.
2003-05-032003-05-03 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-16/+36
* disasm.h (print_insn): Declare. * disasm.c (init_gdb_disassemble_info): New function. (gdb_disassembly): Call init_gdb_disassemble_info. (gdb_print_insn): New function. * v850-tdep.c (v850_scan_prologue): Call gdb_print_insn, instead of TARGET_PRINT_INSN. Send debug info to "gdb_stdlog". * mcore-tdep.c: Include "disasm.h" (mcore_dump_insn): Call gdb_print_insn, instead of TARGET_PRINT_INSN. * d10v-tdep.c: Include "disasm.h". (display_trace): Call gdb_print_insn, instead of print_insn. (print_insn): Delete function. * printcmd.c: Include "disasm.h". (print_insn): Delete function. (print_formatted): Call gdb_print_insn, instead of print_insn. * Makefile.in (printcmd.o): Update dependencies. (mcore-tdep.o, d10v-tdep.o): Ditto. 2003-05-03 Andrew Cagney <cagney@redhat.com> * tuiDisassem.c (tui_disassemble): Call gdb_print_insn, instead of TARGET_PRINT_INSN. Do not initialize a disassemble_info object.
2003-05-012003-05-01 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-71/+18
* disasm.c (gdb_disassemble_from_exec): Delete global variable. (gdb_disassembly): Make "di" non static, always initialize and cleanup. Always use dis_asm_read_memory. (gdb_dis_asm_read_memory): Delete function. 2003-05-01 Andrew Cagney <cagney@redhat.com> * gdb.asm/asm-source.exp: Check that "disassm" and "x/i" of a variable do not give memory errors.
2003-04-302003-04-30 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-1/+41
* gdbarch.sh (deprecated_tm_print_insn_info): Rename "tm_print_insn_info". (TARGET_PRINT_INSN_INFO): Delete macro. (dis_asm_read_memory): Delete function declaration. (dis_asm_memory_error, dis_asm_print_address): Ditto. (tm_print_insn_info): Delete variable definition. (_initialize_gdbarch): Do not initialize "tm_print_insn_info". * gdbarch.h, gdbarch.c: Re-generate. * d10v-tdep.c (display_trace): Replace "tm_print_insn_info" with "deprecated_tm_print_insn_info". * mcore-tdep.c (mcore_dump_insn): Ditto. * mips-tdep.c (mips_gdbarch_init): Ditto. * sparc-tdep.c (_initialize_sparc_tdep): Ditto. * v850-tdep.c (v850_scan_prologue, v850_gdbarch_init): Ditto. * ia64-tdep.c (_initialize_ia64_tdep): Ditto. * printcmd.c (print_insn): Use "deprecated_tm_print_insn_info" instead of TARGET_PRINT_INSN_INFO, add comment. * s390-tdep.c (s390_get_frame_info): Instead of "dis_asm_read_memory", use "deprecated_tm_print_insn_info". (s390_check_function_end, s390_is_sigreturn): Ditto. * corefile.c (dis_asm_read_memory): Move to "disasm.c". (dis_asm_memory_error, dis_asm_print_address): Ditto. * disasm.c: Include "gdbcore.h". (_initialize_disasm): New function, initialize "deprecated_tm_print_insn_info". (deprecated_tm_print_insn_info): New variable. (dis_asm_read_memory): Moved from "corefile.c", made static. (dis_asm_print_address, dis_asm_memory_error): Ditto. * Makefile.in (disasm.o): Update dependencies. 2003-04-28 Andrew Cagney <cagney@redhat.com> * gdbint.texinfo (Target Architecture Definition): Replace read_fp, TARGET_READ_FP and FP_REGNUM, with deprecated_read_fp, DEPRECATED_TARGET_READ_FP and DEPRECATED_REGNUM.
2003-04-082003-04-04 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-3/+5
* disasm.c (dump_insns): Move variables inside loop, or they will be freed more than once, causing wild memory corruptions. (gdb_disassembly): Look for the substring "-thread", instead of "-threads" in the target name, to make sure to find the 'multi-thread' target. Also, make sure we do the right thing with the "core" target.
2003-03-172003-03-17 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-5/+2
* disasm.c (gdb_disassembly): Set di.mach using the architecture's BFD. Simplify setting of di.endian.
2003-02-032003-02-02 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-16/+35
Fix PR gdb/742 gdb/743 * disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end. (do_mixed_source_and_assembly): Use make_cleanup_ui_out_tuple_begin_end and make_cleanup_ui_out_tuple_begin_end. (do_mixed_source_and_assembly): Ditto. * thread.c (do_captured_list_thread_ids): Ditto. * ui-out.h (ui_out_table_begin, ui_out_list_begin, ui_out_tuple_begin, ui_out_table_end, ui_out_list_end, ui_out_tuple_end): Delete prototypes. * ui-out.c (ui_out_list_begin, ui_out_tuple_begin, ui_out_list_end, ui_out_tuple_end): Delete. From Kevin Buettner <kevinb@redhat.com>: * ui-out.h (make_cleanup_ui_out_table_begin_end): New function. * ui-out.c (make_cleanup_ui_out_table_begin_end) (do_cleanup_table_end): New functions. * breakpoint.c (print_it_typical, print_one_breakpoint, mention): Use cleanups to invoke_ui_out_tuple_end(). (breakpoint_1): Use cleanup to invoke ui_out_table_end(). * cli/cli-setshow.c (cmd_show_list): Use make_cleanup_ui_out_tuple_begin_end.
2003-01-142003-01-13 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-1/+2
* ax-gdb.c, c-valprint.c, charset.c, corefile.c: Update copyright. * demangle.c, disasm.c, dwarf2cfi.c, dwarfread.c: Update copyright. * elfread.c, eval.c, expprint.c, expression.h: Update copyright. * f-typeprint.c, findvar.c, gcore.c, gdb_mbuild.sh: Update copyright. * gdbtypes.h, gnu-v2-abi.c, inferior.h, inftarg.c: Update copyright. * language.c, language.h, m32r-tdep.c: Update copyright. * mn10200-tdep.c, scm-lang.c, scm-lang.h: Update copyright. * somsolib.c, somsolib.h, symfile.c, symtab.h: Update copyright. * thread-db.c, typeprint.c, utils.c, valarith.c: Update copyright. * values.c, win32-nat.c, x86-64-linux-nat.c: Update copyright. * x86-64-linux-tdep.c, z8k-tdep.c: Update copyright. * cli/cli-decode.h, config/h8500/tm-h8500.h: Update copyright. Index: mi/ChangeLog 2003-01-13 Andrew Cagney <ac131313@redhat.com> * mi-cmd-env.c: Update copyright.
2003-01-092003-01-09 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-1/+1
* somsolib.h: Fix function indentation. * disasm.c, buildsym.c, buildsym.h: Eliminate PTR. * gnu-v2-abi.c, f-typeprint.c, x86-64-linux-tdep.c: Eliminate STREQ. * demangle.c, ax-gdb.c, c-valprint.c: Eliminate STREQ. * alpha-osf1-tdep.c, corefile.c: Eliminate STREQ. * somsolib.c, inftarg.c: Remove assignment in if conditional.
2002-09-30 * disasm.c: New file.Fernando Nasser1-0/+374
* disasm.h: New file. * mi/mi-cmd-disas.c (gdb_dis_asm_read_memory): Moved to disasm.c. (compare_lines): Ditto. (dump_insns): Ditto. (do_mixed_source_and_assembly): Moved to disasm.c. Added uiout argument. (do_assembly_only): Ditto. (do_disassembly): Renamed to gdb_disassembly and moved to disasm.c. Sdded uiout argument. * Makefile.in: Add new files. Reorder SFILES list. Update dependencies. Include libgdb.a later in the insight executable.