Gary Benson [Wed, 30 Jul 2014 12:21:40 +0000 (13:21 +0100)]
Move errno.h to common-defs.h
This commit moves the inclusion of errno.h to common-defs.h and
removes all other inclusions. Note that prior to this commit
server.h included errno.h protected by "#ifdef HAVE_ERRNO_H".
This protection was added with the Windows CE port, which is
currently broken. Since no other platform needs this, I have
removed the protection and the configury to support it.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include errno.h.
* defs.h: Do not include errno.h.
* ada-typeprint.c: Likewise.
* c-typeprint.c: Likewise.
* core-regset.c: Likewise.
* corefile.c: Likewise.
* corelow.c: Likewise.
* event-loop.c: Likewise.
* f-typeprint.c: Likewise.
* gnu-nat.c: Likewise.
* go32-nat.c: Likewise.
* i386gnu-nat.c: Likewise.
* m2-typeprint.c: Likewise.
* nat/linux-btrace.c: Likewise.
* p-typeprint.c: Likewise.
* procfs.c: Likewise.
* remote-sim.c: Likewise.
* rs6000-nat.c: Likewise.
* target.c: Likewise.
* typeprint.c: Likewise.
* ui-file.c: Likewise.
* valops.c: Likewise.
* valprint.c: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* configure.ac (AC_CHECK_HEADERS): Remove errno.h.
* configure: Regenerate.
* config.in: Likewise.
* server.h: Do not include errno.h.
* event-loop.c: Likewise.
* hostio-errno.c: Likewise.
* linux-low.c: Likewise.
* remote-utils.c: Likewise.
* spu-low.c: Likewise.
* utils.c: Likewise.
* gdbreplay.c: Unconditionally include errno.h.
Gary Benson [Tue, 29 Jul 2014 14:06:51 +0000 (15:06 +0100)]
Include string.h in common-defs.h
This commit includes string.h in common-defs.h and removes all other
inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include string.h.
* aarch64-tdep.c: Do not include string.h.
* ada-exp.y: Likewise.
* ada-lang.c: Likewise.
* ada-lex.l: Likewise.
* ada-typeprint.c: Likewise.
* ada-valprint.c: Likewise.
* aix-thread.c: Likewise.
* alpha-linux-tdep.c: Likewise.
* alpha-mdebug-tdep.c: Likewise.
* alpha-nat.c: Likewise.
* alpha-osf1-tdep.c: Likewise.
* alpha-tdep.c: Likewise.
* alphanbsd-tdep.c: Likewise.
* amd64-dicos-tdep.c: Likewise.
* amd64-linux-tdep.c: Likewise.
* amd64-nat.c: Likewise.
* amd64-sol2-tdep.c: Likewise.
* amd64fbsd-tdep.c: Likewise.
* amd64obsd-tdep.c: Likewise.
* arch-utils.c: Likewise.
* arm-linux-nat.c: Likewise.
* arm-linux-tdep.c: Likewise.
* arm-tdep.c: Likewise.
* arm-wince-tdep.c: Likewise.
* armbsd-tdep.c: Likewise.
* armnbsd-nat.c: Likewise.
* armnbsd-tdep.c: Likewise.
* armobsd-tdep.c: Likewise.
* avr-tdep.c: Likewise.
* ax-gdb.c: Likewise.
* ax-general.c: Likewise.
* bcache.c: Likewise.
* bfin-tdep.c: Likewise.
* breakpoint.c: Likewise.
* build-id.c: Likewise.
* buildsym.c: Likewise.
* c-exp.y: Likewise.
* c-lang.c: Likewise.
* c-typeprint.c: Likewise.
* c-valprint.c: Likewise.
* charset.c: Likewise.
* cli-out.c: Likewise.
* cli/cli-cmds.c: Likewise.
* cli/cli-decode.c: Likewise.
* cli/cli-dump.c: Likewise.
* cli/cli-interp.c: Likewise.
* cli/cli-logging.c: Likewise.
* cli/cli-script.c: Likewise.
* cli/cli-setshow.c: Likewise.
* cli/cli-utils.c: Likewise.
* coffread.c: Likewise.
* common/agent.c: Likewise.
* common/buffer.c: Likewise.
* common/buffer.h: Likewise.
* common/common-utils.c: Likewise.
* common/filestuff.c: Likewise.
* common/filestuff.c: Likewise.
* common/format.c: Likewise.
* common/print-utils.c: Likewise.
* common/rsp-low.c: Likewise.
* common/signals.c: Likewise.
* common/vec.h: Likewise.
* common/xml-utils.c: Likewise.
* core-regset.c: Likewise.
* corefile.c: Likewise.
* corelow.c: Likewise.
* cp-abi.c: Likewise.
* cp-name-parser.y: Likewise.
* cp-support.c: Likewise.
* cp-valprint.c: Likewise.
* cris-tdep.c: Likewise.
* d-exp.y: Likewise.
* darwin-nat.c: Likewise.
* dbxread.c: Likewise.
* dcache.c: Likewise.
* demangle.c: Likewise.
* dicos-tdep.c: Likewise.
* disasm.c: Likewise.
* doublest.c: Likewise.
* dsrec.c: Likewise.
* dummy-frame.c: Likewise.
* dwarf2-frame.c: Likewise.
* dwarf2loc.c: Likewise.
* dwarf2read.c: Likewise.
* elfread.c: Likewise.
* environ.c: Likewise.
* eval.c: Likewise.
* event-loop.c: Likewise.
* exceptions.c: Likewise.
* exec.c: Likewise.
* expprint.c: Likewise.
* f-exp.y: Likewise.
* f-lang.c: Likewise.
* f-typeprint.c: Likewise.
* f-valprint.c: Likewise.
* fbsd-nat.c: Likewise.
* findcmd.c: Likewise.
* findvar.c: Likewise.
* fork-child.c: Likewise.
* frame.c: Likewise.
* frv-linux-tdep.c: Likewise.
* frv-tdep.c: Likewise.
* gdb.c: Likewise.
* gdb_bfd.c: Likewise.
* gdbarch.c: Likewise.
* gdbarch.sh: Likewise.
* gdbtypes.c: Likewise.
* gnu-nat.c: Likewise.
* gnu-v2-abi.c: Likewise.
* gnu-v3-abi.c: Likewise.
* go-exp.y: Likewise.
* go-lang.c: Likewise.
* go32-nat.c: Likewise.
* guile/guile.c: Likewise.
* guile/scm-auto-load.c: Likewise.
* hppa-hpux-tdep.c: Likewise.
* hppa-linux-nat.c: Likewise.
* hppanbsd-tdep.c: Likewise.
* hppaobsd-tdep.c: Likewise.
* i386-cygwin-tdep.c: Likewise.
* i386-dicos-tdep.c: Likewise.
* i386-linux-tdep.c: Likewise.
* i386-nto-tdep.c: Likewise.
* i386-sol2-tdep.c: Likewise.
* i386-tdep.c: Likewise.
* i386bsd-tdep.c: Likewise.
* i386gnu-nat.c: Likewise.
* i386nbsd-tdep.c: Likewise.
* i386obsd-tdep.c: Likewise.
* i387-tdep.c: Likewise.
* ia64-libunwind-tdep.c: Likewise.
* ia64-linux-nat.c: Likewise.
* inf-child.c: Likewise.
* inf-ptrace.c: Likewise.
* inf-ttrace.c: Likewise.
* infcall.c: Likewise.
* infcmd.c: Likewise.
* inflow.c: Likewise.
* infrun.c: Likewise.
* interps.c: Likewise.
* iq2000-tdep.c: Likewise.
* irix5-nat.c: Likewise.
* jv-exp.y: Likewise.
* jv-lang.c: Likewise.
* jv-typeprint.c: Likewise.
* jv-valprint.c: Likewise.
* language.c: Likewise.
* linux-fork.c: Likewise.
* linux-nat.c: Likewise.
* lm32-tdep.c: Likewise.
* m2-exp.y: Likewise.
* m2-typeprint.c: Likewise.
* m32c-tdep.c: Likewise.
* m32r-linux-nat.c: Likewise.
* m32r-linux-tdep.c: Likewise.
* m32r-rom.c: Likewise.
* m32r-tdep.c: Likewise.
* m68hc11-tdep.c: Likewise.
* m68k-tdep.c: Likewise.
* m68kbsd-tdep.c: Likewise.
* m68klinux-nat.c: Likewise.
* m68klinux-tdep.c: Likewise.
* m88k-tdep.c: Likewise.
* machoread.c: Likewise.
* macrocmd.c: Likewise.
* main.c: Likewise.
* mdebugread.c: Likewise.
* mem-break.c: Likewise.
* memattr.c: Likewise.
* memory-map.c: Likewise.
* mep-tdep.c: Likewise.
* mi/mi-cmd-break.c: Likewise.
* mi/mi-cmd-disas.c: Likewise.
* mi/mi-cmd-env.c: Likewise.
* mi/mi-cmd-stack.c: Likewise.
* mi/mi-cmd-var.c: Likewise.
* mi/mi-cmds.c: Likewise.
* mi/mi-console.c: Likewise.
* mi/mi-getopt.c: Likewise.
* mi/mi-interp.c: Likewise.
* mi/mi-main.c: Likewise.
* mi/mi-parse.c: Likewise.
* microblaze-rom.c: Likewise.
* microblaze-tdep.c: Likewise.
* mingw-hdep.c: Likewise.
* minidebug.c: Likewise.
* minsyms.c: Likewise.
* mips-irix-tdep.c: Likewise.
* mips-linux-tdep.c: Likewise.
* mips-tdep.c: Likewise.
* mips64obsd-tdep.c: Likewise.
* mipsnbsd-tdep.c: Likewise.
* mipsread.c: Likewise.
* mn10300-linux-tdep.c: Likewise.
* mn10300-tdep.c: Likewise.
* monitor.c: Likewise.
* moxie-tdep.c: Likewise.
* mt-tdep.c: Likewise.
* nat/linux-btrace.c: Likewise.
* nat/linux-osdata.c: Likewise.
* nat/linux-procfs.c: Likewise.
* nat/linux-ptrace.c: Likewise.
* nat/linux-waitpid.c: Likewise.
* nbsd-tdep.c: Likewise.
* nios2-linux-tdep.c: Likewise.
* nto-procfs.c: Likewise.
* nto-tdep.c: Likewise.
* objc-lang.c: Likewise.
* objfiles.c: Likewise.
* opencl-lang.c: Likewise.
* osabi.c: Likewise.
* osdata.c: Likewise.
* p-exp.y: Likewise.
* p-lang.c: Likewise.
* p-typeprint.c: Likewise.
* parse.c: Likewise.
* posix-hdep.c: Likewise.
* ppc-linux-nat.c: Likewise.
* ppc-sysv-tdep.c: Likewise.
* ppcfbsd-tdep.c: Likewise.
* ppcnbsd-tdep.c: Likewise.
* ppcobsd-tdep.c: Likewise.
* printcmd.c: Likewise.
* procfs.c: Likewise.
* prologue-value.c: Likewise.
* python/py-auto-load.c: Likewise.
* python/py-gdb-readline.c: Likewise.
* ravenscar-thread.c: Likewise.
* regcache.c: Likewise.
* registry.c: Likewise.
* remote-fileio.c: Likewise.
* remote-m32r-sdi.c: Likewise.
* remote-mips.c: Likewise.
* remote-notif.c: Likewise.
* remote-sim.c: Likewise.
* remote.c: Likewise.
* reverse.c: Likewise.
* rs6000-aix-tdep.c: Likewise.
* ser-base.c: Likewise.
* ser-go32.c: Likewise.
* ser-mingw.c: Likewise.
* ser-pipe.c: Likewise.
* ser-tcp.c: Likewise.
* ser-unix.c: Likewise.
* serial.c: Likewise.
* sh-tdep.c: Likewise.
* sh64-tdep.c: Likewise.
* shnbsd-tdep.c: Likewise.
* skip.c: Likewise.
* sol-thread.c: Likewise.
* solib-dsbt.c: Likewise.
* solib-frv.c: Likewise.
* solib-osf.c: Likewise.
* solib-som.c: Likewise.
* solib-spu.c: Likewise.
* solib-target.c: Likewise.
* solib.c: Likewise.
* somread.c: Likewise.
* source.c: Likewise.
* sparc-nat.c: Likewise.
* sparc-sol2-tdep.c: Likewise.
* sparc-tdep.c: Likewise.
* sparc64-tdep.c: Likewise.
* sparc64fbsd-tdep.c: Likewise.
* sparc64nbsd-tdep.c: Likewise.
* sparcnbsd-tdep.c: Likewise.
* spu-linux-nat.c: Likewise.
* spu-multiarch.c: Likewise.
* spu-tdep.c: Likewise.
* stabsread.c: Likewise.
* stack.c: Likewise.
* std-regs.c: Likewise.
* symfile.c: Likewise.
* symmisc.c: Likewise.
* symtab.c: Likewise.
* target.c: Likewise.
* thread.c: Likewise.
* tilegx-linux-nat.c: Likewise.
* tilegx-tdep.c: Likewise.
* top.c: Likewise.
* tracepoint.c: Likewise.
* tui/tui-command.c: Likewise.
* tui/tui-data.c: Likewise.
* tui/tui-disasm.c: Likewise.
* tui/tui-file.c: Likewise.
* tui/tui-layout.c: Likewise.
* tui/tui-out.c: Likewise.
* tui/tui-regs.c: Likewise.
* tui/tui-source.c: Likewise.
* tui/tui-stack.c: Likewise.
* tui/tui-win.c: Likewise.
* tui/tui-windata.c: Likewise.
* tui/tui-winsource.c: Likewise.
* typeprint.c: Likewise.
* ui-file.c: Likewise.
* ui-out.c: Likewise.
* user-regs.c: Likewise.
* utils.c: Likewise.
* v850-tdep.c: Likewise.
* valarith.c: Likewise.
* valops.c: Likewise.
* valprint.c: Likewise.
* value.c: Likewise.
* varobj.c: Likewise.
* vax-tdep.c: Likewise.
* vaxnbsd-tdep.c: Likewise.
* vaxobsd-tdep.c: Likewise.
* windows-nat.c: Likewise.
* xcoffread.c: Likewise.
* xml-support.c: Likewise.
* xstormy16-tdep.c: Likewise.
* xtensa-linux-nat.c: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include string.h.
* event-loop.c: Likewise.
* linux-low.c: Likewise.
* regcache.c: Likewise.
* remote-utils.c: Likewise.
* spu-low.c: Likewise.
* utils.c: Likewise.
Gary Benson [Tue, 29 Jul 2014 13:47:21 +0000 (14:47 +0100)]
Include gdb_assert.h in common-defs.h
This commit includes gdb_assert.h in common-defs.h and removes all
other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include gdb_assert.h.
* aarch64-tdep.c: Do not include gdb_assert.h.
* addrmap.c: Likewise.
* aix-thread.c: Likewise.
* alpha-linux-tdep.c: Likewise.
* alpha-mdebug-tdep.c: Likewise.
* alphanbsd-tdep.c: Likewise.
* amd64-nat.c: Likewise.
* amd64-tdep.c: Likewise.
* amd64bsd-nat.c: Likewise.
* amd64fbsd-nat.c: Likewise.
* amd64fbsd-tdep.c: Likewise.
* amd64nbsd-nat.c: Likewise.
* amd64nbsd-tdep.c: Likewise.
* amd64obsd-nat.c: Likewise.
* amd64obsd-tdep.c: Likewise.
* arch-utils.c: Likewise.
* arm-tdep.c: Likewise.
* armbsd-tdep.c: Likewise.
* auxv.c: Likewise.
* bcache.c: Likewise.
* bfin-tdep.c: Likewise.
* blockframe.c: Likewise.
* breakpoint.c: Likewise.
* bsd-kvm.c: Likewise.
* bsd-uthread.c: Likewise.
* buildsym.c: Likewise.
* c-exp.y: Likewise.
* c-lang.c: Likewise.
* charset.c: Likewise.
* cleanups.c: Likewise.
* cli-out.c: Likewise.
* cli/cli-decode.c: Likewise.
* cli/cli-dump.c: Likewise.
* cli/cli-logging.c: Likewise.
* cli/cli-script.c: Likewise.
* cli/cli-utils.c: Likewise.
* coffread.c: Likewise.
* common/common-utils.c: Likewise.
* common/queue.h: Likewise.
* common/signals.c: Likewise.
* common/vec.h: Likewise.
* complaints.c: Likewise.
* completer.c: Likewise.
* corelow.c: Likewise.
* cp-abi.c: Likewise.
* cp-name-parser.y: Likewise.
* cp-namespace.c: Likewise.
* cp-support.c: Likewise.
* cris-tdep.c: Likewise.
* dbxread.c: Likewise.
* dictionary.c: Likewise.
* doublest.c: Likewise.
* dsrec.c: Likewise.
* dummy-frame.c: Likewise.
* dwarf2-frame-tailcall.c: Likewise.
* dwarf2-frame.c: Likewise.
* dwarf2expr.c: Likewise.
* dwarf2loc.c: Likewise.
* dwarf2read.c: Likewise.
* eval.c: Likewise.
* event-loop.c: Likewise.
* exceptions.c: Likewise.
* expprint.c: Likewise.
* f-valprint.c: Likewise.
* fbsd-nat.c: Likewise.
* findvar.c: Likewise.
* frame-unwind.c: Likewise.
* frame.c: Likewise.
* frv-tdep.c: Likewise.
* gcore.c: Likewise.
* gdb-dlfcn.c: Likewise.
* gdb_bfd.c: Likewise.
* gdbarch.c: Likewise.
* gdbarch.sh: Likewise.
* gdbtypes.c: Likewise.
* gnu-nat.c: Likewise.
* gnu-v3-abi.c: Likewise.
* go-lang.c: Likewise.
* guile/scm-exception.c: Likewise.
* guile/scm-gsmob.c: Likewise.
* guile/scm-lazy-string.c: Likewise.
* guile/scm-math.c: Likewise.
* guile/scm-pretty-print.c: Likewise.
* guile/scm-safe-call.c: Likewise.
* guile/scm-utils.c: Likewise.
* guile/scm-value.c: Likewise.
* h8300-tdep.c: Likewise.
* hppa-hpux-nat.c: Likewise.
* hppa-tdep.c: Likewise.
* hppanbsd-tdep.c: Likewise.
* hppaobsd-tdep.c: Likewise.
* i386-darwin-nat.c: Likewise.
* i386-darwin-tdep.c: Likewise.
* i386-nto-tdep.c: Likewise.
* i386-tdep.c: Likewise.
* i386bsd-nat.c: Likewise.
* i386fbsd-tdep.c: Likewise.
* i386gnu-nat.c: Likewise.
* i386nbsd-tdep.c: Likewise.
* i386obsd-tdep.c: Likewise.
* i387-tdep.c: Likewise.
* ia64-libunwind-tdep.c: Likewise.
* ia64-tdep.c: Likewise.
* inf-ptrace.c: Likewise.
* inf-ttrace.c: Likewise.
* infcall.c: Likewise.
* infcmd.c: Likewise.
* infrun.c: Likewise.
* inline-frame.c: Likewise.
* interps.c: Likewise.
* jv-lang.c: Likewise.
* jv-typeprint.c: Likewise.
* linux-fork.c: Likewise.
* linux-nat.c: Likewise.
* linux-thread-db.c: Likewise.
* m32c-tdep.c: Likewise.
* m32r-linux-nat.c: Likewise.
* m32r-tdep.c: Likewise.
* m68k-tdep.c: Likewise.
* m68kbsd-nat.c: Likewise.
* m68kbsd-tdep.c: Likewise.
* m88k-tdep.c: Likewise.
* machoread.c: Likewise.
* macroexp.c: Likewise.
* macrotab.c: Likewise.
* maint.c: Likewise.
* mdebugread.c: Likewise.
* memory-map.c: Likewise.
* mep-tdep.c: Likewise.
* mi/mi-common.c: Likewise.
* microblaze-tdep.c: Likewise.
* mingw-hdep.c: Likewise.
* mips-linux-nat.c: Likewise.
* mips-linux-tdep.c: Likewise.
* mips-tdep.c: Likewise.
* mips64obsd-tdep.c: Likewise.
* mipsnbsd-tdep.c: Likewise.
* mn10300-linux-tdep.c: Likewise.
* mn10300-tdep.c: Likewise.
* moxie-tdep.c: Likewise.
* mt-tdep.c: Likewise.
* nat/linux-btrace.c: Likewise.
* nat/linux-osdata.c: Likewise.
* nat/linux-ptrace.c: Likewise.
* nat/mips-linux-watch.c: Likewise.
* nios2-linux-tdep.c: Likewise.
* nios2-tdep.c: Likewise.
* objc-lang.c: Likewise.
* objfiles.c: Likewise.
* obsd-nat.c: Likewise.
* opencl-lang.c: Likewise.
* osabi.c: Likewise.
* parse.c: Likewise.
* ppc-linux-nat.c: Likewise.
* ppc-sysv-tdep.c: Likewise.
* ppcfbsd-nat.c: Likewise.
* ppcfbsd-tdep.c: Likewise.
* ppcnbsd-nat.c: Likewise.
* ppcnbsd-tdep.c: Likewise.
* ppcobsd-nat.c: Likewise.
* ppcobsd-tdep.c: Likewise.
* printcmd.c: Likewise.
* procfs.c: Likewise.
* prologue-value.c: Likewise.
* psymtab.c: Likewise.
* python/py-lazy-string.c: Likewise.
* python/py-value.c: Likewise.
* regcache.c: Likewise.
* reggroups.c: Likewise.
* registry.c: Likewise.
* remote-sim.c: Likewise.
* remote.c: Likewise.
* rs6000-aix-tdep.c: Likewise.
* rs6000-tdep.c: Likewise.
* s390-linux-tdep.c: Likewise.
* score-tdep.c: Likewise.
* ser-base.c: Likewise.
* ser-mingw.c: Likewise.
* sh-tdep.c: Likewise.
* sh64-tdep.c: Likewise.
* solib-darwin.c: Likewise.
* solib-spu.c: Likewise.
* solib-svr4.c: Likewise.
* source.c: Likewise.
* sparc-nat.c: Likewise.
* sparc-sol2-tdep.c: Likewise.
* sparc-tdep.c: Likewise.
* sparc64-sol2-tdep.c: Likewise.
* sparc64-tdep.c: Likewise.
* sparc64fbsd-tdep.c: Likewise.
* sparc64nbsd-tdep.c: Likewise.
* sparc64obsd-tdep.c: Likewise.
* sparcnbsd-tdep.c: Likewise.
* sparcobsd-tdep.c: Likewise.
* spu-multiarch.c: Likewise.
* spu-tdep.c: Likewise.
* stabsread.c: Likewise.
* stack.c: Likewise.
* symfile.c: Likewise.
* symtab.c: Likewise.
* target-descriptions.c: Likewise.
* target-memory.c: Likewise.
* target.c: Likewise.
* tic6x-linux-tdep.c: Likewise.
* tic6x-tdep.c: Likewise.
* tilegx-linux-nat.c: Likewise.
* tilegx-tdep.c: Likewise.
* top.c: Likewise.
* tramp-frame.c: Likewise.
* tui/tui-out.c: Likewise.
* tui/tui-winsource.c: Likewise.
* ui-out.c: Likewise.
* user-regs.c: Likewise.
* utils.c: Likewise.
* v850-tdep.c: Likewise.
* valops.c: Likewise.
* value.c: Likewise.
* varobj.c: Likewise.
* vax-nat.c: Likewise.
* xml-syscall.c: Likewise.
* xml-tdesc.c: Likewise.
* xstormy16-tdep.c: Likewise.
* xtensa-linux-nat.c: Likewise.
* xtensa-tdep.c: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include gdb_assert.h.
Gary Benson [Mon, 28 Jul 2014 13:35:17 +0000 (14:35 +0100)]
Move common-utils.h to common-defs.h
This commit moves the inclusion of common-utils.h to common-defs.h and
removes all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include common-utils.h.
* defs.h: Do not include common-utils.h.
* common/gdb_assert.h: Likewise.
* darwin-nat.h: Likewise.
* nat/linux-btrace.c: Likewise.
* target/waitstatus.h: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include common-utils.h.
Gary Benson [Mon, 28 Jul 2014 13:28:06 +0000 (14:28 +0100)]
Move ptid.h to common-defs.h
This commit moves the inclusion of ptid.h to common-defs.h and removes
all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include ptid.h.
* defs.h: Do not include ptid.h.
* inferior.h: Likewise.
* infrun.h: Likewise.
* nat/linux-btrace.h: Likewise.
* nat/linux-osdata.h: Likewise.
* target/waitstatus.h: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include ptid.h.
* notif.h: Likewise.
Gary Benson [Mon, 28 Jul 2014 13:21:31 +0000 (14:21 +0100)]
Move gdb_locale.h to common-defs.h
This commit moves the inclusion of gdb_locale.h to common-defs.h and
removes all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include gdb_locale.h.
* defs.h: Do not include gdb_locale.h.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include gdb_locale.h.
Gary Benson [Mon, 28 Jul 2014 13:09:12 +0000 (14:09 +0100)]
Move gdb/signals.h to common-defs.h
This commit moves the inclusion of gdb/signals.h to common-defs.h and
removes all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include gdb/signals.h.
* defs.h: Do not include gdb/signals.h.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include gdb/signals.h.
* win32-low.c: Likewise.
Gary Benson [Mon, 28 Jul 2014 13:04:00 +0000 (14:04 +0100)]
Move pathmax.h to common-defs.h
This commit moves the inclusion of pathmax.h to common-defs.h and
removes all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include pathmax.h.
* defs.h: Do not include pathmax.h.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include pathmax.h.
Gary Benson [Mon, 28 Jul 2014 12:52:38 +0000 (13:52 +0100)]
Move libiberty.h to common-defs.h
This commit moves the inclusion of libiberty.h to common-defs.h and
removes all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include libiberty.h.
* defs.h: Do not include libiberty.h.
* common/queue.h: Likewise.
* cp-name-parser.y: Likewise.
* mi/mi-cmd-catch.c: Likewise.
* python/python.c: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include libiberty.h.
* linux-bfin-low.c: Likewise.
Gary Benson [Mon, 28 Jul 2014 11:03:31 +0000 (12:03 +0100)]
Move ansidecl.h to common-defs.h
This commit moves the inclusion of ansidecl.h to common-defs.h and
removes all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include ansidecl.h.
* defs.h: Do not include ansidecl.h.
* common/buffer.h: Likewise.
* common/common-utils.h: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include ansidecl.h.
Gary Benson [Mon, 28 Jul 2014 12:15:41 +0000 (13:15 +0100)]
Move stddef.h to common-defs.h
This commit moves the inclusion of stddef.h to common-defs.h and
removes all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include stddef.h.
* defs.h: Do not include stddef.h.
* common/common-utils.h: Likewise.
* amd64fbsd-nat.c: Likewise.
* bcache.c: Likewise.
* charset.c: Likewise.
* common/buffer.h: Likewise.
* common/vec.h: Likewise.
* i386bsd-nat.c: Likewise.
* nat/linux-btrace.h: Likewise.
* ppcfbsd-nat.c: Likewise.
* ppcnbsd-tdep.h: Likewise.
* ppcobsd-nat.c: Likewise.
* ppcobsd-tdep.h: Likewise.
* python/py-gdb-readline.c: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* linux-x86-low.c: Do not include stddef.h.
* lynx-ppc-low.c: Likewise.
* tracepoint.c: Likewise.
Gary Benson [Mon, 28 Jul 2014 10:32:37 +0000 (11:32 +0100)]
Move stdarg.h to common-defs.h
This commit moves the inclusion of stdarg.h to common-defs.h and
removes all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include stdarg.h.
* defs.h: Do not include stdarg.h.
* ada-lang.c: Likewise.
* common/common-utils.h: Likewise.
* guile/scm-string.c: Likewise.
* guile/scm-utils.c: Likewise.
* m32c-tdep.c: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include stdarg.h.
* nto-low.c: Likewise.
Gary Benson [Fri, 25 Jul 2014 16:35:30 +0000 (17:35 +0100)]
Move stdlib.h to common-defs.h
This commit moves the inclusion of stdlib.h to common-defs.h and
removes all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include stdlib.h.
* defs.h: Do not include stdlib.h.
* addrmap.c: Likewise.
* bcache.c: Likewise.
* common/buffer.c: Likewise.
* common/common-utils.c: Likewise.
* cp-name-parser.y: Likewise.
* go32-nat.c: Likewise.
* mn10300-linux-tdep.c: Likewise.
* nat/linux-osdata.c: Likewise.
* tui/tui.c: Likewise.
* windows-nat.c: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include stdlib.h.
* inferiors.c: Likewise.
* linux-low.c: Likewise.
* regcache.c: Likewise.
* spu-low.c: Likewise.
* tracepoint.c: Likewise.
* utils.c: Likewise.
Gary Benson [Fri, 25 Jul 2014 15:29:40 +0000 (16:29 +0100)]
Move stdio.h to common-defs.h
This commit moves the inclusion of stdio.h to common-defs.h and
removes all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include stdio.h.
* defs.h: Do not include stdio.h.
* ada-lang.c: Likewise.
* common/buffer.c: Likewise.
* common/common-utils.c: Likewise.
* cp-name-parser.y: Likewise.
* gnu-nat.c: Likewise.
* go32-nat.c: Likewise.
* i386gnu-nat.c: Likewise.
* proc-api.c: Likewise.
* proc-events.c: Likewise.
* proc-flags.c: Likewise.
* proc-why.c: Likewise.
* python/python-internal.h: Likewise.
* target-memory.c: Likewise.
* tui/tui-io.c: Likewise.
* tui/tui.c: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include stdio.h.
* linux-low.c: Likewise.
* remote-utils.c: Likewise.
* spu-low.c: Likewise.
* utils.c: Likewise.
* wincecompat.c: Likewise.
Chen Gang [Thu, 7 Aug 2014 06:06:36 +0000 (15:36 +0930)]
Ensure coff-ppc local symbols are zero terminated
* coff-ppc.c (coff_ppc_relocate_section): Ensure local symbols are
zero terminated.
H.J. Lu [Thu, 7 Aug 2014 00:23:46 +0000 (09:53 +0930)]
Don't issue a warning for references in LTO IR to warning symbols
bfd/
PR ld/16746
* linker.c (_bfd_generic_link_add_one_symbol): Don't issue a
warning for references in LTO IR to warning symbols.
ld/testsuite/
PR ld/16746
* ld-plugin/lto.exp: Add 4 tests for PR ld/16746.
* ld-plugin/pr16746a.c: New file.
* ld-plugin/pr16746b.c: Likewise.
* ld-plugin/pr16746c.c: Likewise.
* ld-plugin/pr16746d.c: Likewise.
Alan Modra [Thu, 7 Aug 2014 00:44:13 +0000 (10:14 +0930)]
missing changelog for last commit
Alan Modra [Thu, 7 Aug 2014 00:19:32 +0000 (09:49 +0930)]
Merge WARN and CWARN cases in _bfd_generic_link_add_one_symbol
WARN has always been able to be handled by the CWARN case (WARN was
used when the previous symbols was undef, undefweak or common and thus
must be on the undefs list, so the CWARN test passes). So let's merge
those two cases.
* linker.c (WARN, CWARN): Collapse these states to WARN.
(_bfd_generic_link_add_one_symbol): Use old CWARN case for
new WARN.
Alan Modra [Thu, 7 Aug 2014 00:00:51 +0000 (09:30 +0930)]
daily update
Simon Marchi [Fri, 1 Aug 2014 22:09:06 +0000 (18:09 -0400)]
Rename variable with confusing name
I saw this gem of not so legible code in solib-svr4.c (scan_dyntag):
if (dyn_tag == dyntag)
and thought it deserved a small rename.
This just renames variables to be a bit more clear for those who read the
code. I also constified the parameter because, why not. The same was
done in scan_dyntag_auxv as well.
Tested only by rebuilding, since the change was done mechanically.
gdb/Changelog:
2014-08-01 Simon Marchi <simon.marchi@ericsson.com>
* solib-svr4.c (scan_dyntag): Rename dyntag and dyn_tag variables.
(scan_dyntag_auxv): Same.
Ilya Tocar [Fri, 1 Aug 2014 13:58:32 +0000 (17:58 +0400)]
Add -momit_lock_prefix=[no|yes] option
This option serves as a workaround for processors, which fail on lock
prefix.
gas/
* config/tc-i386.c (omit_lock_prefix): New.
(output_insn): Omit lock prefix if omit_lock_prefix is true.
(OPTION_omit_lock_prefix): New.
(md_longopts): Add momit-lock-prefix.
(md_parse_option): Handle momit-lock-prefix.
(md_show_usage): Add momit-lock-prefix=[no|yes].
* doc/c-i386.texi (momit-lock-prefix): Document.
gas/testsuite/
* gas/i386/i386.exp: Run new tests.
* gas/i386/omit-lock-no.d: New.
* gas/i386/omit-lock-yes.d: Ditto.
* gas/i386/omit-lock.s: Ditto.
Alan Modra [Wed, 6 Aug 2014 12:37:04 +0000 (22:07 +0930)]
Modify new gold test to pass on powerpc64le
* testsuite/defsym_test.sh: Allow ppc64le localentry annotation.
Gary Benson [Wed, 6 Aug 2014 12:39:39 +0000 (13:39 +0100)]
Rearrange awkwardly-nested conditionals
gdbserver's init_register_cache has some preprocessor conditionals
awkwardly nested around an if..else block. This commit moves the
conditionals inside the braces to make the code more readable.
gdb/gdbserver/
2014-08-06 Gary Benson <gbenson@redhat.com>
* regcache.c (init_register_cache): Move conditionals inside if.
Yao Qi [Wed, 6 Aug 2014 09:26:27 +0000 (17:26 +0800)]
Remove duplicated include file
File x86-linux-nat.h is included twice in amd64-linux-nat.c and
i386-linux-nat.c. This patch is to remove one.
gdb:
2014-08-06 Yao Qi <yao@codesourcery.com>
* amd64-linux-nat.c: Remove duplicated include
"x86-linux-nat.h".
* i386-linux-nat.c: Likewise.
Gary Benson [Wed, 6 Aug 2014 10:50:24 +0000 (11:50 +0100)]
Replace hardwired target-is-async check
This commit replaces a hardwired target-is-async check.
gdb/gdbserver/
2014-08-06 Gary Benson <gbenson@redhat.com>
* linux-low.c (linux_supports_non_stop): Use target_is_async_p.
Alan Modra [Wed, 6 Aug 2014 03:59:38 +0000 (13:29 +0930)]
PR14918, lto always links in libgcc_s.so
PR14918
* plugin.c (plugin_opt_plugin_arg): Drop --pass-through.
Alan Modra [Wed, 6 Aug 2014 03:56:18 +0000 (13:26 +0930)]
Allow lto tests to run with older compilers
* lib/ld-lib.exp (check_lto_fat_available): New.
(check_lto_available): Remove -ffat-lto-objects test.
* ld-plugin/lto.exp: Use [list ] rather than { } to set up list
variables, allowing substition of vars. Set lto_fat and plug_opt
and add to various tests.
Alan Modra [Wed, 6 Aug 2014 03:10:00 +0000 (12:40 +0930)]
Warn for gold on lto objects without plugin
PR 13227
* symtab.cc (Symbol_table::add_from_relobj): Warn on __gnu_lto_slim.
Yao Qi [Wed, 30 Jul 2014 08:50:49 +0000 (16:50 +0800)]
Fix comment in dwarf_decode_lines_1
When I read dwarf_decode_lines_1 comments today, it should be called
"special opcode" rather than "special operand", as said in DWARF spec.
It is obvious to me. I'll push it in if no comments in three days.
gdb:
2014-08-06 Yao Qi <yao@codesourcery.com>
* dwarf2read.c (dwarf_decode_lines_1): Replace "Special
operand" with "Special opcode" in comments.
Alan Modra [Wed, 6 Aug 2014 00:01:04 +0000 (09:31 +0930)]
daily update
Doug Evans [Tue, 5 Aug 2014 16:00:40 +0000 (09:00 -0700)]
Fix outputdots so that it doesn't errantly discard the first line of, e.g.,
CODE_FRAGMENT. Also fix skip_past_newline to not skip past NUL.
* bfd-in2.h: Regenerate.
* libcoff.h: Regenerate.
doc/
* chew.c (skip_past_newline_1): New function.
(outputdots): Call it.
(skip_past_newline): Ditto.
Maciej W. Rozycki [Tue, 5 Aug 2014 15:17:15 +0000 (16:17 +0100)]
MIPS: Fix a .pdr section linker buffer overrun
* elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's
rawsize if changing size.
Gary Benson [Tue, 5 Aug 2014 14:03:36 +0000 (15:03 +0100)]
Remove pointless function initialize_interps
This commit removes the pointless function initialize_interps.
gdb/
2014-08-05 Gary Benson <gbenson@redhat.com>
* interps.c (initialize_interps): Remove prototype.
(interpreter_initialized): Remove static global.
(interp_add): Do not call initialize_interps.
(initialize_interps): Remove function.
Gary Benson [Tue, 5 Aug 2014 12:06:19 +0000 (13:06 +0100)]
Remove spurious va_end in vwarning
This commit removes a spurious va_end in vwarning.
gdb/
2014-08-05 Gary Benson <gbenson@redhat.com>
* utils.c (vwarning): Remove spurious va_end.
Alan Modra [Tue, 5 Aug 2014 01:54:42 +0000 (11:24 +0930)]
Regen ld/Makefile.in
* Makefile.in: Regenerate.
Alan Modra [Tue, 5 Aug 2014 01:54:23 +0000 (11:24 +0930)]
gas/testuite ChangeLog typo
Alan Modra [Tue, 5 Aug 2014 01:53:58 +0000 (11:23 +0930)]
chew.c warning fix
* chew.c (print_stack_level, main): Cast result of pointer
difference to match format string.
Alan Modra [Tue, 5 Aug 2014 01:19:54 +0000 (10:49 +0930)]
Fix PR17226, ld --gc-sections segfaults on sparc-linux
PR ld/17226
* elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Typo fix.
Alan Modra [Tue, 5 Aug 2014 01:18:47 +0000 (10:48 +0930)]
Fix load of archive element with common def for -u sym
* linker.c (generic_link_check_archive_element): Move handling
of command link -u symbols with a common symbol def to the
code handling non-common symbols so that archive element symbols
are loaded. Use generic_link_add_object_symbols.
Alan Modra [Tue, 5 Aug 2014 01:16:57 +0000 (10:46 +0930)]
Fix LTO vs. COFF archives
Avoid scan of symbols on objects in coff archives since we don't need
to do anything special with common symbols. The scan is quite useless,
and breaks LTO due to slim LTO objects not having symbols available
until after the plugin has claimed them. Instead we can add objects
based on their archive symbol map.
Also, rip out the archive symbol hash table used by the generic
linker. Using a hash breaks one feature of unix archive linking;
The first object file in an archive defining any given symbol should
be the object extracted to satisfy that symbol. What's more a hash
isn't much faster except in pathological cases where object file
ordering causes many scans of the archive. See the comment which I'm
removing from elf_link_add_archive_symbols.
Finally, tidy elflink.c archive handling a little.
PR 13557
* linker.c (struct archive_list, struct archive_hash_entry,
struct archive_hash_table, archive_hash_newfunc,
archive_hash_table_init, archive_hash_lookup, archive_hash_allocate,
archive_hash_table_free): Delete.
(_bfd_generic_link_add_archive_symbols): Add h and name params to
checkfn. Rewrite using a straight-forward scan over archive map.
(generic_link_check_archive_element_no_collect,
generic_link_check_archive_element_collect,
generic_link_check_archive_element): Add h and name params.
* aoutx.h (aout_link_check_archive_element): Likewise.
* pdp11.c (aout_link_check_archive_element): Likewise.
* xcofflink.c (xcoff_link_check_archive_element): Likewise.
* cofflink.c (coff_link_check_archive_element): Likewise. Don't
scan symbols, simply add archive element whenever h is undefined.
(coff_link_check_ar_symbols): Delete.
* ecoff.c (read_ext_syms_and_strs): Delete.
(reread_ext_syms_and_strs): Delete.
(ecoff_link_check_archive_element): Add h and name param. Don't
scan symbols, simply add based on h. Use ecoff_link_add_object_symbols.
* elflink.c (elf_link_is_defined_archive_symbol): Don't test
archive_pass.
(elf_link_add_archive_symbols): Delete "defined" array, merge
functionality into "included". Make "included" a char array. Don't
set or test archive_pass.
* libbfd-in.h (_bfd_generic_link_add_archive_symbols): Update.
* libbfd.h: Regenerate.
Alan Modra [Tue, 5 Aug 2014 01:07:38 +0000 (10:37 +0930)]
Prepare gdb for 64-bit obstacks
* charset.c (convert_between_encodings): Cast result of obstack_base.
* cp-valprint.c (cp_print_value_fields): Use size_t locals.
* hppa-tdep.c (internalize_unwinds): Change "size" parm to size_t.
(read_unwind_info): Use size_t for some locals.
* jit.c (finalize_symtab): Likewise.
* utils.c (hashtab_obstack_allocate): Likewise.
* symmisc.c (print_objfile_statistics): Update format strings.
Alan Modra [Tue, 5 Aug 2014 00:01:09 +0000 (09:31 +0930)]
daily update
Jan Kratochvil [Mon, 4 Aug 2014 19:32:06 +0000 (21:32 +0200)]
Fix incorrect placement of two Intel gdb/NEWS items
there were two commits which placed new gdb/NEWS items to the bottom of the
NEWS file (such as for gdb-4.0) instead at their right place under:
*** Changes in GDB 7.8
https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=gdb/NEWS;h=
ae84e009b8008f9da2707829c0cbab358abc17fb;hp=
a8ae8c7b7a5ddce9b5779914dd1e6a87463d7d60;hb=
ca8941bbd088002cb8ff87abe16d02ecc8d58d1e;hpb=
489e41ddf4bb5616a7471fb4072df5efbb9a706e
commit
ca8941bbd088002cb8ff87abe16d02ecc8d58d1e
Author: Walfred Tedeschi <walfred.tedeschi@intel.com>
Date: Tue Dec 3 13:31:03 2013 +0000
Documentation for MPX.
Message-Id: <
1386074172-14177-1-git-send-email-walfred.tedeschi@intel.com>
https://sourceware.org/ml/gdb-patches/2013-12/msg00082.html
and
https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=gdb/NEWS;h=
a7067fdf9a7af422572a29d1fdd6ef011c87cd9f;hp=
b72d64db313d0785edec19a9c4b441b854698e6a;hb=
01f9f808e2e86187c95e7cff4aeb014a421a53ce;hpb=
93ee1e3683a12f4774b8beb4f821910982e21ce2
commit
01f9f808e2e86187c95e7cff4aeb014a421a53ce
Author: Michael Sturm <michael.sturm@intel.com>
Date: Mon Dec 16 16:43:05 2013 +0100
Add AVX512 registers support to GDB and GDBserver.
Message-Id: <
1398258160-9070-4-git-send-email-michael.sturm@intel.com>
https://sourceware.org/ml/gdb-patches/2013-12/msg00818.html
gdb/
2014-08-04 Jan Kratochvil <jan.kratochvil@redhat.com>
* NEWS (Changes in GDB-4.0): Move Intel MPX and Intel AVX-512 items ...
(Changes in GDB 7.8): ... here.
Message-ID: <
20140804165708.GA12824@host2.jankratochvil.net>
Tom Tromey [Mon, 28 Jul 2014 18:53:35 +0000 (12:53 -0600)]
make "set debug target" take effect immediately
Right now, "set debug target" acts a bit strangely.
Most target APIs only notice that it has changed when the target stack
is changed in some way. This is because many methods implement the
setting using the special debug target. However, a few spots do
change their behavior immediately -- any place explicitly checking
"targetdebug".
Some of this peculiar behavior is documented. However, I think that
it just isn't very useful for it to work this way. So, this patch
changes "set debug target" to take effect immediately in all cases.
This is done by simply calling update_current_target when the setting
is changed.
This required one small change in the test suite. Here a test was
expecting the current behavior.
Built and regtested on x86-64 Fedora 20.
2014-08-04 Tom Tromey <tromey@redhat.com>
* target.c (set_targetdebug): New function.
(initialize_targets): Pass set_targetdebug when creating "set
debug target".
2014-08-04 Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Debugging Output): Update for change to "set debug
target".
2014-08-04 Tom Tromey <tromey@redhat.com>
* gdb.base/sss-bp-on-user-bp-2.exp: Expect output from "set debug
target 0".
Tom Tromey [Tue, 29 Jul 2014 19:31:00 +0000 (13:31 -0600)]
fix test suite regression
This fixes a test suite regession that Yao noticed.
This test checks for some specific "target debug" output
that has changed since the test was written.
2014-08-04 Tom Tromey <tromey@redhat.com>
* gdb.base/sss-bp-on-user-bp-2.exp: Match "to_resume", not
"target_resume".
Alan Modra [Mon, 4 Aug 2014 00:01:06 +0000 (09:31 +0930)]
daily update
Alan Modra [Sun, 3 Aug 2014 00:01:03 +0000 (09:31 +0930)]
daily update
Alan Modra [Sat, 2 Aug 2014 00:01:10 +0000 (09:31 +0930)]
daily update
Masaki Muranaka [Fri, 1 Aug 2014 15:01:48 +0000 (08:01 -0700)]
[gdb/doc] Add target triplet to man files
After applying hash
43662968, gdb.1 and other man pages are not added
target triplet even if we configure with --target=.
It causes conflicts on some distributions.
And uninstall rules requires $(transform) variable.
gdb/doc/ChangeLog:
* Makefile.in (transform): New variable.
(install-man1, install-man5): Apply $(transform) to man file names.
Tested by installing both native and cross debugger.
Joel Brobecker [Tue, 8 Jul 2014 15:15:35 +0000 (08:15 -0700)]
Handle variable-sized fields in the interior of structure type
In Ada, variable-sized field can be located at any position of
a structure. Consider for instance the following declarations:
Dyn_Size : Integer := 1;
type Table is array (Positive range <>) of Integer;
type Inner is record
T1 : Table (1 .. Dyn_Size) := (others => 1);
T2 : Table (1 .. Dyn_Size) := (others => 2);
end record;
type Inner_Array is array (1 .. 2) of Inner;
type Outer is
record
I0 : Integer := 0;
A1 : Inner_Array;
Marker : Integer := 16#
01020304#;
end record;
Rt : Outer;
What this does is declare a variable "Rt" of type Outer, which
contains 3 fields where the second (A1) is of type Inner_Array.
type Inner_Array is an array with 2 elements of type Inner.
Because type Inner contains two arrays whose upper bound depend
on a variable, the size of the array, and therefore the size of
type Inner is dynamic, thus making field A1 a dynamically-size
field.
When trying to print the value of Rt, we hit the following limitation:
(gdb) print rt
Attempt to resolve a variably-sized type which appears in the interior of
a structure type
The limitation was somewhat making sense in C, but needs to be lifted
for Ada. This patch mostly lifts that limitation. As a result of this
patch, the type length computation had to be reworked a little bit.
gdb/ChangeLog:
* gdbtypes.c (resolve_dynamic_struct): Do not generate an error
if detecting a variable-sized field that is not the last field.
Fix struct type length computation.
gdb/testsuite/ChangeLog:
* gdb.base/vla-datatypes.c (vla_factory): Add new variable
inner_vla_struct_object_size.
* gdb.base/vla-datatypes.exp: Adjust last test, and mark it
as xfail.
Joel Brobecker [Wed, 11 Jun 2014 12:31:20 +0000 (14:31 +0200)]
Add debug trace in amd64-windows-tdep.c::amd64_windows_frame_decode_insns
This is a trace which would have been useful when trying to understand
why the debugger was not decoding the stream of unwind codes I was
expecting. This patch adds a trace first informing us that we are
following the unwind info to the next unwind record in that chain.
gdb/ChangeLog:
* amd64-windows-tdep.c (amd64_windows_frame_decode_insns):
Add debug trace.
Joel Brobecker [Wed, 11 Jun 2014 12:07:27 +0000 (14:07 +0200)]
x64-windows: Fix extraction of chained UNWIND_INFO
On x86_64-windows, GDB is unable to unwind past some code in
mswsock.dll. For instance:
(gdb) bt
#0 0x00000000778712fa in ntdll!ZwWaitForSingleObject ()
from C:\Windows\SYSTEM32\ntdll.dll
#1 0x000007fefcfb0f75 in WSPStartup ()
from C:\Windows\system32\mswsock.dll
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
The UNWIND_INFO record for frame #1's PC has a UNW_FLAG_CHAININFO
flag, and so after having decoded this unwind record, GDB's decoder
next tries to locate the next unwind record on the chain. Unfortunately,
the location of that unwind info appears to be miscomputed. This is
the expression used:
chain_vma = cache->image_base + unwind_info
+ sizeof (ex_ui) + ((codes_count + 1) & ~1) * 2 + 8;
The chain-info is expected to be right after the "Unwind codes
array" which is itself after all the fields of ex_ui's struct.
So the "+ 8" offset at the end should not be there.
Because of that extra offset, we were reading no longer processing
correct unwind info, leading the unwinder computing the wrong frame
size, computing the wrong return address, etc.
gdb/ChangeLog:
* amd64-windows-tdep.c (amd64_windows_frame_decode_insns):
Remove "+ 8" offset in computation of CHAIN_VMA.
Kaz Kojima [Fri, 1 Aug 2014 10:17:47 +0000 (19:17 +0900)]
Fix PR10373 which is SH relax bug.
Kaz Kojima [Fri, 1 Aug 2014 10:13:39 +0000 (19:13 +0900)]
Fix PR10378 which is SH relax bug.
Alan Modra [Fri, 1 Aug 2014 00:00:42 +0000 (09:30 +0930)]
daily update
Doug Evans [Thu, 31 Jul 2014 18:48:24 +0000 (11:48 -0700)]
* inflow.c (child_terminal_inferior): Add comment.
(child_terminal_ours_for_output): Add comment.
(child_terminal_ours): Add comment.
* linux-nat.c (linux_nat_terminal_inferior): Add comment.
(linux_nat_terminal_ours): Add comment.
Gary Benson [Thu, 31 Jul 2014 12:25:01 +0000 (13:25 +0100)]
Do not include defs.h or server.h in any header file
This commit removes all inclusions of defs.h and server.h from header
files.
gdb/
2014-07-31 Gary Benson <gbenson@redhat.com>
* common/btrace-common.h: Do not include defs.h or server.h.
* nat/mips-linux-watch.h: Likewise.
* gdb-dlfcn.h: Do not include defs.h.
* tracefile.h: Likewise.
gdb/gdbserver/
2014-07-31 Gary Benson <gbenson@redhat.com>
* ax.h: Do not include server.h.
* gdbthread.h: Likewise.
* lynx-low.h: Likewise.
* notif.h: Likewise.
Alan Modra [Thu, 31 Jul 2014 00:00:44 +0000 (09:30 +0930)]
daily update
Roland McGrath [Wed, 30 Jul 2014 20:06:52 +0000 (13:06 -0700)]
Fix incomplete constification in remote-sim.c
2014-07-30 Roland McGrath <mcgrathr@google.com>
* remote-sim.c (gdbsim_open): Apply constification to forward decl.
Tom Tromey [Tue, 22 Jul 2014 16:56:01 +0000 (10:56 -0600)]
constify to_open
This makes target_ops::to_open take a const string and then fixes the
fallout.
There were a few of these I could not build. However I eyeballed it
and in any case the fixes should generally be trivial.
This is based on the patch to fix up the target debugging for to_open,
because that changes gdb to not directly install to_open as the target
command
2014-07-30 Tom Tromey <tromey@redhat.com>
* bsd-kvm.c (bsd_kvm_open): Constify.
* corelow.c (core_open): Constify.
* ctf.c (ctf_open): Constify.
* dbug-rom.c (dbug_open): Constify.
* exec.c (exec_open): Constify.
* m32r-rom.c (m32r_open, mon2000_open): Constify.
* microblaze-rom.c (picobug_open): Constify.
* nto-procfs.c (procfs_open_1, procfs_open, procfs_native_open):
Constify.
* ppcbug-rom.c (ppcbug_open0, ppcbug_open1): Constify.
* record-btrace.c (record_btrace_open): Constify.
* record-full.c (record_full_core_open_1, record_full_open_1)
(record_full_open): Constify.
* remote-m32r-sdi.c (m32r_open): Constify.
* remote-mips.c (common_open, mips_open, pmon_open, ddb_open)
(rockhopper_open, lsi_open): Constify.
* remote-sim.c (gdbsim_open): Constify.
* remote.c (remote_open, extended_remote_open, remote_open_1):
Constify.
* target.h (struct target_ops) <to_open>: Make "arg" const.
* tracefile-tfile.c (tfile_open): Constify.
Tom Tromey [Tue, 22 Jul 2014 16:47:53 +0000 (10:47 -0600)]
constify some cli-utils stuff
This constifies a few functions in cli-utils -- get_number_trailer and
friends -- and then fixes the fallout.
2014-07-30 Tom Tromey <tromey@redhat.com>
* breakpoint.c (map_breakpoint_numbers): Update.
* cli/cli-utils.c (get_number_trailer): Make "pp" const. Update.
(get_number_const): New function.
(get_number): Rewrite using get_number_const.
(init_number_or_range): Make "string" const.
(number_is_in_list): Make "list" const.
* cli/cli-utils.h (get_number_const): Declare.
(struct get_number_or_range_state) <string, end_ptr>: Now const.
(init_number_or_range, number_is_in_list): Update.
* printcmd.c (map_display_numbers): Update.
* value.c (value_from_history_ref): Constify.
* value.h (value_from_history_ref): Update.
Tom Tromey [Tue, 22 Jul 2014 16:09:27 +0000 (10:09 -0600)]
constify exec_file_attach
This constifies exec_file_attach and updates the rest of gdb.
Insight will need some minor tweaks after this, though it's worth
noting that I think all that hook stuff can actually just go away. I
sent a patch to this effect once, but since the Insight source
repository situation isn't currently resolved there wasn't a
convenient way to test it.
2014-07-30 Tom Tromey <tromey@redhat.com>
* corefile.c (hook_type, call_extra_exec_file_hooks)
(specify_exec_file_hook): Constify.
* exec.c (exec_file_attach): Make "filename" const.
* gdbcore.h (deprecated_exec_file_display_hook)
(specify_exec_file_hook, exec_file_attach): Constify.
* main.c (captured_main): Use catch_command_errors_const.
Tom Tromey [Mon, 21 Jul 2014 20:32:43 +0000 (14:32 -0600)]
fix to_open debug setting
This is a follow-on to the patch to auto-generate target debug methods.
While working on that patch I noticed that the to_open debug setting
will never work. There is no path by which debug_to_open can be
called.
This patch fixes the problem by using a generic function as the
implementation of the various "target" subcommands, and then putting
the debug printing there.
This is also a tiny step toward fixing PR 7250 (and apparently why
command contexts were introduced).
Built and regtested on x86-64 Fedora 20.
2014-07-30 Tom Tromey <tromey@redhat.com>
* target.c (open_target): New function.
(add_target_with_completer, add_deprecated_target_alias): Use
set_cmd_sfunc, set_cmd_context.
(debug_to_open): Remove.
(setup_target_debug): Update.
Pedro Alves [Wed, 30 Jul 2014 11:19:30 +0000 (12:19 +0100)]
gdb.threads/signal-command-handle-nopass.exp: Add comment
Explain why we do "info threads".
gdb/testsuite/
2014-07-30 Pedro Alves <palves@redhat.com>
* gdb.threads/signal-command-handle-nopass.exp (test): Add
comment.
Yao Qi [Fri, 25 Jul 2014 11:35:23 +0000 (19:35 +0800)]
Update comments to operator_check
Hello,
I happen to read the code and find the comments to operator_check are
incorrect. This patch is to fix the comments per my understanding.
The comments and field operator_check was added by this patch
https://sourceware.org/ml/gdb-patches/2010-04/msg00556.html
but the inconsistency between code and comments wasn't pointed out during
the review.
gdb:
2014-07-30 Yao Qi <yao@codesourcery.com>
* parser-defs.h (struct exp_descriptor) <operator_check>: Update
comments.
* parse.c (exp_iterate): Update comments.
Gary Benson [Thu, 24 Jul 2014 14:35:45 +0000 (15:35 +0100)]
Introduce common/common-defs.h
This commit creates a new header, common/common-defs.h, to hold
definitions common to all code under gdb/. Both gdb/defs.h and
gdb/gdbserver/server.h are modified to include common-defs.h as
their first non-comment line; all code under gdb/ includes either
defs.h or server.h as appropriate, so common-defs.h will be the
first actual code the compiler sees.
For this initial commit common-defs.h includes only the two
config.h files. Future commits will move more code currently
duplicated across defs.h and server.h such that shared code in
gdb/{common,target,nat} can be modified to include common-defs.h
rather than defs.h or server.h.
gdb/
2014-07-30 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: New file.
* Makefile.in (HFILES_NO_SRCDIR): Add common/common-defs.h.
* defs.h: Include common-defs.h.
Do not include config.h or build-gnulib/config.h.
gdb/gdbserver/
2014-07-30 Gary Benson <gbenson@redhat.com>
* server.h: Include common-defs.h.
Do not include config.h or build-gnulib-gdbserver/config.h.
Gary Benson [Thu, 24 Jul 2014 15:20:50 +0000 (16:20 +0100)]
Do not include config.h directly
All source files under gdb/ that include headers from gdb/ include
either defs.h or server.h before any other code with the exception
of gdb/gdbserver/gdbreplay.c which seems to be a special case. Both
defs.h and server.h include both our and gnulib's config.h files as
their first non-comment line, so no other file ever needs to directly
include any config.h. This commit removes two such direct config.h
includes.
gdb/
2014-07-30 Gary Benson <gbenson@redhat.com>
* common/common-utils.h: Do not include config.h.
* nat/linux-btrace.h: Likewise.
Gary Benson [Fri, 25 Jul 2014 11:18:00 +0000 (12:18 +0100)]
Make all source files include defs.h or server.h first
This commit makes all source files under gdb/ that include headers
from gdb/ include either defs.h or server.h before any other code.
This ensures that definitions and macros from the two config.h files
are always in place for our code. An exception has been made for
gdb/gdbserver/gdbreplay.c which seems to be a special case.
gdb/
2014-07-30 Gary Benson <gbenson@redhat.com>
* btrace.c: Include defs.h.
* common/ptid.c: Include defs.h or server.h as appropriate.
* nat/mips-linux-watch.c: Likewise.
gdb/gdbserver/
2014-07-30 Gary Benson <gbenson@redhat.com>
* hostio-errno.c: Move server.h to top of includes list.
* inferiors.c: Likewise.
* linux-x86-low.c: Likewise.
* notif.c: Include server.h.
Alan Modra [Wed, 30 Jul 2014 00:00:59 +0000 (09:30 +0930)]
daily update
Tom Tromey [Fri, 18 Jul 2014 14:48:43 +0000 (08:48 -0600)]
simplify target_is_pushed
While working on target_is_pushed, I noticed that it is written in a
strange way. The code currently keeps an extra indirection, where a
simple linked list traversal is all that is needed. It seems likely
this was done by copying and pasting other code. However, there is no
reason to do this and the more obvious code is simpler to reason
about. So, this patch change the implementation.
2014-07-29 Tom Tromey <tromey@redhat.com>
* target.c (target_is_pushed): Simplify.
Joel Brobecker [Tue, 29 Jul 2014 13:13:57 +0000 (06:13 -0700)]
Document the gdb-7.8 release in GDB's ChangeLog.
Matthew Fortune [Tue, 29 Jul 2014 12:18:07 +0000 (13:18 +0100)]
[MIPS] Rename COPROC related macros
gas/
* config/tc-mips.c: Rename INSN_LOAD_COPROC_DELAY to INSN_LOAD_COPROC
and INSN_COPROC_MOVE_DELAY to INSN_COPROC_MOVE throughout.
include/opcode/
* mips.h (INSN_LOAD_COPROC_DELAY): Rename to...
(INSN_LOAD_COPROC): New define.
(INSN_COPROC_MOVE_DELAY): Rename to...
(INSN_COPROC_MOVE): New define.
opcodes/
* micromips-opc.c (COD): Rename throughout to...
(CM): New define, update to use INSN_COPROC_MOVE.
(LCD): Rename throughout to...
(LC): New define, update to use INSN_LOAD_COPROC.
* mips-opc.c: Likewise.
Anthony Green [Tue, 29 Jul 2014 11:04:52 +0000 (07:04 -0400)]
Import config.sub from upstream config repo
Matthew Fortune [Tue, 29 Jul 2014 10:27:59 +0000 (11:27 +0100)]
[MIPS] Implement O32 FPXX, FP64 and FP64A ABI extensions
Specification:
https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
include/
* elf/mips.h (PT_MIPS_ABIFLAGS, SHT_MIPS_ABIFLAGS): Define.
(Val_GNU_MIPS_ABI_FP_OLD_64): Rename from Val_GNU_MIPS_ABI_FP_64.
(Val_GNU_MIPS_ABI_FP_64): Redefine.
(Val_GNU_MIPS_ABI_FP_XX): Define.
(Elf_External_ABIFlags_v0, Elf_Internal_ABIFlags_v0): New structures.
(AFL_REG_NONE, AFL_REG_32, AFL_REG_64, AFL_REG_128): Define.
(AFL_ASE_DSP, AFL_ASE_DSPR2, AFL_ASE_EVA, AFL_ASE_MCU): Likewise.
(AFL_ASE_MDMX, AFL_ASE_MIPS3D, AFL_ASE_MT, AFL_ASE_SMARTMIPS): Likewise.
(AFL_ASE_VIRT, AFL_ASE_MSA, AFL_ASE_MIPS16): Likewise.
(AFL_ASE_MICROMIPS, AFL_ASE_XPA): Likewise.
(AFL_EXT_XLR, AFL_EXT_OCTEON2, AFL_EXT_OCTEONP): Likewise.
(AFL_EXT_LOONGSON_3A, AFL_EXT_OCTEON, AFL_EXT_5900): Likewise.
(AFL_EXT_4650, AFL_EXT_4010, AFL_EXT_4100, AFL_EXT_3900): Likewise.
(AFL_EXT_10000, AFL_EXT_SB1, AFL_EXT_4111, AFL_EXT_4120): Likewise.
(AFL_EXT_5400, AFL_EXT_5500, AFL_EXT_LOONGSON_2E): Likewise.
(AFL_EXT_LOONGSON_2F): Likewise.
(bfd_mips_elf_swap_abiflags_v0_in): Prototype.
(bfd_mips_elf_swap_abiflags_v0_out): Likewise.
(bfd_mips_isa_ext): Likewise.
bfd/
* elfxx-mips.c (ABI_O32_P, MIPS_ELF_ABIFLAGS_SECTION_NAME_P): New macro.
(mips_elf_obj_tdata): Add abiflags and abiflags_valid fields.
(bfd_mips_elf_swap_abiflags_v0_in): New function.
(bfd_mips_elf_swap_abiflags_v0_out): Likewise.
(_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_ABIFLAGS.
(_bfd_mips_elf_fake_sections): Likewise.
(_bfd_mips_elf_always_size_sections): Handle .MIPS.abiflags.
(_bfd_mips_elf_additional_program_headers): Account for new
PT_MIPS_ABIFLAGS program header.
(_bfd_mips_elf_modify_segment_map): Create PT_MIPS_ABIFLAGS segment and
associate with .MIPS.abiflags.
(_bfd_mips_elf_gc_mark_extra_sections): New function.
(bfd_mips_isa_ext, update_mips_abiflags_isa): New static function.
(infer_mips_abiflags): Likewise.
(_bfd_mips_elf_final_link): Handle .MIPS.abiflags.
(mips_32bit_flags_p): Moved higher.
(mips_elf_merge_obj_attributes, _bfd_mips_fp_abi_string): Error
checking for FP ABIs.
(_bfd_mips_elf_merge_private_bfd_data): Restructure and add abiflags
checks. Check EF_MIPS_FP64 flag consistency.
(print_mips_ases, print_mips_isa_ext): New static function.
(print_mips_fp_abi_value, get_mips_reg_size): Likewise.
(_bfd_mips_elf_print_private_bfd_data): Display abiflags data.
(_bfd_mips_post_process_headers): Set EI_ABIVERSION = 3 for
Val_GNU_MIPS_ABI_FP_64 or Val_GNU_MIPS_ABI_FP_64A.
* elfxx-mips.h (_bfd_mips_elf_gc_mark_extra_sections): New prototype.
* elf32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
* elfn32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
* elf64-mips.c (elf_backend_gc_mark_extra_sections): Implement.
binutils/
* readelf.c (get_mips_segment_type): Display name for PT_MIPS_ABIFLAGS.
(get_mips_section_type_name): Display name for SHT_MIPS_ABIFLAGS.
(display_mips_gnu_attribute): Abstracted fp abi printing to...
(print_mips_fp_abi_value): New static function. Handle new FP ABIs.
(print_mips_ases, print_mips_isa_ext): New static functions.
(get_mips_reg_size): Likewise.
(process_mips_specific): Display abiflags data.
elfcpp/
* elfcpp.h (PT_MIPS_ABIFLAGS): New program header type.
gas/
* config/tc-mips.c (mips_flags_frag): New static global.
(struct mips_set_options): Add oddspreg field.
(file_mips_opts, mips_opts): Initialize oddspreg.
(ISA_HAS_ODD_SINGLE_FPR): Add CPU argument and update for R5900 and
Loongson-3a.
(enum options, md_longopts, md_parse_option): Add -mfpxx, -modd-spreg
and -mno-odd-spreg options.
(md_begin): Create .MIPS.abiflags section.
(fpabi_incompatible_with, fpabi_requires): New static function.
(check_fpabi): Likewise.
(mips_check_options): Handle fp=xx and oddspreg restrictions.
(file_mips_check_options): Set oddspreg by default for fp=xx.
(mips_oddfpreg_ok): Re-write function.
(check_regno): Check odd numbered registers regardless of FPR size.
For fp != 32 use as_bad instead of as_warn.
(match_float_constant): Rewrite check regarding FP register width. Add
support for generating constants when MXHC1 is present. Handle fp=xx
to comply with the ABI.
(macro): Update M_LI_DD similarly to match_float_constant. Generate
MTHC1 when available. Check that correct code can be generated for
fp=xx and fp=64 ABIs.
(parse_code_option, s_mipsset): Add fp=xx, oddspreg and nooddspreg
options.
(mips_convert_ase_flags): New static function.
(mips_elf_final_processing): Use fpabi == Val_GNU_MIPS_ABI_FP_OLD_64
to determine when to add the EF_MIPS_FP64 flag. Populate the
.MIPS.abiflags section.
(md_mips_end): Update .gnu_attribute based on command line and .module
as applicable. Use check_fpabi to ensure .gnu.attribute and command
line/.module options are consistent.
* doc/as.texinfo: Add missing -mgp64/-mfp64 options and document new
-mfpxx, -modd-spreg and -mno-odd-spreg options.
* doc/c-mips.texi: Document -mfpxx, -modd-spreg, -mno-odd-spreg,
gnu_attribute values and FP ABIs.
ld/
* emulparams/elf32bmip.sh: Add .MIPS.abiflags.
* emulparams/elf32bmipn32-defs.sh: Likewise.
* emulparams/elf64bmip-defs.sh: Likewise.
opcodes/
* micromips-opc.c (COD, LCD) New macros.
(cfc1, ctc1): Remove FP_S attribute.
(dmfc1, mfc1, mfhc1): Add LCD attribute.
(dmtc1, mtc1, mthc1): Add COD attribute.
* mips-opc.c (cfc1, cftc1, ctc, cttc1): Remove FP_S attribute.
binutils/testsuite/
* binutils-all/readelf.s: Account for .MIPS.abiflags and
.gnu.attributes.
* binutils-all/readelf.ss-tmips: Likewise.
* binutils-all/strip-3.d: Likewise.
gas/testsuite/
* gas/mips/attr-gnu-4-0.d: New.
* gas/mips/attr-gnu-4-0.s: Likewise.
* gas/mips/attr-gnu-4-1-mfp32.l: Likewise.
* gas/mips/attr-gnu-4-1-mfp32.s: Likewise.
* gas/mips/attr-gnu-4-1-mfp64.l: Likewise.
* gas/mips/attr-gnu-4-1-mfp64.s: Likewise.
* gas/mips/attr-gnu-4-1-mfpxx.s: Likewise.
* gas/mips/attr-gnu-4-1-msingle-float.l: Likewise.
* gas/mips/attr-gnu-4-1-msingle-float.s: Likewise.
* gas/mips/attr-gnu-4-1-msoft-float.l: Likewise.
* gas/mips/attr-gnu-4-1-msoft-float.s: Likewise.
* gas/mips/attr-gnu-4-1.d: Likewise.
* gas/mips/attr-gnu-4-1.s: Likewise.
* gas/mips/attr-gnu-4-2-mdouble-float.l: Likewise.
* gas/mips/attr-gnu-4-2-mdouble-float.s: Likewise.
* gas/mips/attr-gnu-4-2-msoft-float.l: Likewise.
* gas/mips/attr-gnu-4-2-msoft-float.s: Likewise.
* gas/mips/attr-gnu-4-2.d: Likewise.
* gas/mips/attr-gnu-4-2.s: Likewise.
* gas/mips/attr-gnu-4-3-mhard-float.l: Likewise.
* gas/mips/attr-gnu-4-3-mhard-float.s: Likewise.
* gas/mips/attr-gnu-4-3.d: Likewise.
* gas/mips/attr-gnu-4-3.s: Likewise.
* gas/mips/attr-gnu-4-4.l: Likewise.
* gas/mips/attr-gnu-4-4.s: Likewise.
* gas/mips/attr-gnu-4-5-64.l: Likewise.
* gas/mips/attr-gnu-4-5-64.s: Likewise.
* gas/mips/attr-gnu-4-5.d: Likewise.
* gas/mips/attr-gnu-4-5.l: Likewise.
* gas/mips/attr-gnu-4-5.s: Likewise.
* gas/mips/attr-gnu-4-6-64.l: Likewise.
* gas/mips/attr-gnu-4-6-64.s: Likewise.
* gas/mips/attr-gnu-4-6.d: Likewise.
* gas/mips/attr-gnu-4-6.l: Likewise.
* gas/mips/attr-gnu-4-6.s: Likewise.
* gas/mips/attr-gnu-4-6-msingle-float.l: Likewise.
* gas/mips/attr-gnu-4-6-msingle-float.s: Likewise.
* gas/mips/attr-gnu-4-6-msoft-float.l: Likewise.
* gas/mips/attr-gnu-4-6-msoft-float.s: Likewise.
* gas/mips/attr-gnu-4-6-noodd.l: Likewise.
* gas/mips/attr-gnu-4-6-noodd.s: Likewise.
* gas/mips/attr-gnu-4-7-64.l: Likewise.
* gas/mips/attr-gnu-4-7-64.s: Likewise.
* gas/mips/attr-gnu-4-7-msingle-float.l: Likewise.
* gas/mips/attr-gnu-4-7-msingle-float.s: Likewise.
* gas/mips/attr-gnu-4-7-msoft-float.l: Likewise.
* gas/mips/attr-gnu-4-7-msoft-float.s: Likewise.
* gas/mips/attr-gnu-4-7-odd.l: Likewise.
* gas/mips/attr-gnu-4-7-odd.s: Likewise.
* gas/mips/attr-gnu-4-7.d: Likewise.
* gas/mips/attr-gnu-4-7.l: Likewise.
* gas/mips/attr-gnu-4-7.s: Likewise.
* gas/mips/attr-none-double.d: Likewise.
* gas/mips/attr-none-o32-fp64.d: Likewise.
* gas/mips/attr-none-o32-fp64-nooddspreg.d
* gas/mips/attr-none-o32-fpxx.d: Likewise.
* gas/mips/attr-none-single-float.d: Likewise.
* gas/mips/attr-none-soft-float.d: Likewise.
* gas/mips/elf_arch_mips32r3.d: Likewise.
* gas/mips/elf_arch_mips32r5.d: Likewise.
* gas/mips/elf_arch_mips64r3.d: Likewise.
* gas/mips/elf_arch_mips64r5.d: Likewise.
* gas/mips/li-d.d: Likewise.
* gas/mips/li-d.s: Likewise.
* gas/mips/module-check-warn.l: Likewise.
* gas/mips/module-check-warn.s: Likewise.
* gas/mips/module-check.d: Likewise.
* gas/mips/module-check.s: Likewise.
* gas/mips/module-mfp32.d: Likewise.
* gas/mips/module-mfp32.s: Likewise.
* gas/mips/module-mfp64.d: Likewise.
* gas/mips/module-mfp64.s: Likewise.
* gas/mips/module-mfp64-noodd.d: Likewise.
* gas/mips/module-mfp64-noodd.s: Likewise.
* gas/mips/module-mfpxx.d: Likewise.
* gas/mips/module-mfpxx.s: Likewise.
* gas/mips/module-msingle-float.d: Likewise.
* gas/mips/module-msingle-float.s: Likewise.
* gas/mips/module-msoft-float.d: Likewise.
* gas/mips/module-msoft-float.s: Likewise.
* gas/mips/module-set-mfpxx.d: Likewise.
* gas/mips/module-set-mfpxx.s: Likewise.
* gas/mips/fpxx-oddfpreg.d: Likewise.
* gas/mips/fpxx-oddfpreg.l: Likewise.
* gas/mips/fpxx-oddfpreg.s: Likewise.
* gas/mips/no-odd-spreg.d: Likewise.
* gas/mips/odd-spreg.d: Likewise.
* gas/elf/section2.e-mips: Adjust expected output.
* gas/mips/attr-gnu-abi-fp-1.d: Likewise.
* gas/mips/attr-gnu-abi-msa-1.d: Likewise.
* gas/mips/call-nonpic-1.d: Likewise.
* gas/mips/elf_arch_mips1.d: Likewise.
* gas/mips/elf_arch_mips2.d: Likewise.
* gas/mips/elf_arch_mips3.d: Likewise.
* gas/mips/elf_arch_mips32.d: Likewise.
* gas/mips/elf_arch_mips32r2.d: Likewise.
* gas/mips/elf_arch_mips4.d: Likewise.
* gas/mips/elf_arch_mips5.d: Likewise.
* gas/mips/elf_arch_mips64.d: Likewise.
* gas/mips/elf_arch_mips64r2.d: Likewise.
* gas/mips/elf_ase_micromips-2.d: Likewise.
* gas/mips/elf_ase_micromips.d: Likewise.
* gas/mips/elf_ase_mips16-2.d: Likewise.
* gas/mips/elf_ase_mips16.d: Likewise.
* gas/mips/module-defer-warn1.d: Likewise.
* gas/mips/module-override.d: Likewise.
* gas/mips/n32-consec.d: Likewise.
* gas/mips/nan-2008-1.d: Likewise.
* gas/mips/nan-2008-2.d: Likewise.
* gas/mips/nan-2008-3.d: Likewise.
* gas/mips/nan-2008-4.d: Likewise.
* gas/mips/nan-legacy-1.d: Likewise.
* gas/mips/nan-legacy-2.d: Likewise.
* gas/mips/nan-legacy-3.d: Likewise.
* gas/mips/nan-legacy-4.d: Likewise.
* gas/mips/nan-legacy-5.d: Likewise.
* gas/mips/tmips16-e.d: Likewise.
* gas/mips/tmips16-f.d: Likewise.
* gas/mips/tmipsel16-e.d: Likewise.
* gas/mips/tmipsel16-f.d: Likewise.
* gas/testsuite/gas/mips/mips.exp: Add new tests.
ld/testsuite/
* ld-mips-elf/abiflags-strip1-ph.d: New.
* ld-mips-elf/abiflags-strip2-ph.d: Likewise.
* ld-mips-elf/abiflags-strip3-ph.d: Likewise.
* ld-mips-elf/abiflags-strip4-ph.d: Likewise.
* ld-mips-elf/abiflags-strip5-ph.d: Likewise.
* ld-mips-elf/abiflags-strip6-ph.d: Likewise.
* ld-mips-elf/abiflags-strip7-ph.d: Likewise.
* ld-mips-elf/abiflags-strip8-ph.d: Likewise.
* ld-mips-elf/abiflags-strip9-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-0-n32-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-0-n64-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-0-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-06.d: Likewise.
* ld-mips-elf/attr-gnu-4-07.d: Likewise.
* ld-mips-elf/attr-gnu-4-08.d: Likewise.
* ld-mips-elf/attr-gnu-4-1-n32-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-1-n64-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-1-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-16.d: Likewise.
* ld-mips-elf/attr-gnu-4-17.d: Likewise.
* ld-mips-elf/attr-gnu-4-18.d: Likewise.
* ld-mips-elf/attr-gnu-4-2-n32-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-2-n64-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-2-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-26.d: Likewise.
* ld-mips-elf/attr-gnu-4-27.d: Likewise.
* ld-mips-elf/attr-gnu-4-28.d: Likewise.
* ld-mips-elf/attr-gnu-4-3-n32-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-3-n64-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-3-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-36.d: Likewise.
* ld-mips-elf/attr-gnu-4-37.d: Likewise.
* ld-mips-elf/attr-gnu-4-38.d: Likewise.
* ld-mips-elf/attr-gnu-4-4-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-46.d: Likewise.
* ld-mips-elf/attr-gnu-4-47.d: Likewise.
* ld-mips-elf/attr-gnu-4-48.d: Likewise.
* ld-mips-elf/attr-gnu-4-5-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-50.d: Likewise.
* ld-mips-elf/attr-gnu-4-52.d: Likewise.
* ld-mips-elf/attr-gnu-4-53.d: Likewise.
* ld-mips-elf/attr-gnu-4-54.d: Likewise.
* ld-mips-elf/attr-gnu-4-55.d: Likewise.
* ld-mips-elf/attr-gnu-4-56.d: Likewise.
* ld-mips-elf/attr-gnu-4-57.d: Likewise.
* ld-mips-elf/attr-gnu-4-58.d: Likewise.
* ld-mips-elf/attr-gnu-4-6-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-6.s: Likewise.
* ld-mips-elf/attr-gnu-4-60.d: Likewise.
* ld-mips-elf/attr-gnu-4-61.d: Likewise.
* ld-mips-elf/attr-gnu-4-62.d: Likewise.
* ld-mips-elf/attr-gnu-4-63.d: Likewise.
* ld-mips-elf/attr-gnu-4-64.d: Likewise.
* ld-mips-elf/attr-gnu-4-65.d: Likewise.
* ld-mips-elf/attr-gnu-4-66.d: Likewise.
* ld-mips-elf/attr-gnu-4-67.d: Likewise.
* ld-mips-elf/attr-gnu-4-68.d: Likewise.
* ld-mips-elf/attr-gnu-4-7-ph.d: Likewise.
* ld-mips-elf/attr-gnu-4-7.s: Likewise.
* ld-mips-elf/attr-gnu-4-70.d: Likewise.
* ld-mips-elf/attr-gnu-4-71.d: Likewise.
* ld-mips-elf/attr-gnu-4-72.d: Likewise.
* ld-mips-elf/attr-gnu-4-73.d: Likewise.
* ld-mips-elf/attr-gnu-4-74.d: Likewise.
* ld-mips-elf/attr-gnu-4-75.d: Likewise.
* ld-mips-elf/attr-gnu-4-76.d: Likewise.
* ld-mips-elf/attr-gnu-4-77.d: Likewise.
* ld-mips-elf/attr-gnu-4-78.d: Likewise.
* ld-mips-elf/attr-gnu-4-8.s: Likewise.
* ld-mips-elf/attr-gnu-4-81.d: Likewise.
* ld-mips-elf/empty.s: Likewise.
* ld-mips-elf/attr-gnu-4-00.d: Adjust expected output.
* ld-mips-elf/attr-gnu-4-01.d: Likewise.
* ld-mips-elf/attr-gnu-4-02.d: Likewise.
* ld-mips-elf/attr-gnu-4-03.d: Likewise.
* ld-mips-elf/attr-gnu-4-04.d: Likewise.
* ld-mips-elf/attr-gnu-4-05.d: Likewise.
* ld-mips-elf/attr-gnu-4-10.d: Likewise.
* ld-mips-elf/attr-gnu-4-11.d: Likewise.
* ld-mips-elf/attr-gnu-4-14.d: Likewise.
* ld-mips-elf/attr-gnu-4-15.d: Likewise.
* ld-mips-elf/attr-gnu-4-2.s: Likewise.
* ld-mips-elf/attr-gnu-4-20.d: Likewise.
* ld-mips-elf/attr-gnu-4-22.d: Likewise.
* ld-mips-elf/attr-gnu-4-24.d: Likewise.
* ld-mips-elf/attr-gnu-4-25.d: Likewise.
* ld-mips-elf/attr-gnu-4-3.s: Likewise.
* ld-mips-elf/attr-gnu-4-30.d: Likewise.
* ld-mips-elf/attr-gnu-4-33.d: Likewise.
* ld-mips-elf/attr-gnu-4-34.d: Likewise.
* ld-mips-elf/attr-gnu-4-35.d: Likewise.
* ld-mips-elf/attr-gnu-4-40.d: Likewise.
* ld-mips-elf/attr-gnu-4-41.d: Likewise.
* ld-mips-elf/attr-gnu-4-42.d: Likewise.
* ld-mips-elf/attr-gnu-4-43.d: Likewise.
* ld-mips-elf/attr-gnu-4-44.d: Likewise.
* ld-mips-elf/attr-gnu-4-45.d: Likewise.
* ld-mips-elf/attr-gnu-4-5.s: Likewise.
* ld-mips-elf/attr-gnu-4-51.d: Likewise.
* ld-mips-elf/attr-gnu-8-00.d: Likewise.
* ld-mips-elf/attr-gnu-8-01.d: Likewise.
* ld-mips-elf/attr-gnu-8-02.d: Likewise.
* ld-mips-elf/attr-gnu-8-10.d: Likewise.
* ld-mips-elf/attr-gnu-8-11.d: Likewise.
* ld-mips-elf/attr-gnu-8-20.d: Likewise.
* ld-mips-elf/attr-gnu-8-22.d: Likewise.
* ld-mips-elf/jalx-2.dd: Likewise.
* ld-mips-elf/mips16-pic-1.gd: Likewise.
* ld-mips-elf/mips16-pic-2.gd: Likewise.
* ld-mips-elf/mips16-pic-3.gd: Likewise.
* ld-mips-elf/mips16-pic-4a.gd: Likewise.
* ld-mips-elf/multi-got-no-shared.d: Likewise.
* ld-mips-elf/nan-2008.d: Likewise.
* ld-mips-elf/nan-legacy.d: Rework test.
* ld-mips-elf/pic-and-nonpic-3a.gd: Likewise.
* ld-mips-elf/pic-and-nonpic-3b.gd: Likewise.
* ld-mips-elf/pic-and-nonpic-5b.gd: Likewise.
* ld-mips-elf/pic-and-nonpic-6.ld: Likewise.
* ld-mips-elf/rel32-n32.d: Likewise.
* ld-mips-elf/rel32-o32.d: Likewise.
* ld-mips-elf/rel64.d: Likewise.
* ld-mips-elf/tls-multi-got-1.r: Likewise.
* ld-elf/group.ld: Discard .MIPS.abiflags and .gnu.attributes.
* ld-elf/orphan-region.ld: Likewise.
* ld-elf/orphan.ld: Likewise.
* ld-mips-elf/compressed-plt-1.ld: Likewise.
* ld-mips-elf/dyn-sec64.ld: Likewise.
* ld-mips-elf/got-dump-1.ld: Likewise.
* ld-mips-elf/got-dump-2.ld: Likewise.
* ld-mips-elf/got-page-1.ld: Likewise.
* ld-mips-elf/mips-dyn.ld: Likewise.
* ld-mips-elf/mips-lib.ld: Likewise.
* ld-mips-elf/pic-and-nonpic-3a.ld: Likewise.
* ld-mips-elf/pic-and-nonpic-3b.ld: Likewise.
* ld-mips-elf/pic-and-nonpic-4b.ld: Likewise.
* ld-mips-elf/pic-and-nonpic-5b.ld: Likewise.
* ld-mips-elf/region1.t: Likewise.
* ld-mips-elf/stub-dynsym-1.ld: Likewise.
* ld-mips-elf/tls-hidden3.ld: Likewise.
* ld-mips-elf/vxworks1.ld: Likewise.
* ld-scripts/overlay-size.t: Likewise.
* ld-mips-elf/elf-rel-got-n32-embed.d: Remove .MIPS.abiflags from
objects.
* ld-mips-elf/elf-rel-got-n32.d: Likewise.
* ld-mips-elf/elf-rel-got-n64-embed.d: Likewise.
* ld-mips-elf/elf-rel-got-n64-linux.d: Likewise.
* ld-mips-elf/elf-rel-got-n64.d: Likewise.
* ld-mips-elf/elf-rel-xgot-n32.d: Likewise.
* ld-mips-elf/elf-rel-xgot-n32-embed.d: Likewise.
* ld-mips-elf/elf-rel-xgot-n64.d: Likewise.
* ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise.
* ld-mips-elf/elf-rel-xgot-n64-embed.d: Likewise.
* ld-mips-elf/mips-elf.exp: Add new tests.
Yao Qi [Mon, 28 Jul 2014 05:44:57 +0000 (13:44 +0800)]
Fix PR 17206
As reported in PR 17206, an internal error is triggered when command
until is executed. In infcmd.c:until_next_command, step_range_end is
set to 'pc',
if (!func)
{
struct bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
if (msymbol.minsym == NULL)
error (_("Execution is not within a known function."));
tp->control.step_range_start = BMSYMBOL_VALUE_ADDRESS (msymbol);
tp->control.step_range_end = pc;
}
and later in infrun.c:resume, the assert below is triggered in PR
17206.
if (tp->control.may_range_step)
{
/* If we're resuming a thread with the PC out of the step
range, then we're doing some nested/finer run control
operation, like stepping the thread out of the dynamic
linker or the displaced stepping scratch pad. We
shouldn't have allowed a range step then. */
gdb_assert (pc_in_thread_step_range (pc, tp));
}
In until_next_command, we set step range to [XXX, pc), so pc isn't
within the range. pc_in_thread_step_range returns false and the
assert is triggered. AFAICS, the range we want in until_next_command
is [XXX, pc] instead of [XXX, pc), because we want to program step
until greater than pc. This patch is to set step_range_end to
'pc + 1'. Running until-nodebug.exp with unpatched GDB will get the
following fail,
FAIL: gdb.base/until-nodebug.exp: until 2 (GDB internal error)
and the fail goes away when the fix is applied.
gdb:
2014-07-29 Yao Qi <yao@codesourcery.com>
PR gdb/17206
* infcmd.c (until_next_command): Set step_range_end to PC + 1.
gdb/testsuite:
2014-07-29 Yao Qi <yao@codesourcery.com>
PR gdb/17206
* gdb.base/until-nodebug.exp: New.
Doug Evans [Tue, 29 Jul 2014 02:20:30 +0000 (19:20 -0700)]
PR guile/17203
* guile/scm-param.c (pascm_parameter_defined_p): New function.
(gdbscm_register_parameter_x): Call it. Raise error for pre-existing
parameters.
testsuite/
* gdb.guile/scm-parameter.exp: Add tests for trying to create
previously existing parameter, and previously ambiguously spelled
parameter.
Alan Modra [Tue, 29 Jul 2014 00:00:44 +0000 (09:30 +0930)]
daily update
Will Newton [Tue, 22 Jul 2014 16:10:51 +0000 (17:10 +0100)]
gdb/arm-linux-tdep.c: Handle Thumb2 signal trampolines
Recent versions of glibc have assembled the signal trampoline code
as Thumb2, which causes gdb to misinterpret them and a number of
testsuite tests to fail. Educate gdb about these trampolines and
get the tests running again.
gdb/ChangeLog:
2014-07-28 Will Newton <will.newton@linaro.org>
* arm-linux-tdep.c (THUMB2_SET_R7_SIGRETURN1): New define.
(THUMB2_SET_R7_SIGRETURN2): Likewise.
(THUMB2_SET_R7_RT_SIGRETURN1): Likewise.
(THUMB2_SET_R7_RT_SIGRETURN2): Likewise.
(THUMB2_EABI_SYSCALL): Likewise.
(thumb2_eabi_linux_sigreturn_tramp_frame): Create new
struct tramp_frame.
(thumb2_eabi_linux_rt_sigreturn_tramp_frame): Likewise.
(arm_linux_init_abi): Add Thumb2 tramp frame unwinders.
Will Newton [Tue, 22 Jul 2014 16:16:48 +0000 (17:16 +0100)]
gdb/testsuite/gdb.base/varargs.exp: Remove ARM KFAILs
These tests used to fail on ARM but now pass, so remove the KFAIL.
gdb/testsuite/ChangeLog:
2014-07-28 Will Newton <will.newton@linaro.org>
* gdb.base/varargs.exp: Remove KFAILs for ARM.
Alan Modra [Mon, 28 Jul 2014 12:48:25 +0000 (22:18 +0930)]
Warn for ar/nm/ranlib/ld on lto objects without plugin
PR 13227
bfd/
* archive.c (_bfd_compute_and_write_armap): Warn on adding
__gnu_lto_slim to armap.
* linker.c (_bfd_generic_link_add_one_symbol): Warn on adding
__gnu_lto_slim to linker hash table.
binutils/
* nm.c (filter_symbols): Warn on __gnu_lto_slim.
Alan Modra [Mon, 28 Jul 2014 00:00:43 +0000 (09:30 +0930)]
daily update
Joel Sherrill [Mon, 21 Jul 2014 23:49:17 +0000 (18:49 -0500)]
or1k: GDB not supported for or1k*-*-rtems*
* configure.ac (or1k*-*-rtems*): gdb not supported. The ordering
of the stanzas results in this not being caught by or1k*-*-* later.
* configure. Regenerated.
Signed-off-by: Christian Svensson <blue@cmd.nu>
Joel Sherrill [Tue, 22 Jul 2014 00:10:52 +0000 (19:10 -0500)]
or1k: RTEMS target support and simplify matching
* gas/configure.tgt (or1k*-*-rtems*): Ensure a match.
(or1k*-*-*): Use or1k* to match or1knd and or1kZ.
Signed-off-by: Christian Svensson <blue@cmd.nu>
Doug Evans [Sun, 27 Jul 2014 14:50:49 +0000 (07:50 -0700)]
* guile/scm-param.c (pascm_print_param_smob): Fix output.
Doug Evans [Sun, 27 Jul 2014 14:41:01 +0000 (07:41 -0700)]
* guile/guile.c (gdbscm_execute_gdb_command): Fix typo in comment.
Anthony Green [Sun, 27 Jul 2014 12:51:20 +0000 (08:51 -0400)]
Add moxiebox target
Doug Evans [Sun, 27 Jul 2014 01:16:27 +0000 (18:16 -0700)]
PR guile/17146
* acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): New macro.
(GDB_GUILD_TARGET_FLAG, GDB_TRY_GUILD): New macros.
* configure.ac: Try to use guild to compile an scm file, if it fails
then disable guile support.
* configure: Regenerate.
* data-directory/Makefile.in (GUILE_SOURCE_FILES): Renamed from
GUILE_FILE_LIST.
(GUILE_COMPILED_FILES): New variable.
(GUILE_FILES) Update.
(GUILD, GUILD_TARGET_FLAG, GUILD_COMPILE_FLAGS): New variables.
(stamp-guile): Compile scm files.
* guile/guile.c (boot_guile_support): New function.
(standard_throw_args_p): New function.
(print_standard_throw_error, print_throw_error): New functions.
(handle_boot_error): New function.
(initialize_scheme_side): Rewrite to call boot_guile_support.
* guile/lib/gdb/boot.scm: Update %load-compiled-path. Load gdb.go.
* guile/lib/gdb/init.scm (%silence-compiler-warnings%): New function.
Doug Evans [Sun, 27 Jul 2014 00:01:09 +0000 (17:01 -0700)]
PR guile/17146 preparatory work.
* data-directory/Makefile.in (GUILE_FILES): Add support.scm.
* guile/lib/gdb/support.scm: New file.
* guile/guile.c (gdbscm_init_module_name): Change to "gdb".
* guile/lib/gdb.scm: Load gdb/init.scm as an include file.
All uses updated.
* guile/lib/gdb/init.scm (SCM_ARG1, SCM_ARG2): Moved to support.scm.
All uses updated.
(%assert-type): Ditto, and renamed to assert-type.
(%exception-print-style): Delete.
testsuite/
* gdb.guile/types-module.exp: Add tests for wrong type arguments.
Alan Modra [Sun, 27 Jul 2014 00:00:58 +0000 (09:30 +0930)]
daily update
Doug Evans [Sat, 26 Jul 2014 23:41:29 +0000 (16:41 -0700)]
PR build/17105.
Tested with/without guile,python on amd64-linux.
I'm not sure we still have to deal with shells that can't
handle empty for lists, but I played it safe.
Otherwise this patch would be a lot smaller (though a diff -b
will still show the real changes).
PR build/17105
* configure.ac: Add AM_CONDITIONALs for HAVE_PYTHON, HAVE_GUILE.
* configure: Regenerate.
* data-directory/Makefile.in (PYTHON_FILE_LIST): Renamed from
PYTHON_FILES.
(PYTHON_FILES): New variable.
(GUILE_FILE_LIST): Renamed from GUILE_FILES.
(GUILE_FILES): New variable.
(stamp-python, install-python, uninstall-python): Handle empty
file list.
(stamp-guile, install-guile, uninstall-guile): Ditto.
Doug Evans [Sat, 26 Jul 2014 21:58:58 +0000 (14:58 -0700)]
PR guile/17177
* guile/lib/gdb.scm (pretty-printers): Export.
(set-pretty-printers!): Export.
* guile/lib/gdb/printing.scm (gdb module): Update.
(prepend-pretty-printer!, append-pretty-printer!): Update.
* guile/scm-pretty-print.c (pretty_printer_list_name): Delete.
(pretty_printer_list_var): Delete.
(pretty_printer_list): New static global.
(gdbscm_pretty_printers): New function.
(gdbscm_set_pretty_printers_x): New function.
(ppscm_find_pretty_printer_from_gdb): Update.
(pretty_printer_functions): Add pretty-printers, set-pretty-printers!.
(gdbscm_initialize_pretty_printers): Update.
doc/
* guile.texi (Guile Pretty Printing API): Fix typo.
Document set-pretty-printers!, pretty-printers.
(Selecting Guile Pretty-Printers): Update.
Mention program-space based pretty-printers.
Doug Evans [Sat, 26 Jul 2014 21:49:04 +0000 (14:49 -0700)]
PR 17185
PR 17185 describes a problem with using gdb+guile with libgc 7.4.0.
The symptom is a hang in sigsuspend.
[The thread referenced in the PR has the details.]
It's not clear what the right fix is, or even where the bug is yet.
This patch applies the same workaround Guile has applied.
There is no functionality or real performance loss with this,
and Guile has been using it for awhile.
* configure.ac: Add check for header gc/gc.h.
Add check for function setenv.
* configure: Regenerate.
* config.in: Regenerate.
* guile/guile.c (_initialize_guile): Add workaround for libgc 7.4.0.
Alan Modra [Sat, 26 Jul 2014 11:30:50 +0000 (21:00 +0930)]
Prepare gas for 64-bit obstacks
Use size_t in a few places involved with obstacks, and don't include
obstack.h in files that don't use obstacks.
gas/
* config/bfin-parse.y: Don't include obstack.h.
* config/obj-aout.c: Likewise.
* config/obj-coff.c: Likewise.
* config/obj-som.c: Likewise.
* config/tc-bfin.c: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-rl78.c: Likewise.
* config/tc-rx.c: Likewise.
* config/tc-tic4x.c: Likewise.
* expr.c: Likewise.
* listing.c: Likewise.
* config/obj-elf.c (elf_file_symbol): Make name_length a size_t.
* config/tc-aarch64.c (symbol_locate): Likewise.
* config/tc-arm.c (symbol_locate): Likewise.
* config/tc-mmix.c (mmix_handle_mmixal): Make len_0 a size_t.
* config/tc-score.c (s3_build_score_ops_hsh): Make len a size_t.
(s3_build_dependency_insn_hsh): Likewise.
* config/tc-score7.c (s7_build_score_ops_hsh): Likewise.
(s7_build_dependency_insn_hsh): Likewise.
* frags.c (frag_grow): Make parameter a size_t, and use size_t locals.
(frag_new): Make parameter a size_t.
(frag_var_init): Make max_chars and var parameters size_t.
(frag_var, frag_variant): Likewise.
(frag_room): Return a size_t.
(frag_align_pattern): Make n_fill parameter a size_t.
* frags.h: Update function prototypes.
* symbols.c (save_symbol_name): Make name_length a size_t.
Alan Modra [Sat, 26 Jul 2014 00:00:48 +0000 (09:30 +0930)]
daily update
Samuel Bronson [Fri, 20 Jun 2014 01:59:19 +0000 (21:59 -0400)]
Add a .gitattributes file for use with git-merge-changelog
Individual users will still have to:
1. Install git-merge-changelog
2. Set up the merge driver in their git config
See gnulib's lib/git-merge-changelog.c [1] for details.
For example, I:
1. Patched Debian's gnulib package to build git-merge-changelog, and
sent the patch to the Debian maintainer, who then proceeded to not
only accept my patch but even write a *manpage* for
git-merge-changelog! (Let's hear it for Ian Beckwith.)
So now, I can install it simply by running "apt-get install
git-merge-changelog". (Except, of course, that I already have it
installed from when I was testing my patch.)
2. Did step (2) from .gitattributes
With this patch applied and the above two steps done by whatever means
you deem best, you can say goodbye to merge conflicts in ChangeLog
files -- at least *IF* people stop renaming the danged things, anyway.
If you don't do step 2, you will continue to suffer from ChangeLog
merge conflicts exactly as before, whether or not you did step 1.
If you do step 2 but not step 1, git will likely start complaining
that it can't find any "git-merge-changelog" to run.
[1]: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/git-merge-changelog.c
[Note: The docs for git-merge-changelog (the comments at the top) say
that you need a .gitattributes in every directory. The docs are wrong.
Ignore the docs. Well, not the whole docs; just that part.
You really only need one at the top level, since .gitattributes uses
the same pattern matching rules as .gitignore, which match files in
any subdirectory unless you prefix the pattern with a "/", as
explained in the gitignore(5) manpage.]
Maciej W. Rozycki [Fri, 25 Jul 2014 17:57:06 +0000 (18:57 +0100)]
MIPS: Respect the "set mips compression" command
This fixes gdbarch matching, making sure one for the opposite compressed
ISA variation is not chosen. That in turn makes "set mips compression"
work; right now the setting sticks to the initial value, either inferred
from the ELF header of the binary first loaded or the default value if
no binary has been used. This only affects debugging with no symbol
table available or no binary chosen at all, as otherwise symbol
annotations determine the compressed ISA variation.
* mips-tdep.c (mips_gdbarch_init): Also check the compressed ISA
variation in gdbarch matching.
Tom Tromey [Sat, 13 Jul 2013 17:19:14 +0000 (11:19 -0600)]
remove using_exec_ops global
This removes the using_exec_ops global from exec.c, in favor of
querying the target stack directly using target_is_pushed. This is
more in keeping with other code in gdb, and is also more future-proof
as it is more multi-target-ready.
Built and regtested on x86-64 Fedora 20.
2014-07-25 Tom Tromey <tromey@redhat.com>
* exec.c (using_exec_ops): Remove.
(exec_close_1): Update. Remove extraneous block, reindent.
(add_target_sections): Use target_is_pushed.
Pedro Alves [Fri, 25 Jul 2014 16:34:05 +0000 (17:34 +0100)]
fix build: update clear_proceed_status callers
A previous patch added a new parameter to clear_proceed_status, but
forgot to update a few callers.
Tested by building on x86_64 Fedora 20, with --enable-targets=all.
gdb/
2014-07-25 Pedro Alves <palves@redhat.com>
* go32-nat.c (go32_create_inferior): Pass 0 to clear_proceed_status.
* monitor.c (monitor_create_inferior): Likewise.
* remote-m32r-sdi.c (m32r_create_inferior): Likewise.
* remote-sim.c (gdbsim_create_inferior): Likewise.
* solib-irix.c (irix_solib_create_inferior_hook): Likewise.
* solib-osf.c (osf_solib_create_inferior_hook): Likewise.
* windows-nat.c (do_initial_windows_stuff): Likewise.
Pedro Alves [Fri, 25 Jul 2014 15:57:31 +0000 (16:57 +0100)]
Always pass signals to the right thread
Currently, GDB can pass a signal to the wrong thread in several
different but related scenarios.
E.g., if thread 1 stops for signal SIGFOO, the user switches to thread
2, and then issues "continue", SIGFOO is actually delivered to thread
2, not thread 1. This obviously messes up programs that use
pthread_kill to send signals to specific threads.
This has been a known issue for a long while. Back in 2008 when I
made stop_signal be per-thread (
2020b7ab), I kept the behavior -- see
code in 'proceed' being removed -- wanting to come back to it later.
The time has finally come now.
The patch fixes this -- on resumption, intercepted signals are always
delivered to the thread that had intercepted them.
Another example: if thread 1 stops for a breakpoint, the user switches
to thread 2, and then issues "signal SIGFOO", SIGFOO is actually
delivered to thread 1, not thread 2, because 'proceed' first switches
to thread 1 to step over its breakpoint... If the user deletes the
breakpoint before issuing "signal FOO", then the signal is delivered
to thread 2 (the current thread).
"signal SIGFOO" can be used for two things: inject a signal in the
program while the program/thread had stopped for none, bypassing
"handle nopass"; or changing/suppressing a signal the program had
stopped for. These scenarios are really two faces of the same coin,
and GDB can't really guess what the user is trying to do. GDB might
have intercepted signals in more than one thread even (see the new
signal-command-multiple-signals-pending.exp test). At least in the
inject case, it's obviously clear to me that the user means to deliver
the signal to the currently selected thread, so best is to make the
command's behavior consistent and easy to explain.
Then, if the user is trying to suppress/change a signal the program
had stopped for instead of injecting a new signal, but, the user had
changed threads meanwhile, then she will be surprised that with:
(gdb) continue
Thread 1 stopped for signal SIGFOO.
(gdb) thread 2
(gdb) signal SIGBAR
... GDB actually delivers SIGFOO to thread 1, and SIGBAR to thread 2
(with scheduler-locking off, which is the default, because then
"signal" or any other resumption command resumes all threads).
So the patch makes GDB detect that, and ask for confirmation:
(gdb) thread 1
[Switching to thread 1 (Thread 10979)]
(gdb) signal SIGUSR2
Note:
Thread 3 previously stopped with signal SIGUSR2, User defined signal 2.
Thread 2 previously stopped with signal SIGUSR1, User defined signal 1.
Continuing thread 1 (the current thread) with specified signal will
still deliver the signals noted above to their respective threads.
Continue anyway? (y or n)
All these scenarios are covered by the new tests.
Tested on x86_64 Fedora 20, native and gdbserver.
gdb/
2014-07-25 Pedro Alves <palves@redhat.com>
* NEWS: Mention signal passing and "signal" command changes.
* gdbthread.h (struct thread_suspend_state) <stop_signal>: Extend
comment.
* breakpoint.c (until_break_command): Adjust clear_proceed_status
call.
* infcall.c (run_inferior_call): Adjust clear_proceed_status call.
* infcmd.c (proceed_thread_callback, continue_1, step_once)
(jump_command): Adjust clear_proceed_status call.
(signal_command): Warn if other thread that are resumed have
signals that will be delivered. Adjust clear_proceed_status call.
(until_next_command, finish_command)
(proceed_after_attach_callback, attach_command_post_wait)
(attach_command): Adjust clear_proceed_status call.
* infrun.c (proceed_after_vfork_done): Likewise.
(proceed_after_attach_callback): Adjust comment.
(clear_proceed_status_thread): Clear stop_signal if not in pass
state.
(clear_proceed_status_callback): Delete.
(clear_proceed_status): New 'step' parameter. Only clear the
proceed status of threads the command being prepared is about to
resume.
(proceed): If passed in an explicit signal, override stop_signal
with it. Don't pass the last stop signal to the thread we're
resuming.
(init_wait_for_inferior): Adjust clear_proceed_status call.
(switch_back_to_stepped_thread): Clear the signal if it should not
be passed.
* infrun.h (clear_proceed_status): New 'step' parameter.
(user_visible_resume_ptid): Add comment.
* linux-nat.c (linux_nat_resume_callback): Don't check whether the
signal is in pass state.
* remote.c (append_pending_thread_resumptions): Likewise.
* mi/mi-main.c (proceed_thread): Adjust clear_proceed_status call.
gdb/doc/
2014-07-25 Pedro Alves <palves@redhat.com>
Eli Zaretskii <eliz@gnu.org>
* gdb.texinfo (Signaling) <signal command>: Explain what happens
with multi-threaded programs.
gdb/testsuite/
2014-07-25 Pedro Alves <palves@redhat.com>
* gdb.threads/signal-command-handle-nopass.c: New file.
* gdb.threads/signal-command-handle-nopass.exp: New file.
* gdb.threads/signal-command-multiple-signals-pending.c: New file.
* gdb.threads/signal-command-multiple-signals-pending.exp: New file.
* gdb.threads/signal-delivered-right-thread.c: New file.
* gdb.threads/signal-delivered-right-thread.exp: New file.
Tom Tromey [Fri, 25 Jul 2014 15:20:03 +0000 (09:20 -0600)]
properly parenthesize two macros
I happened to notice that a couple of macros in target.h weren't
properly using parens and as a result had a strange definition.
This patch adds the parens and then fixes the macros to be written as
must have been intended.
Tested by rebuilding.
I'm pushing this as obvious.
2014-07-25 Tom Tromey <tromey@redhat.com>
* target.h (target_stopped_data_address)
(target_watchpoint_addr_within_range): Use "->", not ".". Fix
parentheses.